ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Normative: Use onFinally's realm when creating functions in Promise.prototype.finally (fixes #2222)

Open arai-a opened this issue 4 years ago • 9 comments

Changed Promise.prototype.finally to use onFinally's realm when creating thenFinally and catchFinally, so that embedding uses onFinally's realm's global when checking if job's global is fully active.

This fixes #2222

arai-a avatar Nov 24 '20 08:11 arai-a

Does this need consensus, and/or does it match what engines already do? My assumption is yes and yes.

ljharb avatar Nov 24 '20 21:11 ljharb

test is in https://github.com/tc39/test262/pull/2910. According to the result there, most engines follow current spec (create thenFinally and catchFinally in finally method's realm) and don't match to the modified behavior. As described in issue #2222, this mostly affects only embedding scenario, and this is normative change for consistency.

I don't know about consensus requirement, but would be nice to get feedback from devs?

arai-a avatar Nov 24 '20 21:11 arai-a

Seems best to discuss it in the next plenary.

The “has tests” label will be applied when the tests PR is merged, after it has consensus.

ljharb avatar Nov 24 '20 22:11 ljharb

I've added this to the agenda for next month's meeting.

ljharb avatar Nov 17 '21 23:11 ljharb

This was discussed (1 2).

Conclusion was that @codehag would update the PR/issue to refer to Mozilla's bug, and for @codehag, @erights, and myself to discuss further, which we have not yet done.

ljharb avatar Mar 31 '22 21:03 ljharb

Thanks for the reminder, I will find some time for this before the next meeting.

codehag avatar Apr 01 '22 08:04 codehag

ping @codehag @dminor, it'd be great to get this moving forward, if it's still important.

ljharb avatar Feb 20 '23 06:02 ljharb

We still want to do this. I just need to refresh my memory on it, thanks again for ping.

codehag avatar Feb 20 '23 08:02 codehag

@dminor any update from spidermonkey on this one?

ljharb avatar Jul 28 '23 21:07 ljharb