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

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: Remove some comments 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
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 78ab561c297aad02c79bd24f27af5620ec29edd5..513730d941971a3a04dd1c3115aee15aadaa166e 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*);
@@ -263,6 +264,8 @@ protected:
void didRemoveClientOrObserver();
virtual void allClientsAndObserversRemoved();
+ virtual void willDestroyResourceInternal() { }
+
HashCountedSet<ResourceClient*> m_clients;
HashCountedSet<ResourceClient*> m_clientsAwaitingCallback;
HashCountedSet<ResourceClient*> m_finishedClients;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698