Title: [229188] trunk/Source/WebKit
Revision
229188
Author
commit-qu...@webkit.org
Date
2018-03-02 14:10:17 -0800 (Fri, 02 Mar 2018)

Log Message

LayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=179248
<rdar://problem/35377756>

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

In case we go up to the initializeSize step and Caches was cleared
between the time we stated to initialize and the time we got there,
we need to make as if Caches was not initialized,
thus keeping m_isInitialized to false and m_storage to nullptr.

* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::initializeSize):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (229187 => 229188)


--- trunk/Source/WebKit/ChangeLog	2018-03-02 22:00:14 UTC (rev 229187)
+++ trunk/Source/WebKit/ChangeLog	2018-03-02 22:10:17 UTC (rev 229188)
@@ -1,5 +1,21 @@
 2018-03-02  Youenn Fablet  <you...@apple.com>
 
+        LayoutTest imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=179248
+        <rdar://problem/35377756>
+
+        Reviewed by Chris Dumez.
+
+        In case we go up to the initializeSize step and Caches was cleared
+        between the time we stated to initialize and the time we got there,
+        we need to make as if Caches was not initialized,
+        thus keeping m_isInitialized to false and m_storage to nullptr.
+
+        * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
+        (WebKit::CacheStorage::Caches::initializeSize):
+
+2018-03-02  Youenn Fablet  <you...@apple.com>
+
         Clients should register to StorageProcess with their service worker registration identifier
         https://bugs.webkit.org/show_bug.cgi?id=182313
         <rdar://problem/38044403>

Modified: trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp (229187 => 229188)


--- trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp	2018-03-02 22:00:14 UTC (rev 229187)
+++ trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp	2018-03-02 22:10:17 UTC (rev 229188)
@@ -189,6 +189,11 @@
     uint64_t size = 0;
     m_storage->traverse({ }, 0, [protectedThis = makeRef(*this), this, protectedStorage = makeRef(*m_storage), size](const auto* storage, const auto& information) mutable {
         if (!storage) {
+            if (m_pendingInitializationCallbacks.isEmpty()) {
+                // Caches was cleared so let's not get initialized.
+                m_storage = nullptr;
+                return;
+            }
             m_size = size;
             m_isInitialized = true;
             auto pendingCallbacks = WTFMove(m_pendingInitializationCallbacks);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to