-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
messageerror event doesn't fire on ServiceWorkerGlobalScope #27974
messageerror event doesn't fire on ServiceWorkerGlobalScope #27974
Conversation
EWS run on previous version of this PR (hash 2b8ce58) |
2b8ce58
to
7f3055f
Compare
EWS run on previous version of this PR (hash 7f3055f) |
7f3055f
to
818c866
Compare
EWS run on previous version of this PR (hash 818c866) |
88a727b
to
63f08ca
Compare
EWS run on current version of this PR (hash 63f08ca) |
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
https://bugs.webkit.org/show_bug.cgi?id=272967 rdar://127104436 Reviewed by Chris Dumez. Like for messages on worker, we now deserialize the data just before firing the event. If deserialization fails, we use messageerror event, other wise we keep using message event. We update ExtendableMessageEvent to use a JSValueInWrappedObject instead of a SerializedScriptValue. This allows to store a JSValue, which also simplifies the custom binding. We reuse the same principle for the JS constructor. We continue using the custom constructor as we create the JS wrapper in ExtendableMessageEvent::create. * LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-serviceworker-failure.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/error-message-event-worker.js: Added. * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/error-message-event.https-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/error-message-event.https.html: Added. * LayoutTests/imported/w3c/web-platform-tests/wasm/serialization/module/window-serviceworker-failure.https-expected.txt: * Source/WebCore/bindings/js/JSExtendableMessageEventCustom.cpp: (WebCore::constructJSExtendableMessageEvent): (WebCore::JSExtendableMessageEvent::visitAdditionalChildren): (WebCore::JSExtendableMessageEvent::data const): Deleted. * Source/WebCore/workers/service/ExtendableMessageEvent.cpp: (WebCore::createWrapperAndSetData): (WebCore::ExtendableMessageEvent::create): (WebCore::ExtendableMessageEvent::ExtendableMessageEvent): * Source/WebCore/workers/service/ExtendableMessageEvent.h: * Source/WebCore/workers/service/ExtendableMessageEvent.idl: * Source/WebCore/workers/service/context/ServiceWorkerThread.cpp: (WebCore::fireMessageEvent): Canonical link: https://commits.webkit.org/278408@main
63f08ca
to
fddda89
Compare
Committed 278408@main (fddda89): https://commits.webkit.org/278408@main Reviewed commits have been landed. Closing PR #27974 and removing active labels. |
fddda89
63f08ca