Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: Use HostJobCallbacks for FinalizationRegistry callbacks #2316

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

syg
Copy link
Contributor

@syg syg commented Feb 19, 2021

This aligns FinalizationRegistry callbacks with Promise callbacks in
allowing web browsers to perform additional steps to save and restore
the correct incumbent settings object.

Context is that one of the blockers in the HTML integration PR is proper handling of backup incumbent settings objects. I won't recapture that horror here, but we went over it for the Promise machinery and got consensus to add the HostJobCallback machinery. This PR just makes use of that machinery too.

/cc @codehag since Firefox is the only one that implements this behavior. Chrome is interested in aligning with the spec here, but is not prioritizing the implementation work.

(I meant to do this before Stage 4, but I... guess I forgot.)

@ljharb ljharb added needs consensus This needs committee consensus before it can be eligible to be merged. normative change Affects behavior required to correctly evaluate some ECMAScript source text web reality labels Feb 19, 2021
@ljharb ljharb requested review from michaelficarra, bakkot and a team February 19, 2021 02:48
syg added a commit to littledan/html that referenced this pull request Feb 19, 2021
@codehag
Copy link
Contributor

codehag commented Mar 4, 2021

We support this, and iirc have already implemented the intended behavior.

@ljharb ljharb added has consensus This has committee consensus. and removed needs consensus This needs committee consensus before it can be eligible to be merged. labels Mar 9, 2021
@ljharb
Copy link
Member

ljharb commented Mar 9, 2021

(presumably this doesn't need tests because it's not really testable?)

@syg
Copy link
Contributor Author

syg commented Mar 9, 2021

This is not testable in test262, that's right. There can be WPT tests for this, though.

@syg
Copy link
Contributor Author

syg commented Mar 12, 2021

This should be good to merge.

syg added a commit to littledan/html that referenced this pull request Mar 12, 2021
@syg syg added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Mar 17, 2021
…c39#2316)

This aligns FinalizationRegistry callbacks with Promise callbacks in
allowing web browsers to perform additional steps to save and restore
the correct incumbent settings object.
@ljharb ljharb force-pushed the incumbents-finalizationregistry branch from 6e8146f to 0635793 Compare March 17, 2021 21:39
@ljharb ljharb merged commit 0635793 into tc39:master Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus. normative change Affects behavior required to correctly evaluate some ECMAScript source text ready to merge Editors believe this PR needs no further reviews, and is ready to land. web reality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants