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

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

Issue 1915113005: [WeakMemoryCache] Field-Trial: Make Reference from MemoryCache to Resource weak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@MemoryCache_1b0
Patch Set: Rebase. Created 4 years, 7 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 | « content/public/common/content_features.cc ('k') | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c2c9f8a6f83caef6f461b25af780c754abffad19..784f3e8148789c1e5228a7078a1e15b8d8e622c5 100644
--- a/third_party/WebKit/Source/core/fetch/MemoryCache.h
+++ b/third_party/WebKit/Source/core/fetch/MemoryCache.h
@@ -86,19 +86,15 @@ public:
Member<MemoryCacheEntry> m_nextInAllResourcesList;
private:
- explicit MemoryCacheEntry(Resource* resource)
- : m_inLiveDecodedResourcesList(false)
- , m_accessCount(0)
- , m_lastDecodedAccessTime(0.0)
- , m_previousInLiveResourcesList(nullptr)
- , m_nextInLiveResourcesList(nullptr)
- , m_previousInAllResourcesList(nullptr)
- , m_nextInAllResourcesList(nullptr)
- , m_resource(resource)
- {
- }
+ explicit MemoryCacheEntry(Resource*);
+ // Only one of |m_resource| or |m_resourceWeak| is used, based on
+ // RuntimeEnabledFeatures::weakMemoryCacheEnabled().
+ // TODO(hiroshige): this switching mechanism is added for a field trial
+ // for Weak MemoryCache (https://crbug.com/603462) and should be reverted
+ // at least before going stable.
Member<Resource> m_resource;
+ WeakMember<Resource> m_resourceWeak;
};
WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry);
« no previous file with comments | « content/public/common/content_features.cc ('k') | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698