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

Side by Side Diff: third_party/WebKit/Source/core/fetch/MemoryCache.h

Issue 2296913003: [WeakMemoryCache] Make references from MemoryCache to Resource Weak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WeakMemoryCache_RemoveStats
Patch Set: Assume resource is always non-null Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org>
4 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 4 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 , m_accessCount(0) 89 , m_accessCount(0)
90 , m_lastDecodedAccessTime(0.0) 90 , m_lastDecodedAccessTime(0.0)
91 , m_previousInLiveResourcesList(nullptr) 91 , m_previousInLiveResourcesList(nullptr)
92 , m_nextInLiveResourcesList(nullptr) 92 , m_nextInLiveResourcesList(nullptr)
93 , m_previousInAllResourcesList(nullptr) 93 , m_previousInAllResourcesList(nullptr)
94 , m_nextInAllResourcesList(nullptr) 94 , m_nextInAllResourcesList(nullptr)
95 , m_resource(resource) 95 , m_resource(resource)
96 { 96 {
97 } 97 }
98 98
99 Member<Resource> m_resource; 99 void clearResourceWeak(Visitor*);
100
101 WeakMember<Resource> m_resource;
100 }; 102 };
101 103
102 WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry); 104 WILL_NOT_BE_EAGERLY_TRACED_CLASS(MemoryCacheEntry);
103 105
104 // MemoryCacheLRUList is used only in MemoryCache class, but we don't make 106 // MemoryCacheLRUList is used only in MemoryCache class, but we don't make
105 // MemoryCacheLRUList an inner struct of MemoryCache because we can't define 107 // MemoryCacheLRUList an inner struct of MemoryCache because we can't define
106 // VectorTraits for inner structs. 108 // VectorTraits for inner structs.
107 struct MemoryCacheLRUList final { 109 struct MemoryCacheLRUList final {
108 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 110 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
109 public: 111 public:
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // Returns the global cache. 298 // Returns the global cache.
297 CORE_EXPORT MemoryCache* memoryCache(); 299 CORE_EXPORT MemoryCache* memoryCache();
298 300
299 // Sets the global cache, used to swap in a test instance. Returns the old 301 // Sets the global cache, used to swap in a test instance. Returns the old
300 // MemoryCache object. 302 // MemoryCache object.
301 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); 303 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*);
302 304
303 } // namespace blink 305 } // namespace blink
304 306
305 #endif 307 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698