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

Unified Diff: Source/core/html/canvas/WebGLExtension.h

Issue 365653002: Oilpan: move 2D Canvas and WebGL objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Smaller adjustments Created 6 years, 5 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: Source/core/html/canvas/WebGLExtension.h
diff --git a/Source/core/html/canvas/WebGLExtension.h b/Source/core/html/canvas/WebGLExtension.h
index bf36c50ddb92eea128cd3271f1b9da51d562e1d3..474f500d141fdb2fa9579af88d1587c7d264d0eb 100644
--- a/Source/core/html/canvas/WebGLExtension.h
+++ b/Source/core/html/canvas/WebGLExtension.h
@@ -28,12 +28,13 @@
#include "core/html/canvas/WebGLExtensionName.h"
#include "core/html/canvas/WebGLRenderingContextBase.h"
+#include "platform/heap/Handle.h"
#include "wtf/RefCounted.h"
namespace blink {
-class WebGLExtension : public RefCounted<WebGLExtension> {
- WTF_MAKE_FAST_ALLOCATED;
+class WebGLExtension : public RefCountedWillBeGarbageCollectedFinalized<WebGLExtension> {
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
WebGLRenderingContextBase* context() { return m_context; }
@@ -45,7 +46,7 @@ public:
// is lost but must be lost when destroying their WebGLRenderingContextBase.
virtual void lose(bool)
{
- m_context = 0;
+ m_context = nullptr;
}
bool isLost()
@@ -53,10 +54,12 @@ public:
return !m_context;
}
+ virtual void trace(Visitor*);
+
protected:
- WebGLExtension(WebGLRenderingContextBase*);
+ explicit WebGLExtension(WebGLRenderingContextBase*);
- WebGLRenderingContextBase* m_context;
+ RawPtrWillBeWeakMember<WebGLRenderingContextBase> m_context;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698