ASSERTION FAILED: taken.get() == &job in WebCore::ServiceWorkerContainer::jobDidFinis...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 23:59:21 +0000 (23:59 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 23:59:21 +0000 (23:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176234

Rubberstamped by Tim Horton, reluctantly.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobDidFinish): It's valid for the job to be missing after navigations, which is
  why this was hitting downstream tests.

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

Source/WebCore/ChangeLog
Source/WebCore/workers/service/ServiceWorkerContainer.cpp

index 7b544d6..9654b14 100644 (file)
@@ -1,3 +1,14 @@
+2017-09-01  Brady Eidson  <beidson@apple.com>
+
+        ASSERTION FAILED: taken.get() == &job in WebCore::ServiceWorkerContainer::jobDidFinish(WebCore::ServiceWorkerJob &).
+        https://bugs.webkit.org/show_bug.cgi?id=176234
+
+        Rubberstamped by Tim Horton, reluctantly.
+
+        * workers/service/ServiceWorkerContainer.cpp:
+        (WebCore::ServiceWorkerContainer::jobDidFinish): It's valid for the job to be missing after navigations, which is
+          why this was hitting downstream tests.
+
 2017-09-01  Youenn Fablet  <youenn@apple.com>
 
         Do not Reject CacheStorage promises when updating the persistent filesystem data fails
index 6cba549..c569bed 100644 (file)
@@ -215,7 +215,7 @@ void ServiceWorkerContainer::jobFailedLoadingScript(ServiceWorkerJob& job, const
 void ServiceWorkerContainer::jobDidFinish(ServiceWorkerJob& job)
 {
     auto taken = m_jobMap.take(job.data().identifier());
-    ASSERT_UNUSED(taken, taken.get() == &job);
+    ASSERT_UNUSED(taken, !taken || taken.get() == &job);
 }
 
 uint64_t ServiceWorkerContainer::connectionIdentifier()