CacheStorage Cache should not remove any disk entry when clearing its memory represen...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Dec 2017 23:17:56 +0000 (23:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Dec 2017 23:17:56 +0000 (23:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180546

Patch by Youenn Fablet <youenn@apple.com> on 2017-12-07
Reviewed by Brady Eidson.

* NetworkProcess/cache/CacheStorageEngineCache.cpp:
(WebKit::CacheStorage::Cache::clearMemoryRepresentation):

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

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp

index 046ffe9..3a60c09 100644 (file)
@@ -1,3 +1,13 @@
+2017-12-07  Youenn Fablet  <youenn@apple.com>
+
+        CacheStorage Cache should not remove any disk entry when clearing its memory representation
+        https://bugs.webkit.org/show_bug.cgi?id=180546
+
+        Reviewed by Brady Eidson.
+
+        * NetworkProcess/cache/CacheStorageEngineCache.cpp:
+        (WebKit::CacheStorage::Cache::clearMemoryRepresentation):
+
 2017-12-07  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [Cocoa] Add SPI to disallow user-installed fonts
index 7b3aaa2..69f7704 100644 (file)
@@ -121,11 +121,6 @@ void Cache::dispose()
 
 void Cache::clearMemoryRepresentation()
 {
-    for (auto& records : m_records.values()) {
-        for (auto& record : records)
-            removeRecordFromDisk(record);
-    }
-
     m_records = { };
     m_nextRecordIdentifier = 0;
     m_state = State::Uninitialized;