Title: [228924] trunk/Source/WebCore
Revision
228924
Author
commit-qu...@webkit.org
Date
2018-02-22 10:48:34 -0800 (Thu, 22 Feb 2018)

Log Message

WorkerCacheStorageConnection::doRemove can assert in case two frames try to delete the same cache at the same time
https://bugs.webkit.org/show_bug.cgi?id=183041

Patch by Youenn Fablet <you...@apple.com> on 2018-02-22
Reviewed by Chris Dumez.

* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::WorkerCacheStorageConnection::doRemove): Update the assertion to accept the
case of an already deleted cache, i.e. returned identifer is 0.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228923 => 228924)


--- trunk/Source/WebCore/ChangeLog	2018-02-22 18:32:43 UTC (rev 228923)
+++ trunk/Source/WebCore/ChangeLog	2018-02-22 18:48:34 UTC (rev 228924)
@@ -1,3 +1,14 @@
+2018-02-22  Youenn Fablet  <you...@apple.com>
+
+        WorkerCacheStorageConnection::doRemove can assert in case two frames try to delete the same cache at the same time
+        https://bugs.webkit.org/show_bug.cgi?id=183041
+
+        Reviewed by Chris Dumez.
+
+        * Modules/cache/WorkerCacheStorageConnection.cpp:
+        (WebCore::WorkerCacheStorageConnection::doRemove): Update the assertion to accept the
+        case of an already deleted cache, i.e. returned identifer is 0.
+
 2018-02-22  Alejandro G. Castro  <a...@igalia.com>
 
         Remove some code leftovers in LibWebRTCMediaEndpoint and RealtimeOutgoingVideoSource classes

Modified: trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp (228923 => 228924)


--- trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp	2018-02-22 18:32:43 UTC (rev 228923)
+++ trunk/Source/WebCore/Modules/cache/WorkerCacheStorageConnection.cpp	2018-02-22 18:48:34 UTC (rev 228924)
@@ -124,7 +124,7 @@
 {
     callOnMainThread([workerThread = makeRef(m_scope.thread()), mainThreadConnection = m_mainThreadConnection, requestIdentifier, cacheIdentifier] () mutable {
         mainThreadConnection->remove(cacheIdentifier, [workerThread = WTFMove(workerThread), requestIdentifier, cacheIdentifier] (const CacheIdentifierOrError& result) mutable {
-            ASSERT_UNUSED(cacheIdentifier, !result.has_value() || result.value().identifier == cacheIdentifier);
+            ASSERT_UNUSED(cacheIdentifier, !result.has_value() || !result.value().identifier || result.value().identifier == cacheIdentifier);
             workerThread->runLoop().postTaskForMode([requestIdentifier, result] (auto& scope) mutable {
                 downcast<WorkerGlobalScope>(scope).cacheStorageConnection().removeCompleted(requestIdentifier, result);
             }, WorkerRunLoop::defaultMode());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to