-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
MessagePort API:add a close event #9933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work! Review summary:
- A bunch of minor formatting things
- Need to add close to the event index
- I can't find where the garbage collection behavior is specified
thank you for reviewing this PR! |
We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019
We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019
I've done another review. I found several more small formatting issues, but I decided to fix them directly instead of requiring you to do it. You can see my changes in 62e9ef7. Please be sure to do The remaining issue is the one I noted in #9933 (comment) . I cannot find anything in this PR which specifies that ports get disentangled on garbage collection. Can you please work on adding that? |
We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019
We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231743}
We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231743}
We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231743}
This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true
This reverts commit 6a74d3d. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <[email protected]> Commit-Queue: Hiroki Nakagawa <[email protected]> Owners-Override: Hiroki Nakagawa <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231780}
This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <[email protected]> Commit-Queue: Hiroki Nakagawa <[email protected]> Owners-Override: Hiroki Nakagawa <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231780}
This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <[email protected]> Commit-Queue: Hiroki Nakagawa <[email protected]> Owners-Override: Hiroki Nakagawa <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231780}
This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df
This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview I changed two tests as follows ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js →in order to prevent the test timing out, I added timmeout=long ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js →change test expectations Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Revert "Dispatch close event when MessagePort is disentangled" This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <[email protected]> Commit-Queue: Hiroki Nakagawa <[email protected]> Owners-Override: Hiroki Nakagawa <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231780} -- wpt-commits: 5d1c45f9f81c37c45e7acc351348cd6e9879597f wpt-pr: 43465
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Revert "Dispatch close event when MessagePort is disentangled" This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <[email protected]> Commit-Queue: Hiroki Nakagawa <[email protected]> Owners-Override: Hiroki Nakagawa <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231780} -- wpt-commits: 5d1c45f9f81c37c45e7acc351348cd6e9879597f wpt-pr: 43465
This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview I changed two tests as follows ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js →in order to prevent the test timing out, I added timmeout=long ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js →change test expectations Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df
This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview I changed two tests as follows ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js →in order to prevent the test timing out, I added timmeout=long ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js →change test expectations Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df
This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview I changed two tests as follows ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js →change test expectations ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js →change test expectations Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <jbromanchromium.org> Commit-Queue: Nonoka Muraki <murakinonokachromium.org> Reviewed-by: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015 UltraBlame original commit: 6024446737e641a6277938deb3122ffa5b25698f
Thank you! I worked on this. please take a look. |
I'm sorry, I still can't see what part of the new text specifies that ports get disentangled on garbage collection. Can you quote which text you believe says that? |
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Revert "Dispatch close event when MessagePort is disentangled" This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <[email protected]> Commit-Queue: Hiroki Nakagawa <[email protected]> Owners-Override: Hiroki Nakagawa <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231780} -- wpt-commits: 5d1c45f9f81c37c45e7acc351348cd6e9879597f wpt-pr: 43465
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Revert "Dispatch close event when MessagePort is disentangled" This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <[email protected]> Commit-Queue: Hiroki Nakagawa <[email protected]> Owners-Override: Hiroki Nakagawa <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/heads/main@{#1231780} -- wpt-commits: 5d1c45f9f81c37c45e7acc351348cd6e9879597f wpt-pr: 43465
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Reland "Dispatch close event when MessagePort is disentangled" This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview This is because the builder added in https://crrev.com/c/5005230 might be broken. Specifically, chrome-wpt builder cannot run GC(Bug: 1509657) and BFCache doesn't work on chrome-wpt builder(Bug: 1509303). I changed two tests expectations described below. ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5083156 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1234854} -- wpt-commits: 05aab53917a8309fe7f1ab5c50d094ac488ce942 wpt-pr: 43491
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <jbromanchromium.org> Commit-Queue: Nonoka Muraki <murakinonokachromium.org> Reviewed-by: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015 UltraBlame original commit: 9328f805d865217889e27a0183ae9e47665fbc36
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Revert "Dispatch close event when MessagePort is disentangled" This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <jbromanchromium.org> > Commit-Queue: Nonoka Muraki <murakinonokachromium.org> > Reviewed-by: Ming-Ying Chung <mychchromium.org> > Cr-Commit-Position: refs/heads/main{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <mychchromium.org> Commit-Queue: Hiroki Nakagawa <nhirokichromium.org> Owners-Override: Hiroki Nakagawa <nhirokichromium.org> Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main{#1231780} -- wpt-commits: 5d1c45f9f81c37c45e7acc351348cd6e9879597f wpt-pr: 43465 UltraBlame original commit: 725faaf34b655617d2433d4bd0ccb5948f7b6a66
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Reland "Dispatch close event when MessagePort is disentangled" This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview This is because the builder added in https://crrev.com/c/5005230 might be broken. Specifically, chrome-wpt builder cannot run GC(Bug: 1509657) and BFCache doesn't work on chrome-wpt builder(Bug: 1509303). I changed two tests expectations described below. ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <jbromanchromium.org> > Commit-Queue: Nonoka Muraki <murakinonokachromium.org> > Reviewed-by: Ming-Ying Chung <mychchromium.org> > Cr-Commit-Position: refs/heads/main{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5083156 Reviewed-by: Jeremy Roman <jbromanchromium.org> Commit-Queue: Nonoka Muraki <murakinonokachromium.org> Reviewed-by: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1234854} -- wpt-commits: 05aab53917a8309fe7f1ab5c50d094ac488ce942 wpt-pr: 43491 UltraBlame original commit: 44d41cbaf3e883d24936ac8be51e4e3be7e5efd0
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <jbromanchromium.org> Commit-Queue: Nonoka Muraki <murakinonokachromium.org> Reviewed-by: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015 UltraBlame original commit: 9328f805d865217889e27a0183ae9e47665fbc36
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Revert "Dispatch close event when MessagePort is disentangled" This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <jbromanchromium.org> > Commit-Queue: Nonoka Muraki <murakinonokachromium.org> > Reviewed-by: Ming-Ying Chung <mychchromium.org> > Cr-Commit-Position: refs/heads/main{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <mychchromium.org> Commit-Queue: Hiroki Nakagawa <nhirokichromium.org> Owners-Override: Hiroki Nakagawa <nhirokichromium.org> Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main{#1231780} -- wpt-commits: 5d1c45f9f81c37c45e7acc351348cd6e9879597f wpt-pr: 43465 UltraBlame original commit: 725faaf34b655617d2433d4bd0ccb5948f7b6a66
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Reland "Dispatch close event when MessagePort is disentangled" This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview This is because the builder added in https://crrev.com/c/5005230 might be broken. Specifically, chrome-wpt builder cannot run GC(Bug: 1509657) and BFCache doesn't work on chrome-wpt builder(Bug: 1509303). I changed two tests expectations described below. ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <jbromanchromium.org> > Commit-Queue: Nonoka Muraki <murakinonokachromium.org> > Reviewed-by: Ming-Ying Chung <mychchromium.org> > Cr-Commit-Position: refs/heads/main{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5083156 Reviewed-by: Jeremy Roman <jbromanchromium.org> Commit-Queue: Nonoka Muraki <murakinonokachromium.org> Reviewed-by: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1234854} -- wpt-commits: 05aab53917a8309fe7f1ab5c50d094ac488ce942 wpt-pr: 43491 UltraBlame original commit: 44d41cbaf3e883d24936ac8be51e4e3be7e5efd0
… disentangled, a=testonly Automatic update from web-platform-tests Dispatch close event when MessagePort is disentangled We want to dispatch a close event when an entangled MessagePort is disconnected. Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, a port1’s error handler is run. So we can change an error handler to dispatch a close event. The tests of close event are as follows: 1) port was explicitly closed. 2) owning document was destroyed. 3) owning document crashed. 4) port was garbage collected. Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y Explainer:https://github.com/fergald/explainer-messageport-close HTML spec PR:whatwg/html#9933 Bug: 1495616 Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 Reviewed-by: Jeremy Roman <jbromanchromium.org> Commit-Queue: Nonoka Muraki <murakinonokachromium.org> Reviewed-by: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1231743} -- wpt-commits: dd47f140612cef24b9e9c692e77b4d3aa5307279 wpt-pr: 43015 UltraBlame original commit: 9328f805d865217889e27a0183ae9e47665fbc36
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Revert "Dispatch close event when MessagePort is disentangled" This reverts commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0. Reason for revert: The tests newly added by the original CL are failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <jbromanchromium.org> > Commit-Queue: Nonoka Muraki <murakinonokachromium.org> > Reviewed-by: Ming-Ying Chung <mychchromium.org> > Cr-Commit-Position: refs/heads/main{#1231743} Bug: 1495616 Change-Id: Ib697597d6ab70a9a7bfc41a67dfc647698024a64 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5075742 Reviewed-by: Ming-Ying Chung <mychchromium.org> Commit-Queue: Hiroki Nakagawa <nhirokichromium.org> Owners-Override: Hiroki Nakagawa <nhirokichromium.org> Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main{#1231780} -- wpt-commits: 5d1c45f9f81c37c45e7acc351348cd6e9879597f wpt-pr: 43465 UltraBlame original commit: 725faaf34b655617d2433d4bd0ccb5948f7b6a66
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Reland "Dispatch close event when MessagePort is disentangled" This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview This is because the builder added in https://crrev.com/c/5005230 might be broken. Specifically, chrome-wpt builder cannot run GC(Bug: 1509657) and BFCache doesn't work on chrome-wpt builder(Bug: 1509303). I changed two tests expectations described below. ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <jbromanchromium.org> > Commit-Queue: Nonoka Muraki <murakinonokachromium.org> > Reviewed-by: Ming-Ying Chung <mychchromium.org> > Cr-Commit-Position: refs/heads/main{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5083156 Reviewed-by: Jeremy Roman <jbromanchromium.org> Commit-Queue: Nonoka Muraki <murakinonokachromium.org> Reviewed-by: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1234854} -- wpt-commits: 05aab53917a8309fe7f1ab5c50d094ac488ce942 wpt-pr: 43491 UltraBlame original commit: 44d41cbaf3e883d24936ac8be51e4e3be7e5efd0
…ePort is disentangled", a=testonly Automatic update from web-platform-tests Reland "Dispatch close event when MessagePort is disentangled" This is a reland of commit 6a74d3d8049e1744b862757a73f90f3d7a5e08b0 The tests newly added by the original CL were failing on chrome_wpt_tests on the Linux Tests bot: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/138259/overview This is because the builder added in https://crrev.com/c/5005230 might be broken. Specifically, chrome-wpt builder cannot run GC(Bug: 1509657) and BFCache doesn't work on chrome-wpt builder(Bug: 1509303). I changed two tests expectations described below. ・third_party/blink/web_tests/external/wpt/webmessaging/message-channels/close-event/garbage-collected.tentative.any.js ・third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/back-forward-cache/message-port-entangled-after-restore.https.tentative.window.js Original change's description: > Dispatch close event when MessagePort is disentangled > > We want to dispatch a close event when an entangled MessagePort is disconnected. > Given a pair of entangled ports, port1 and port2, if port2 is closed at any point, > a port1’s error handler is run. > So we can change an error handler to dispatch a close event. > > The tests of close event are as follows: > 1) port was explicitly closed. > 2) owning document was destroyed. > 3) owning document crashed. > 4) port was garbage collected. > > Design Doc:https://docs.google.com/document/d/1lXZU2Pk2ycitqj8aL9kxT2aauwXqpA0vJDUalkXA29Y > Explainer:https://github.com/fergald/explainer-messageport-close > HTML spec PR:whatwg/html#9933 > > Bug: 1495616 > Change-Id: I99f9f5a0d7cc63f0916da316ec666ba793215019 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5003089 > Reviewed-by: Jeremy Roman <[email protected]> > Commit-Queue: Nonoka Muraki <[email protected]> > Reviewed-by: Ming-Ying Chung <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1231743} Change-Id: I0a8f31245d7b5abe9ddfc262dff8063316e953df Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5083156 Reviewed-by: Jeremy Roman <[email protected]> Commit-Queue: Nonoka Muraki <[email protected]> Reviewed-by: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1234854} -- wpt-commits: 05aab53917a8309fe7f1ab5c50d094ac488ce942 wpt-pr: 43491
@domenic |
thank you for your comments! I fixed the description and wrap some lines. @domenic |
Great! I'm going to treat mozilla/standards-positions#914 as sufficient implementer support from Mozilla for the WHATWG process, and merge this momentarily. Please file implementer bugs and an MDN issue, then update the original post with links to them. I believe for this feature the implementers include Gecko and WebKit, but also Node.js and Deno. (It's OK to do this after merging.) |
This PR adds some steps to dispatch a close event of MessagePort API.
As discussed in #1766, there is currently no timely and reliable way to detect when a MessagePort becomes disentangled. This makes it difficult to release resources associated with ports.
So, we proposed adding a close event. For example, if there are two entangled ports, portA and portB, and portA is closed, the close event is fired on portB.
Please take a look @domenic @asutherland @annevk
/document-lifecycle.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/web-messaging.html ( diff )