| Index: Source/core/fetch/MemoryCache.h
|
| diff --git a/Source/core/fetch/MemoryCache.h b/Source/core/fetch/MemoryCache.h
|
| index 9dde27c88eafe9f6202fe6322c030b209b8f9a3f..830969bbb79bc145f0cc5f15a79eb8754bdea4ec 100644
|
| --- a/Source/core/fetch/MemoryCache.h
|
| +++ b/Source/core/fetch/MemoryCache.h
|
| @@ -73,16 +73,14 @@ enum UpdateReason {
|
| // MemoryCacheEntry class is used only in MemoryCache class, but we don't make
|
| // MemoryCacheEntry class an inner class of MemoryCache because of dependency
|
| // from MemoryCacheLRUList.
|
| -class MemoryCacheEntry final : public NoBaseWillBeGarbageCollectedFinalized<MemoryCacheEntry> {
|
| +class MemoryCacheEntry final : public GarbageCollectedFinalized<MemoryCacheEntry> {
|
| public:
|
| - static PassOwnPtrWillBeRawPtr<MemoryCacheEntry> create(Resource* resource)
|
| + static MemoryCacheEntry* create(Resource* resource)
|
| {
|
| - return adoptPtrWillBeNoop(new MemoryCacheEntry(resource));
|
| + return new MemoryCacheEntry(resource);
|
| }
|
| DECLARE_TRACE();
|
| -#if ENABLE(OILPAN)
|
| void dispose();
|
| -#endif
|
|
|
| ResourcePtr<Resource> m_resource;
|
| bool m_inLiveDecodedResourcesList;
|
| @@ -90,10 +88,10 @@ public:
|
| MemoryCacheLiveResourcePriority m_liveResourcePriority;
|
| double m_lastDecodedAccessTime; // Used as a thrash guard
|
|
|
| - RawPtrWillBeMember<MemoryCacheEntry> m_previousInLiveResourcesList;
|
| - RawPtrWillBeMember<MemoryCacheEntry> m_nextInLiveResourcesList;
|
| - RawPtrWillBeMember<MemoryCacheEntry> m_previousInAllResourcesList;
|
| - RawPtrWillBeMember<MemoryCacheEntry> m_nextInAllResourcesList;
|
| + Member<MemoryCacheEntry> m_previousInLiveResourcesList;
|
| + Member<MemoryCacheEntry> m_nextInLiveResourcesList;
|
| + Member<MemoryCacheEntry> m_previousInAllResourcesList;
|
| + Member<MemoryCacheEntry> m_nextInAllResourcesList;
|
|
|
| private:
|
| explicit MemoryCacheEntry(Resource* resource)
|
| @@ -118,8 +116,8 @@ WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry);
|
| struct MemoryCacheLRUList final {
|
| ALLOW_ONLY_INLINE_ALLOCATION();
|
| public:
|
| - RawPtrWillBeMember<MemoryCacheEntry> m_head;
|
| - RawPtrWillBeMember<MemoryCacheEntry> m_tail;
|
| + Member<MemoryCacheEntry> m_head;
|
| + Member<MemoryCacheEntry> m_tail;
|
|
|
| MemoryCacheLRUList() : m_head(nullptr), m_tail(nullptr) { }
|
| DECLARE_TRACE();
|
| @@ -131,10 +129,10 @@ WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::MemoryCacheLRUList);
|
|
|
| namespace blink {
|
|
|
| -class CORE_EXPORT MemoryCache final : public NoBaseWillBeGarbageCollectedFinalized<MemoryCache>, public WebThread::TaskObserver {
|
| - WTF_MAKE_NONCOPYABLE(MemoryCache); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(MemoryCache);
|
| +class CORE_EXPORT MemoryCache final : public GarbageCollectedFinalized<MemoryCache>, public WebThread::TaskObserver {
|
| + WTF_MAKE_NONCOPYABLE(MemoryCache);
|
| public:
|
| - static PassOwnPtrWillBeRawPtr<MemoryCache> create();
|
| + static MemoryCache* create();
|
| ~MemoryCache();
|
| DECLARE_TRACE();
|
|
|
| @@ -293,7 +291,7 @@ private:
|
| // Size-adjusted and popularity-aware LRU list collection for cache objects. This collection can hold
|
| // more resources than the cached resource map, since it can also hold "stale" multiple versions of objects that are
|
| // waiting to die when the clients referencing them go away.
|
| - WillBeHeapVector<MemoryCacheLRUList, 32> m_allResources;
|
| + HeapVector<MemoryCacheLRUList, 32> m_allResources;
|
|
|
| // Lists just for live resources with decoded data. Access to this list is based off of painting the resource.
|
| // The lists are ordered by decode priority, with higher indices having higher priorities.
|
| @@ -301,8 +299,8 @@ private:
|
|
|
| // A URL-based map of all resources that are in the cache (including the freshest version of objects that are currently being
|
| // referenced by a Web page).
|
| - using ResourceMap = WillBeHeapHashMap<String, OwnPtrWillBeMember<MemoryCacheEntry>>;
|
| - using ResourceMapIndex = WillBeHeapHashMap<String, OwnPtrWillBeMember<ResourceMap>>;
|
| + using ResourceMap = HeapHashMap<String, Member<MemoryCacheEntry>>;
|
| + using ResourceMapIndex = HeapHashMap<String, Member<ResourceMap>>;
|
| ResourceMap* ensureResourceMap(const String& cacheIdentifier);
|
| ResourceMapIndex m_resourceMaps;
|
|
|
| @@ -312,7 +310,7 @@ private:
|
| // objects.
|
| // FIXME: Can we remove manual lifetime management of Resource and this?
|
| HeapHashSet<Member<Resource>> m_liveResources;
|
| - friend CORE_EXPORT RawPtr<MemoryCache> replaceMemoryCacheForTesting(RawPtr<MemoryCache>);
|
| + friend CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*);
|
| #endif
|
|
|
| friend class MemoryCacheTest;
|
| @@ -326,7 +324,7 @@ CORE_EXPORT MemoryCache* memoryCache();
|
|
|
| // Sets the global cache, used to swap in a test instance. Returns the old
|
| // MemoryCache object.
|
| -CORE_EXPORT PassOwnPtrWillBeRawPtr<MemoryCache> replaceMemoryCacheForTesting(PassOwnPtrWillBeRawPtr<MemoryCache>);
|
| +CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*);
|
|
|
| }
|
|
|
|
|