Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Unified Diff: third_party/WebKit/Source/core/fetch/MemoryCache.cpp

Issue 2110683005: Revert of [WeakMemoryCache] Remove Resource from MemoryCache just before destructed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/MemoryCache.cpp
diff --git a/third_party/WebKit/Source/core/fetch/MemoryCache.cpp b/third_party/WebKit/Source/core/fetch/MemoryCache.cpp
index 925962d2e82aee962489dfa50439bf63dd3e1cdf..8aad84ef9bff434fae49d13d63ca1421cd1fa296 100644
--- a/third_party/WebKit/Source/core/fetch/MemoryCache.cpp
+++ b/third_party/WebKit/Source/core/fetch/MemoryCache.cpp
@@ -79,19 +79,11 @@
DEFINE_TRACE(MemoryCacheEntry)
{
visitor->trace(m_resource);
- visitor->template registerWeakMembers<MemoryCacheEntry, &MemoryCacheEntry::clearResourceWeak>(this);
+ visitor->trace(m_resourceWeak);
visitor->trace(m_previousInLiveResourcesList);
visitor->trace(m_nextInLiveResourcesList);
visitor->trace(m_previousInAllResourcesList);
visitor->trace(m_nextInAllResourcesList);
-}
-
-void MemoryCacheEntry::clearResourceWeak(Visitor* visitor)
-{
- if (!m_resourceWeak || ThreadHeap::isHeapObjectAlive(m_resourceWeak))
- return;
- memoryCache()->remove(m_resourceWeak.get());
- m_resourceWeak.clear();
}
void MemoryCacheEntry::dispose()
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698