Chromium Code Reviews| 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*); |
|
haraken
2014/07/28 07:43:52
Just help me understand: Do we need to distinguish
tkent
2014/07/28 08:14:19
'Live' / 'Dead' in these functions mean 'has one o
|
| + // 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; |