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

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

Issue 1998073002: Move some ResourceClients for testing to Oilpan heap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/MockResourceClients.h
diff --git a/third_party/WebKit/Source/core/fetch/MockResourceClients.h b/third_party/WebKit/Source/core/fetch/MockResourceClients.h
index 49d0bb3e38e20397543c689e9c6a100122d2e0ce..4710a7f2a8320091af990301ceb0cce3a4463e78 100644
--- a/third_party/WebKit/Source/core/fetch/MockResourceClients.h
+++ b/third_party/WebKit/Source/core/fetch/MockResourceClients.h
@@ -38,7 +38,8 @@
namespace blink {
-class MockResourceClient : public ResourceClient {
+class MockResourceClient : public GarbageCollectedFinalized<MockResourceClient>, public ResourceClient {
+ USING_PRE_FINALIZER(MockResourceClient, dispose);
public:
explicit MockResourceClient(Resource*);
~MockResourceClient() override;
@@ -48,10 +49,12 @@ public:
virtual bool notifyFinishedCalled() const { return m_notifyFinishedCalled; }
virtual void removeAsClient();
+ virtual void dispose();
+
+ DECLARE_TRACE();
protected:
- // TODO(Oilpan): properly trace when ResourceClient is on the heap.
- UntracedMember<Resource> m_resource;
+ Member<Resource> m_resource;
bool m_notifyFinishedCalled;
};
@@ -68,6 +71,7 @@ public:
bool notifyFinishedCalled() const override;
void removeAsClient() override;
+ void dispose() override;
int imageChangedCount() const { return m_imageChangedCount; }

Powered by Google App Engine
This is Rietveld 408576698