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

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

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 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
« no previous file with comments | « Source/core/html/HTMLStyleElement.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2D.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext.h
diff --git a/Source/core/html/canvas/CanvasRenderingContext.h b/Source/core/html/canvas/CanvasRenderingContext.h
index f4140d93dab593b205f728107fa343c02dedd6c8..7cfe2e53bd747c5d4424230ec1333e929fb9689a 100644
--- a/Source/core/html/canvas/CanvasRenderingContext.h
+++ b/Source/core/html/canvas/CanvasRenderingContext.h
@@ -27,6 +27,7 @@
#define CanvasRenderingContext_h
#include "core/html/HTMLCanvasElement.h"
+#include "platform/heap/Handle.h"
#include "wtf/HashSet.h"
#include "wtf/Noncopyable.h"
#include "wtf/text/StringHash.h"
@@ -39,13 +40,17 @@ class HTMLCanvasElement;
class KURL;
class WebGLObject;
-class CanvasRenderingContext {
- WTF_MAKE_NONCOPYABLE(CanvasRenderingContext); WTF_MAKE_FAST_ALLOCATED;
+class CanvasRenderingContext : public NoBaseWillBeGarbageCollectedFinalized<CanvasRenderingContext> {
+ WTF_MAKE_NONCOPYABLE(CanvasRenderingContext);
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
virtual ~CanvasRenderingContext() { }
+#if !ENABLE(OILPAN)
void ref() { m_canvas->ref(); }
void deref() { m_canvas->deref(); }
+#endif
+
HTMLCanvasElement* canvas() const { return m_canvas; }
virtual bool is2d() const { return false; }
@@ -56,11 +61,14 @@ public:
virtual void paintRenderingResultsToCanvas() {}
virtual blink::WebLayer* platformLayer() const { return 0; }
+
+ virtual void trace(Visitor* visitor) { visitor->trace(m_canvas); }
+
protected:
CanvasRenderingContext(HTMLCanvasElement*);
private:
- HTMLCanvasElement* m_canvas;
+ RawPtrWillBeMember<HTMLCanvasElement> m_canvas;
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/HTMLStyleElement.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698