ecma262
ecma262 copied to clipboard
Normative: Use onFinally's realm when creating functions in Promise.prototype.finally (fixes #2222)
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
Does this need consensus, and/or does it match what engines already do? My assumption is yes and yes.
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?
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.
I've added this to the agenda for next month's meeting.
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.
Thanks for the reminder, I will find some time for this before the next meeting.
ping @codehag @dminor, it'd be great to get this moving forward, if it's still important.
We still want to do this. I just need to refresh my memory on it, thanks again for ping.
@dminor any update from spidermonkey on this one?