Skip to content

Remove MessagePort close event tests - #63174

Merged
annevk merged 2 commits into
web-platform-tests:masterfrom
nicolo-ribaudo:remove-messageport-close-event
Oct 2, 2026
Merged

annevk merged 2 commits into
web-platform-tests:masterfrom
nicolo-ribaudo:remove-messageport-close-event

Conversation

@nicolo-ribaudo

Copy link
Copy Markdown
Member

@nicolo-ribaudo
nicolo-ribaudo force-pushed the remove-messageport-close-event branch from 229405e to a91f536 Compare October 1, 2026 22:00
@annevk
annevk merged commit fc1a6ce into web-platform-tests:master Oct 2, 2026
29 checks passed
annevk pushed a commit to whatwg/html that referenced this pull request Oct 2, 2026
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 #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:
- #1766
- #9933
- #10201
- #12797
- #12957

Tests: web-platform-tests/wpt#63174

Closes #10201 and closes #12797.
@nicolo-ribaudo
nicolo-ribaudo deleted the remove-messageport-close-event branch October 2, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants