Title: [251152] trunk/Source/WebKit
Revision
251152
Author
you...@apple.com
Date
2019-10-15 13:13:39 -0700 (Tue, 15 Oct 2019)

Log Message

Scheduling a service worker job in server should wait for finishing the registration import
https://bugs.webkit.org/show_bug.cgi?id=202975

Reviewed by Chris Dumez.

* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::scheduleJobInServer):
We should not schedule a job until the registrations are fully imported.
Covered by ServiceWorkerBasic API test flakily hitting debug asserts.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (251151 => 251152)


--- trunk/Source/WebKit/ChangeLog	2019-10-15 19:29:24 UTC (rev 251151)
+++ trunk/Source/WebKit/ChangeLog	2019-10-15 20:13:39 UTC (rev 251152)
@@ -1,3 +1,15 @@
+2019-10-15  youenn fablet  <you...@apple.com>
+
+        Scheduling a service worker job in server should wait for finishing the registration import
+        https://bugs.webkit.org/show_bug.cgi?id=202975
+
+        Reviewed by Chris Dumez.
+
+        * WebProcess/Storage/WebSWClientConnection.cpp:
+        (WebKit::WebSWClientConnection::scheduleJobInServer):
+        We should not schedule a job until the registrations are fully imported.
+        Covered by ServiceWorkerBasic API test flakily hitting debug asserts.
+
 2019-10-15  Alex Christensen  <achristen...@webkit.org>
 
         Unreviewed, rolling out r251138.

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp (251151 => 251152)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp	2019-10-15 19:29:24 UTC (rev 251151)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp	2019-10-15 20:13:39 UTC (rev 251152)
@@ -73,7 +73,9 @@
 
 void WebSWClientConnection::scheduleJobInServer(const ServiceWorkerJobData& jobData)
 {
-    send(Messages::WebSWServerConnection::ScheduleJobInServer { jobData });
+    runOrDelayTaskForImport([this, jobData] {
+        send(Messages::WebSWServerConnection::ScheduleJobInServer { jobData });
+    });
 }
 
 void WebSWClientConnection::finishFetchingScriptInServer(const ServiceWorkerFetchResult& result)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to