Skip to content

Commit

Permalink
Add missing isolatedCopy() call in ServiceWorkerThreadProxy::fireMess…
Browse files Browse the repository at this point in the history
…ageEvent()

https://bugs.webkit.org/show_bug.cgi?id=273918

Reviewed by Brady Eidson.

ServiceWorkerThreadProxy::fireMessageEvent() is dispatching from the
WebSWContextManagerConnection queue to the ServiceWorker thread, yet, it was
failing to call isolatedCopy() on the ServiceWorkerOrClientData it is
capturing.

* Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::fireMessageEvent):

Canonical link: https://commits.webkit.org/278563@main
  • Loading branch information
cdumez committed May 9, 2024
1 parent df5bab1 commit d045dbe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void ServiceWorkerThreadProxy::fireMessageEvent(MessageWithMessagePorts&& messag
protectedThis->thread().willPostTaskToFireMessageEvent();
});

thread().runLoop().postTask([this, protectedThis = Ref { *this }, message = WTFMove(message), sourceData = WTFMove(sourceData)](auto&) mutable {
thread().runLoop().postTask([this, protectedThis = Ref { *this }, message = WTFMove(message), sourceData = crossThreadCopy(WTFMove(sourceData))](auto&) mutable {
thread().queueTaskToPostMessage(WTFMove(message), WTFMove(sourceData));
});
}
Expand Down

0 comments on commit d045dbe

Please sign in to comment.