Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fddda893fc92edb8d258d2b12b126db11c3ba264
      
https://github.com/WebKit/WebKit/commit/fddda893fc92edb8d258d2b12b126db11c3ba264
  Author: Youenn Fablet <you...@apple.com>
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-serviceworker-failure.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/error-message-event-worker.js
    A 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/error-message-event.https-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/error-message-event.https.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/serialization/module/window-serviceworker-failure.https-expected.txt
    M Source/WebCore/bindings/js/JSExtendableMessageEventCustom.cpp
    M Source/WebCore/workers/service/ExtendableMessageEvent.cpp
    M Source/WebCore/workers/service/ExtendableMessageEvent.h
    M Source/WebCore/workers/service/ExtendableMessageEvent.idl
    M Source/WebCore/workers/service/context/ServiceWorkerThread.cpp

  Log Message:
  -----------
  messageerror event doesn't fire on ServiceWorkerGlobalScope
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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to