-
Notifications
You must be signed in to change notification settings - Fork 29.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
worker: handle invalid BroadcastChannel postMessage after close #55206
Merged
nodejs-github-bot
merged 1 commit into
nodejs:main
from
Nahee-Park:fix-worker-broadcastchannel
Oct 3, 2024
Merged
worker: handle invalid BroadcastChannel postMessage after close #55206
nodejs-github-bot
merged 1 commit into
nodejs:main
from
Nahee-Park:fix-worker-broadcastchannel
Oct 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review requested:
|
nodejs-github-bot
added
needs-ci
PRs that need a full CI run.
worker
Issues and PRs related to Worker support.
labels
Oct 1, 2024
Nahee-Park
force-pushed
the
fix-worker-broadcastchannel
branch
2 times, most recently
from
October 1, 2024 02:37
15609e9
to
01ff3e2
Compare
This update addresses expected failures for invalid postMessage after close in WPT.
Nahee-Park
force-pushed
the
fix-worker-broadcastchannel
branch
from
October 1, 2024 02:40
01ff3e2
to
f629e53
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55206 +/- ##
==========================================
+ Coverage 88.23% 88.39% +0.15%
==========================================
Files 651 652 +1
Lines 183863 186565 +2702
Branches 35824 36042 +218
==========================================
+ Hits 162235 164915 +2680
+ Misses 14932 14910 -22
- Partials 6696 6740 +44
|
MattiasBuelens
approved these changes
Oct 1, 2024
RedYetiDev
added
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
request-ci
Add this label to start a Jenkins CI on a PR.
labels
Oct 1, 2024
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Oct 1, 2024
KhafraDev
approved these changes
Oct 1, 2024
@@ -402,7 +402,7 @@ class BroadcastChannel extends EventTarget { | |||
if (arguments.length === 0) | |||
throw new ERR_MISSING_ARGS('message'); | |||
if (this[kHandle] === undefined) | |||
throw new DOMException('BroadcastChannel is closed.'); | |||
throw new DOMException('BroadcastChannel is closed.', 'InvalidStateError'); | |||
if (this[kHandle].postMessage(message) === undefined) | |||
throw new DOMException('Message could not be posted.'); |
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.
side note: this looks fishy too
KhafraDev
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Oct 1, 2024
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Oct 3, 2024
Landed in 6b9413e |
targos
pushed a commit
that referenced
this pull request
Oct 4, 2024
This update addresses expected failures for invalid postMessage after close in WPT. PR-URL: #55206 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
targos
pushed a commit
that referenced
this pull request
Oct 4, 2024
This update addresses expected failures for invalid postMessage after close in WPT. PR-URL: #55206 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Merged
louwers
pushed a commit
to louwers/node
that referenced
this pull request
Nov 2, 2024
This update addresses expected failures for invalid postMessage after close in WPT. PR-URL: nodejs#55206 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
marco-ippolito
pushed a commit
that referenced
this pull request
Nov 16, 2024
This update addresses expected failures for invalid postMessage after close in WPT. PR-URL: #55206 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
marco-ippolito
pushed a commit
that referenced
this pull request
Nov 17, 2024
This update addresses expected failures for invalid postMessage after close in WPT. PR-URL: #55206 Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
needs-ci
PRs that need a full CI run.
worker
Issues and PRs related to Worker support.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Align BroadcastChannel behavior with spec by throwing an InvalidStateError when postMessage is called after the channel is closed. This ensures that the BroadcastChannel properly handles closed states and throws the appropriate error for postMessage attempts.
This update addresses expected failures for invalid postMessage after close in WPT.