Title: [259460] trunk/Source/WebKit
Revision
259460
Author
[email protected]
Date
2020-04-03 08:21:27 -0700 (Fri, 03 Apr 2020)

Log Message

ServiceWorkerFetchTask::timeoutTimerFired should not call contextClosed
https://bugs.webkit.org/show_bug.cgi?id=209906
<rdar://problem/61207801>

Reviewed by Chris Dumez.

Covered by http/tests/workers/service/basic-timeout.https.html no longer crashing.

* NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::timeoutTimerFired):
We should not call contextClosed now that we are nullying m_swServerConnection in contextClosed.
Instead, we should just call cannotHandle since the timer can only fire if we have not yet received any response.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (259459 => 259460)


--- trunk/Source/WebKit/ChangeLog	2020-04-03 14:57:16 UTC (rev 259459)
+++ trunk/Source/WebKit/ChangeLog	2020-04-03 15:21:27 UTC (rev 259460)
@@ -1,3 +1,18 @@
+2020-04-03  youenn fablet  <[email protected]>
+
+        ServiceWorkerFetchTask::timeoutTimerFired should not call contextClosed
+        https://bugs.webkit.org/show_bug.cgi?id=209906
+        <rdar://problem/61207801>
+
+        Reviewed by Chris Dumez.
+
+        Covered by http/tests/workers/service/basic-timeout.https.html no longer crashing.
+
+        * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
+        (WebKit::ServiceWorkerFetchTask::timeoutTimerFired):
+        We should not call contextClosed now that we are nullying m_swServerConnection in contextClosed.
+        Instead, we should just call cannotHandle since the timer can only fire if we have not yet received any response.
+
 2020-04-03  Adrian Perez de Castro  <[email protected]>
 
         Unreviewed fix after r259382

Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp (259459 => 259460)


--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp	2020-04-03 14:57:16 UTC (rev 259459)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp	2020-04-03 15:21:27 UTC (rev 259460)
@@ -247,12 +247,14 @@
 
 void ServiceWorkerFetchTask::timeoutTimerFired()
 {
+    ASSERT(!m_isDone);
+    ASSERT(!m_wasHandled);
+    RELEASE_LOG_ERROR_IF_ALLOWED("timeoutTimerFired: (hasServiceWorkerConnection=%d)", !!m_serviceWorkerConnection);
+
     softUpdateIfNeeded();
 
-    RELEASE_LOG_ERROR_IF_ALLOWED("timeoutTimerFired: (hasServiceWorkerConnection=%d)", !!m_serviceWorkerConnection);
+    cannotHandle();
 
-    contextClosed();
-
     if (m_swServerConnection)
         m_swServerConnection->fetchTaskTimedOut(serviceWorkerIdentifier());
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to