-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
BroadcastChannel: Ignore messages from detached iframes / closing workers #7296
Conversation
For BroadcastChannel instances associated with detached iframes or closing workers, update the specification to mention that calls to postMessage should be ignored without throwing an exception.
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.
LGTM with nit. This also makes calling postMessage()
while in bfcache a no-op, but I think that is not really observable today so it should be fine and not require any additional tests.
(Details: The only way I can think of to call postMessage()
from a bfcached page is to get a reference to a BroadcastChannel
from that global before the page enters bfcache, then after it enters bfcache call broadcastChannel.postMessage()
"from the outside". However, browsers don't let you bfcache iframes or windows with an opener today, from what I understand. So there is no way to get such a reference.)
Also once this is merged (or even before since it looks like we have consensus) please remember to remove the |
Thanks for the review, @domenic. I'll submit a CL today that removes tentative from the test file names. |
Awesome! I will give this ~24 hours in case anyone from #7219 wants to take a look (/cc @wanderview @asutherland @cdumez) but it looks great. Special congrats on this being your first contribution; it's very clean! |
I also like this very much, thank you! |
The spec is being updated [1] to indicate that messages from BroadcastChannel instances associated with detached iframe / closed worker contexts should be ignored, which means that these tests no longer need to be marked 'tentative'. Note that this CL doesn't introduce any changes to the tests. [1] whatwg/html#7296 Bug: 1239274 Change-Id: I3e506493175b5e22913c35510454e8bef5f1e5e8
The spec is being updated [1] to indicate that messages from BroadcastChannel instances associated with detached iframe / closed worker contexts should be ignored, which means that these tests no longer need to be marked 'tentative'. Note that this CL doesn't introduce any changes to the tests. [1] whatwg/html#7296 Bug: 1239274 Change-Id: I3e506493175b5e22913c35510454e8bef5f1e5e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259423 Commit-Queue: Ben Kelly <[email protected]> Auto-Submit: Andrew Williams <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Cr-Commit-Position: refs/heads/main@{#938781}
The spec is being updated [1] to indicate that messages from BroadcastChannel instances associated with detached iframe / closed worker contexts should be ignored, which means that these tests no longer need to be marked 'tentative'. Note that this CL doesn't introduce any changes to the tests. [1] whatwg/html#7296 Bug: 1239274 Change-Id: I3e506493175b5e22913c35510454e8bef5f1e5e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259423 Commit-Queue: Ben Kelly <[email protected]> Auto-Submit: Andrew Williams <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Cr-Commit-Position: refs/heads/main@{#938781}
… closed worker tests permanent, a=testonly Automatic update from web-platform-tests BroadcastChannel: Make detached iframe / closed worker tests permanent The spec is being updated [1] to indicate that messages from BroadcastChannel instances associated with detached iframe / closed worker contexts should be ignored, which means that these tests no longer need to be marked 'tentative'. Note that this CL doesn't introduce any changes to the tests. [1] whatwg/html#7296 Bug: 1239274 Change-Id: I3e506493175b5e22913c35510454e8bef5f1e5e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259423 Commit-Queue: Ben Kelly <[email protected]> Auto-Submit: Andrew Williams <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Cr-Commit-Position: refs/heads/main@{#938781} -- wpt-commits: 74a7f0ac9da8a098c16e421de381d5bcc1c3b5f7 wpt-pr: 31513
… closed worker tests permanent, a=testonly Automatic update from web-platform-tests BroadcastChannel: Make detached iframe / closed worker tests permanent The spec is being updated [1] to indicate that messages from BroadcastChannel instances associated with detached iframe / closed worker contexts should be ignored, which means that these tests no longer need to be marked 'tentative'. Note that this CL doesn't introduce any changes to the tests. [1] whatwg/html#7296 Bug: 1239274 Change-Id: I3e506493175b5e22913c35510454e8bef5f1e5e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259423 Commit-Queue: Ben Kelly <[email protected]> Auto-Submit: Andrew Williams <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Cr-Commit-Position: refs/heads/main@{#938781} -- wpt-commits: 74a7f0ac9da8a098c16e421de381d5bcc1c3b5f7 wpt-pr: 31513
The spec is being updated [1] to indicate that messages from BroadcastChannel instances associated with detached iframe / closed worker contexts should be ignored, which means that these tests no longer need to be marked 'tentative'. Note that this CL doesn't introduce any changes to the tests. [1] whatwg/html#7296 Bug: 1239274 Change-Id: I3e506493175b5e22913c35510454e8bef5f1e5e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259423 Commit-Queue: Ben Kelly <[email protected]> Auto-Submit: Andrew Williams <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Cr-Commit-Position: refs/heads/main@{#938781}
The spec is being updated [1] to indicate that messages from BroadcastChannel instances associated with detached iframe / closed worker contexts should be ignored, which means that these tests no longer need to be marked 'tentative'. Note that this CL doesn't introduce any changes to the tests. [1] whatwg/html#7296 Bug: 1239274 Change-Id: I3e506493175b5e22913c35510454e8bef5f1e5e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259423 Commit-Queue: Ben Kelly <[email protected]> Auto-Submit: Andrew Williams <[email protected]> Reviewed-by: Ben Kelly <[email protected]> Cr-Commit-Position: refs/heads/main@{#938781} NOKEYCHECK=True GitOrigin-RevId: f49494ed94e1a04b376707b3858c7c2b970e1148
For BroadcastChannel instances associated with detached iframes or closing workers, update the specification to mention that calls to postMessage should be ignored without throwing an exception.
This update should align with the consensus from #7219 regarding how to handle these two cases.
/acknowledgements.html ( diff )
/web-messaging.html ( diff )