CacheStorage::Caches should clear m_caches when clearing its representation even...
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 19:54:01 +0000 (19:54 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2018 19:54:01 +0000 (19:54 +0000)
commitdf04afa4017bd76058657f39a73fee5468177c68
tree1628220f7476fc546b2947fdfa3923456b656cb5
parentc1f5f02f7f627a52d56d76d323bef2fed0205439
CacheStorage::Caches should clear m_caches when clearing its representation even though it is not yet initialized
https://bugs.webkit.org/show_bug.cgi?id=183945

Reviewed by Chris Dumez.

* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::clearMemoryRepresentation):
In case we clear Caches in the middle of the initialization, m_caches might not be empty
but m_isInitialized is not yet set to true since we are computing the Caches size.
Update the assertion and clear m_caches in that case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp