WebKit Bugzilla
Attachment 361982 Details for
Bug 188393
: ASSERTION FAILED: m_caches.isEmpty() || !m_pendingInitializationCallbacks.isEmpty() in WebKit::CacheStorage::Caches::clearMemoryRepresentation()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188393-20190213185700.patch (text/plain), 3.38 KB, created by
youenn fablet
on 2019-02-13 18:57:01 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-02-13 18:57:01 PST
Size:
3.38 KB
patch
obsolete
>Subversion Revision: 241453 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4b97c0ff8b8730e9f207b7f7eaf1cfb25d422a51..49b097bf41c3d1c456a83b125ab7b95979dfc8f4 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,21 @@ >+2019-02-13 Youenn Fablet <youenn@apple.com> >+ >+ ASSERTION FAILED: m_caches.isEmpty() || !m_pendingInitializationCallbacks.isEmpty() in WebKit::CacheStorage::Caches::clearMemoryRepresentation() >+ https://bugs.webkit.org/show_bug.cgi?id=188393 >+ <rdar://problem/43025665> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In case Caches::dispose is called, clearMemoryRepresentation might be called >+ if there is no active cache anymore. >+ Update the assertion to take that into account. >+ >+ * NetworkProcess/cache/CacheStorageEngineCaches.cpp: >+ (WebKit::CacheStorage::Caches::hasActiveCache const): >+ (WebKit::CacheStorage::Caches::dispose): >+ (WebKit::CacheStorage::Caches::clearMemoryRepresentation): >+ * NetworkProcess/cache/CacheStorageEngineCaches.h: >+ > 2019-02-13 Michael Catanzaro <mcatanzaro@igalia.com> > > Fix -Wformat warning from r241401 >diff --git a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp >index 1f608cf525f996b24ea4113600e8e29cb287c27c..f0c9fd5894a9df770243ebd14ab34821b5f00cfc 100644 >--- a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp >+++ b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp >@@ -343,6 +343,11 @@ void Caches::remove(uint64_t identifier, CacheIdentifierCallback&& callback) > }); > } > >+bool Caches::hasActiveCache() const >+{ >+ return m_caches.findMatching([](const auto& item) { return item.isActive(); }); >+} >+ > void Caches::dispose(Cache& cache) > { > auto position = m_removedCaches.findMatching([&](const auto& item) { return item.identifier() == cache.identifier(); }); >@@ -356,7 +361,7 @@ void Caches::dispose(Cache& cache) > ASSERT(m_caches.findMatching([&](const auto& item) { return item.identifier() == cache.identifier(); }) != notFound); > cache.clearMemoryRepresentation(); > >- if (m_caches.findMatching([](const auto& item) { return item.isActive(); }) == notFound) >+ if (!hasActiveCache()) > clearMemoryRepresentation(); > } > >@@ -594,7 +599,7 @@ void Caches::removeCacheEntry(const NetworkCache::Key& key) > void Caches::clearMemoryRepresentation() > { > if (!m_isInitialized) { >- ASSERT(m_caches.isEmpty() || !m_pendingInitializationCallbacks.isEmpty()); >+ ASSERT(!hasActiveCache() || !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; >diff --git a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h >index 489622ceed13bc5e83b5b91be824ab088eb614f6..8903aa0cfa03314d5b985100ad229ab5cd798878 100644 >--- a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h >+++ b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.h >@@ -96,6 +96,8 @@ private: > > void notifyCachesOfRequestSpaceEnd(); > >+ bool hasActiveCache() const; >+ > bool m_isInitialized { false }; > bool m_isRequestingSpace { false }; > Engine* m_engine { nullptr };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188393
:
346741
|
361982
|
361988