Title: [220608] trunk/Source/WebCore
Revision
220608
Author
beid...@apple.com
Date
2017-08-11 13:37:51 -0700 (Fri, 11 Aug 2017)

Log Message

Crash under ServiceWorkerJob::failedWithException.
https://bugs.webkit.org/show_bug.cgi?id=175488

Reviewed by Tim Horton.

Covered by existing tests.

* workers/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (220607 => 220608)


--- trunk/Source/WebCore/ChangeLog	2017-08-11 20:36:46 UTC (rev 220607)
+++ trunk/Source/WebCore/ChangeLog	2017-08-11 20:37:51 UTC (rev 220608)
@@ -1,3 +1,15 @@
+2017-08-11  Brady Eidson  <beid...@apple.com>
+
+        Crash under ServiceWorkerJob::failedWithException.
+        https://bugs.webkit.org/show_bug.cgi?id=175488
+
+        Reviewed by Tim Horton.
+
+        Covered by existing tests.
+
+        * workers/ServiceWorkerJob.cpp:
+        (WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last.
+
 2017-08-10  Sam Weinig  <s...@webkit.org>
 
         WTF::Function does not allow for reference / non-default constructible return types

Modified: trunk/Source/WebCore/workers/ServiceWorkerJob.cpp (220607 => 220608)


--- trunk/Source/WebCore/workers/ServiceWorkerJob.cpp	2017-08-11 20:36:46 UTC (rev 220607)
+++ trunk/Source/WebCore/workers/ServiceWorkerJob.cpp	2017-08-11 20:37:51 UTC (rev 220608)
@@ -54,8 +54,10 @@
 
     ASSERT(!m_completed);
     m_promise->reject(WTFMove(exception));
+    m_completed = true;
+
+    // Can cause this to be deleted.
     m_client->jobDidFinish(*this);
-    m_completed = true;
 }
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to