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

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

Issue 2191633003: Move ResourceClient to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onheap-raw-resource-client
Patch Set: fix Created 4 years, 4 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
Index: third_party/WebKit/Source/core/fetch/Resource.h
diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h
index 471249d76b8b0c592d62abc1705f79024817585b..b5cd47a4495df8ff303683ac1b0ed88a13a52898 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -133,7 +133,6 @@ public:
void addClient(ResourceClient*);
void removeClient(ResourceClient*);
- virtual bool hasClientsOrObservers() const { return !m_clients.isEmpty() || !m_clientsAwaitingCallback.isEmpty() || !m_finishedClients.isEmpty(); }
enum PreloadResult {
PreloadNotReferenced,
@@ -223,6 +222,7 @@ public:
bool isPurgeable() const;
bool lock();
+ bool isAlive() const { return m_isAlive; }
void setCacheIdentifier(const String& cacheIdentifier) { m_cacheIdentifier = cacheIdentifier; }
String cacheIdentifier() const { return m_cacheIdentifier; }
@@ -249,6 +249,7 @@ protected:
virtual void checkNotify();
+ virtual bool hasClientsOrObservers() const { return !m_clients.isEmpty() || !m_clientsAwaitingCallback.isEmpty() || !m_finishedClients.isEmpty(); }
virtual void destroyDecodedDataForFailedRevalidation() { }
void setEncodedSize(size_t);
@@ -288,7 +289,7 @@ protected:
// Returns the memory dump name used for tracing. See Resource::onMemoryDump.
String getMemoryDumpName() const;
- const HashCountedSet<ResourceClient*>& clients() const { return m_clients; }
+ const HeapHashCountedSet<WeakMember<ResourceClient>>& clients() const { return m_clients; }
DataBufferingPolicy dataBufferingPolicy() const { return m_options.dataBufferingPolicy; }
void setCachePolicyBypassingCache();
@@ -344,13 +345,14 @@ private:
unsigned m_needsSynchronousCacheHit : 1;
unsigned m_linkPreload : 1;
bool m_isRevalidating : 1;
+ bool m_isAlive : 1;
// Ordered list of all redirects followed while fetching this resource.
Vector<RedirectPair> m_redirectChain;
- HashCountedSet<ResourceClient*> m_clients;
- HashCountedSet<ResourceClient*> m_clientsAwaitingCallback;
- HashCountedSet<ResourceClient*> m_finishedClients;
+ HeapHashCountedSet<WeakMember<ResourceClient>> m_clients;
+ HeapHashCountedSet<WeakMember<ResourceClient>> m_clientsAwaitingCallback;
+ HeapHashCountedSet<WeakMember<ResourceClient>> m_finishedClients;
ResourceLoaderOptions m_options;

Powered by Google App Engine
This is Rietveld 408576698