| Index: Source/core/fetch/MemoryCache.h
|
| diff --git a/Source/core/fetch/MemoryCache.h b/Source/core/fetch/MemoryCache.h
|
| index e307ec372157e7ecd839788c453aa32d87b1eb08..47f203e4e06597edaeb4a1d53243e5928747e502 100644
|
| --- a/Source/core/fetch/MemoryCache.h
|
| +++ b/Source/core/fetch/MemoryCache.h
|
| @@ -197,6 +197,11 @@ public:
|
| void makeLive(Resource*);
|
| void makeDead(Resource*);
|
|
|
| + // This should be called when a Resource object is created.
|
| + void registerLiveResource(Resource&);
|
| + // This should be called when a Resource object becomes unnecesarry.
|
| + void unregisterLiveResource(Resource&);
|
| +
|
| static void removeURLFromCache(ExecutionContext*, const KURL&);
|
|
|
| Statistics getStatistics();
|
| @@ -274,6 +279,14 @@ private:
|
| typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<MemoryCacheEntry> > ResourceMap;
|
| ResourceMap m_resources;
|
|
|
| +#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;
|
| +#endif
|
| +
|
| friend class MemoryCacheTest;
|
| #ifdef MEMORY_CACHE_STATS
|
| Timer<MemoryCache> m_statsTimer;
|
|
|