Remove MessagePort's close event - #13016
Conversation
b5fdfea to
e2793d3
Compare
e2793d3 to
c86a6a2
Compare
There was a problem hiding this comment.
The disentangle steps were introduced in the original onclose PR, but it's nice to have a dfn for the various places that disentangle ports.
|
If this matches current implementations, that satisfies the implementer interest item. Should have tests to verify the lack of an event and event handler IDL attribute. |
Well, it kind of matches implementations. No implementation ships However all implementation disagree on GC semantics, which this PR restores to the pre-close-event state. None implemented the post-close-event GC behavior, and only Firefox has the old one.
Done |
This is a revert of cc2634f (it's not a "clean" revert because of some other changes that happened in the meantime). This means that this patch also restores the older GC semantics: a port is not easily GC-able, it is not explicitly disentangled when the other half's owner document is destroyed, and relies on polling to see if the other half is still alive. I believe this matches Firefox's behavior, which is also what I believe the discussion in whatwg#10201 leads to. Note that browsers have all different GC semantics (according to Claude): - Chromium makes a port uncollectable only if it's already started - Firefox does not collect them - WebKit keeps the port uncollectable only if it has a message listener Given that no browser ships the `close` events this revert is probably the best thing to do; if somebody in the future wants to reintroduce it some relevant discussions are: - whatwg#1766 - whatwg#9933 - whatwg#10201 - whatwg#12797 - whatwg#12957
c86a6a2 to
dda60d9
Compare
As discussed in #12957. Note that I have no interest in working on re-adding the event, but the commit description should have enough pointer for somebody else that might.
Closes #10201, closes #12797, closes #12957
Commit message:
closeevent removed from the HTML spec nodejs/node#66460Corresponding HTML AAM & ARIA in HTML issues & PRs:Not relevantMDN issue is filed: Not documented (Add docs for close event of MessagePort API mdn/mdn#517)(See WHATWG Working Mode: Changes for more details.)
/document-lifecycle.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/web-messaging.html ( diff )