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

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

Issue 1807323002: [WeakMemoryCache 1a] Make Reference from Inspector to Resource weak, remove removedFromMemoryCache() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 35e2f003e65d92010b6738bfba3d47434b7cce94..0b352e04df62c2b12f07ea2c32752bcbeb486906 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -57,6 +57,7 @@ class SharedBuffer;
// This class also does the actual communication with the loader to obtain the resource from the network.
class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource> {
WTF_MAKE_NONCOPYABLE(Resource);
+ USING_PRE_FINALIZER(Resource, willDestroyResource);
public:
enum Type {
MainResource,
@@ -90,7 +91,7 @@ public:
}
virtual ~Resource();
- virtual void removedFromMemoryCache();
+ void willDestroyResource();
DECLARE_VIRTUAL_TRACE();
void load(ResourceFetcher*);
@@ -264,6 +265,8 @@ protected:
void didRemoveClientOrObserver();
virtual void allClientsAndObserversRemoved();
+ virtual void willDestroyResourceInternal() { }
+
HashCountedSet<ResourceClient*> m_clients;
HashCountedSet<ResourceClient*> m_clientsAwaitingCallback;
HashCountedSet<ResourceClient*> m_finishedClients;

Powered by Google App Engine
This is Rietveld 408576698