Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d65334c

Browse filesBrowse files
Nahee-Parktargos
authored andcommitted
worker: throw InvalidStateError in postMessage after close
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>
1 parent 0412ac8 commit d65334c
Copy full SHA for d65334c

File tree

Expand file treeCollapse file tree

2 files changed

+1
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+1
-9
lines changed
Open diff view settings
Collapse file

‎lib/internal/worker/io.js‎

Copy file name to clipboardExpand all lines: lib/internal/worker/io.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class BroadcastChannel extends EventTarget {
402402
if (arguments.length === 0)
403403
throw new ERR_MISSING_ARGS('message');
404404
if (this[kHandle] === undefined)
405-
throw new DOMException('BroadcastChannel is closed.');
405+
throw new DOMException('BroadcastChannel is closed.', 'InvalidStateError');
406406
if (this[kHandle].postMessage(message) === undefined)
407407
throw new DOMException('Message could not be posted.');
408408
}
Collapse file

‎test/wpt/status/webmessaging/broadcastchannel.json‎

Copy file name to clipboardExpand all lines: test/wpt/status/webmessaging/broadcastchannel.json
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@
1010
]
1111
}
1212
},
13-
"interface.any.js": {
14-
"fail": {
15-
"expected": [
16-
"postMessage after close should throw",
17-
"postMessage should throw InvalidStateError after close, even with uncloneable data"
18-
]
19-
}
20-
},
2113
"origin.window.js": {
2214
"fail": {
2315
"expected": [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.