Title: [242030] branches/safari-607-branch/Source/WebCore
Revision
242030
Author
[email protected]
Date
2019-02-24 20:47:34 -0800 (Sun, 24 Feb 2019)

Log Message

Cherry-pick r241986. rdar://problem/48350373

    Crash in SWServerJobQueue::runNextJobSynchronously
    https://bugs.webkit.org/show_bug.cgi?id=194974

    Reviewed by Geoffrey Garen.

    We suspect the crash is happening due to m_jobQueue being empty in runNextJobSynchronously
    or there is a timer heap corruption again :(

    Exit early when m_jobQueue is empty. Also add a debug assert that this should never happen
    but convert an existing release assert to a debug assert since this appears to be hitting
    too frequently in wild.

    * workers/service/server/SWServerJobQueue.cpp:
    (WebCore::SWServerJobQueue::runNextJobSynchronously):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241986 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (242029 => 242030)


--- branches/safari-607-branch/Source/WebCore/ChangeLog	2019-02-25 04:47:31 UTC (rev 242029)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog	2019-02-25 04:47:34 UTC (rev 242030)
@@ -1,5 +1,44 @@
 2019-02-24  Babak Shafiei  <[email protected]>
 
+        Cherry-pick r241986. rdar://problem/48350373
+
+    Crash in SWServerJobQueue::runNextJobSynchronously
+    https://bugs.webkit.org/show_bug.cgi?id=194974
+    
+    Reviewed by Geoffrey Garen.
+    
+    We suspect the crash is happening due to m_jobQueue being empty in runNextJobSynchronously
+    or there is a timer heap corruption again :(
+    
+    Exit early when m_jobQueue is empty. Also add a debug assert that this should never happen
+    but convert an existing release assert to a debug assert since this appears to be hitting
+    too frequently in wild.
+    
+    * workers/service/server/SWServerJobQueue.cpp:
+    (WebCore::SWServerJobQueue::runNextJobSynchronously):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-02-22  Ryosuke Niwa  <[email protected]>
+
+            Crash in SWServerJobQueue::runNextJobSynchronously
+            https://bugs.webkit.org/show_bug.cgi?id=194974
+
+            Reviewed by Geoffrey Garen.
+
+            We suspect the crash is happening due to m_jobQueue being empty in runNextJobSynchronously
+            or there is a timer heap corruption again :(
+
+            Exit early when m_jobQueue is empty. Also add a debug assert that this should never happen
+            but convert an existing release assert to a debug assert since this appears to be hitting
+            too frequently in wild.
+
+            * workers/service/server/SWServerJobQueue.cpp:
+            (WebCore::SWServerJobQueue::runNextJobSynchronously):
+
+2019-02-24  Babak Shafiei  <[email protected]>
+
         Cherry-pick r241967. rdar://problem/48350358
 
     Crash under IDBServer::IDBConnectionToClient::identifier() const

Modified: branches/safari-607-branch/Source/WebCore/workers/service/server/SWServerJobQueue.cpp (242029 => 242030)


--- branches/safari-607-branch/Source/WebCore/workers/service/server/SWServerJobQueue.cpp	2019-02-25 04:47:31 UTC (rev 242029)
+++ branches/safari-607-branch/Source/WebCore/workers/service/server/SWServerJobQueue.cpp	2019-02-25 04:47:34 UTC (rev 242030)
@@ -234,6 +234,10 @@
 
 void SWServerJobQueue::runNextJobSynchronously()
 {
+    ASSERT(!m_jobQueue.isEmpty());
+    if (m_jobQueue.isEmpty())
+        return;
+
     auto& job = firstJob();
     switch (job.type) {
     case ServiceWorkerJobType::Register:
@@ -247,7 +251,7 @@
         return;
     }
 
-    RELEASE_ASSERT_NOT_REACHED();
+    ASSERT_NOT_REACHED();
 }
 
 // https://w3c.github.io/ServiceWorker/#register-algorithm
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to