forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=171216 rdar://96467919 Reviewed by Darin Adler. Implement messageerror event: - whatwg/html#2530 Previously, WebKit would fire a `message` event with its `data` being null, whenever data deserialization would fail. This wasn't as per specification and did not match other browser engines. We're supposed to fire a `messageerror` event instead. This patch addresses the issue. * LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/wasm/serialization/module/broadcastchannel-success-and-failure-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/wasm/serialization/module/window-sharedworker-failure-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror-expected.txt: * Source/WebCore/bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserialize): * Source/WebCore/bindings/js/SerializedScriptValue.h: * Source/WebCore/dom/BroadcastChannel.cpp: (WebCore::BroadcastChannel::dispatchMessage): * Source/WebCore/dom/MessageEvent.cpp: (WebCore::MessageEvent::create): * Source/WebCore/dom/MessageEvent.h: * Source/WebCore/dom/MessagePort.cpp: (WebCore::MessagePort::dispatchMessages): * Source/WebCore/dom/MessagePort.idl: * Source/WebCore/html/HTMLAttributeNames.in: * Source/WebCore/page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): * Source/WebCore/page/WindowEventHandlers.idl: * Source/WebCore/workers/DedicatedWorkerGlobalScope.idl: * Source/WebCore/workers/Worker.idl: * Source/WebCore/workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::postMessageToWorkerObject): (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope): * Source/WebCore/workers/service/ServiceWorkerContainer.cpp: (WebCore::ServiceWorkerContainer::startMessages): (WebCore::ServiceWorkerContainer::postMessage): * Source/WebCore/workers/service/ServiceWorkerContainer.h: * Source/WebCore/workers/service/context/ServiceWorkerThread.cpp: (WebCore::fireMessageEvent): Canonical link: https://commits.webkit.org/256896@main
- Loading branch information
Showing
25 changed files
with
138 additions
and
71 deletions.
There are no files selected for viewing
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
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
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
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
4 changes: 1 addition & 3 deletions
4
...latform-tests/wasm/serialization/module/broadcastchannel-success-and-failure-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT WebAssembly.Module cannot cross agent clusters, BroadcastChannel edition Test timed out | ||
PASS WebAssembly.Module cannot cross agent clusters, BroadcastChannel edition | ||
|
2 changes: 1 addition & 1 deletion
2
...w3c/web-platform-tests/wasm/serialization/module/window-sharedworker-failure-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL WebAssembly.Modules cannot cross agent clusters, shared worker edition assert_unreached: Reached unreachable code | ||
PASS WebAssembly.Modules cannot cross agent clusters, shared worker edition | ||
|
6 changes: 3 additions & 3 deletions
6
LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
FAIL The default value of onmessageerror is null assert_equals: body expected (object) null but got (undefined) undefined | ||
FAIL The onmessageerror content attribute must be compiled into the onmessageerror property assert_equals: The onmessageerror property must be a function expected "function" but got "undefined" | ||
FAIL The onmessageerror content attribute must execute when an event is dispatched on the window assert_true: Dispatching the event must run the code expected true got false | ||
PASS The default value of onmessageerror is null | ||
PASS The onmessageerror content attribute must be compiled into the onmessageerror property | ||
PASS The onmessageerror content attribute must execute when an event is dispatched on the window | ||
|
Oops, something went wrong.