Title: [294482] trunk/Source/WebCore/workers/service/context/SWContextManager.cpp
- Revision
- 294482
- Author
- [email protected]
- Date
- 2022-05-19 08:28:47 -0700 (Thu, 19 May 2022)
Log Message
REGRESSION (250635@main): TestWebKitAPI.PushAPI.pushEventsAndInspectedServiceWorker is failing
https://bugs.webkit.org/show_bug.cgi?id=240612
rdar://problem/93537478
Patch by Youenn Fablet <[email protected]> on 2022-05-19
Reviewed by Chris Dumez.
The test was failing as the injection of internals in a ServiceWorkerGlobalScope might happen after firing a push event.
To prevent this, we now do the injection by posting a task to the service worker right after starting the service worker thread
instead of after the script has been executed.
* Source/WebCore/workers/service/context/SWContextManager.cpp:
Canonical link: https://commits.webkit.org/250741@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/workers/service/context/SWContextManager.cpp (294481 => 294482)
--- trunk/Source/WebCore/workers/service/context/SWContextManager.cpp 2022-05-19 15:13:42 UTC (rev 294481)
+++ trunk/Source/WebCore/workers/service/context/SWContextManager.cpp 2022-05-19 15:28:47 UTC (rev 294482)
@@ -62,12 +62,12 @@
threadProxy->thread().start([jobDataIdentifier, serviceWorkerIdentifier](const String& exceptionMessage, bool doesHandleFetch) {
SWContextManager::singleton().startedServiceWorker(jobDataIdentifier, serviceWorkerIdentifier, exceptionMessage, doesHandleFetch);
});
+ if (m_serviceWorkerCreationCallback)
+ m_serviceWorkerCreationCallback(serviceWorkerIdentifier.toUInt64());
}
void SWContextManager::startedServiceWorker(std::optional<ServiceWorkerJobDataIdentifier> jobDataIdentifier, ServiceWorkerIdentifier serviceWorkerIdentifier, const String& exceptionMessage, bool doesHandleFetch)
{
- if (m_serviceWorkerCreationCallback)
- m_serviceWorkerCreationCallback(serviceWorkerIdentifier.toUInt64());
if (!exceptionMessage.isEmpty()) {
connection()->serviceWorkerFailedToStart(jobDataIdentifier, serviceWorkerIdentifier, exceptionMessage);
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes