Title: [229914] trunk/Source/WebKit
- Revision
- 229914
- Author
- [email protected]
- Date
- 2018-03-23 12:54:01 -0700 (Fri, 23 Mar 2018)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (229913 => 229914)
--- trunk/Source/WebKit/ChangeLog 2018-03-23 19:06:35 UTC (rev 229913)
+++ trunk/Source/WebKit/ChangeLog 2018-03-23 19:54:01 UTC (rev 229914)
@@ -1,3 +1,16 @@
+2018-03-23 Youenn Fablet <[email protected]>
+
+ 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.
+
2018-03-23 David Kilzer <[email protected]>
Stop using dispatch_set_target_queue()
Modified: trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp (229913 => 229914)
--- trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp 2018-03-23 19:06:35 UTC (rev 229913)
+++ trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp 2018-03-23 19:54:01 UTC (rev 229914)
@@ -548,8 +548,9 @@
void Caches::clearMemoryRepresentation()
{
if (!m_isInitialized) {
- ASSERT(m_caches.isEmpty());
+ ASSERT(m_caches.isEmpty() || !m_pendingInitializationCallbacks.isEmpty());
// m_storage might not be null in case Caches is being initialized. This is fine as nullify it below is a memory optimization.
+ m_caches.clear();
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes