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

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

Issue 1667843003: Make Resource RefCountedWillBeGarbageCollectedFinalized, attempt #2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + address review comments Created 4 years, 10 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
Index: third_party/WebKit/Source/core/fetch/MemoryCache.h
diff --git a/third_party/WebKit/Source/core/fetch/MemoryCache.h b/third_party/WebKit/Source/core/fetch/MemoryCache.h
index 43739bb57f0b02f5bd84f7bf2ca57a4eb985f0ae..987666f06a05396f5708b66687cb3e08f9e9c361 100644
--- a/third_party/WebKit/Source/core/fetch/MemoryCache.h
+++ b/third_party/WebKit/Source/core/fetch/MemoryCache.h
@@ -27,7 +27,6 @@
#include "core/CoreExport.h"
#include "core/fetch/Resource.h"
-#include "core/fetch/ResourcePtr.h"
#include "public/platform/WebMemoryDumpProvider.h"
#include "public/platform/WebThread.h"
#include "wtf/Allocator.h"
@@ -84,7 +83,7 @@ public:
DECLARE_TRACE();
void dispose();
- ResourcePtr<Resource> m_resource;
+ RefPtrWillBeMember<Resource> m_resource;
bool m_inLiveDecodedResourcesList;
unsigned m_accessCount;
MemoryCacheLiveResourcePriority m_liveResourcePriority;
@@ -273,7 +272,7 @@ private:
void pruneLiveResources(PruneStrategy);
void pruneNow(double currentTime, PruneStrategy);
- bool evict(MemoryCacheEntry*);
+ void evict(MemoryCacheEntry*);
MemoryCacheEntry* getEntryForResource(const Resource*) const;
@@ -311,15 +310,6 @@ private:
ResourceMap* ensureResourceMap(const String& cacheIdentifier);
ResourceMapIndex m_resourceMaps;
-#if ENABLE(OILPAN)
- // Unlike m_allResources, m_liveResources is a set of Resource objects which
- // should not be deleted. m_allResources only contains on-cache Resource
- // objects.
- // FIXME: Can we remove manual lifetime management of Resource and this?
- HeapHashSet<Member<Resource>> m_liveResources;
- friend CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*);
-#endif
-
friend class MemoryCacheTest;
#ifdef MEMORY_CACHE_STATS
Timer<MemoryCache> m_statsTimer;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp ('k') | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698