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

Unified Diff: Source/core/html/canvas/CanvasGradient.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/CanvasGradient.h
diff --git a/Source/core/html/canvas/CanvasGradient.h b/Source/core/html/canvas/CanvasGradient.h
index f591e88c98ba4e5c179f2304884efc8a85708155..630f07d3e18bf54a8357819b520895706af80b95 100644
--- a/Source/core/html/canvas/CanvasGradient.h
+++ b/Source/core/html/canvas/CanvasGradient.h
@@ -29,6 +29,7 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/graphics/Gradient.h"
+#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
@@ -37,21 +38,23 @@ namespace blink {
class ExceptionState;
-class CanvasGradient : public RefCounted<CanvasGradient>, public ScriptWrappable {
+class CanvasGradient FINAL : public RefCountedWillBeGarbageCollectedFinalized<CanvasGradient>, public ScriptWrappable {
public:
- static PassRefPtr<CanvasGradient> create(const FloatPoint& p0, const FloatPoint& p1)
+ static PassRefPtrWillBeRawPtr<CanvasGradient> create(const FloatPoint& p0, const FloatPoint& p1)
{
- return adoptRef(new CanvasGradient(p0, p1));
+ return adoptRefWillBeNoop(new CanvasGradient(p0, p1));
}
- static PassRefPtr<CanvasGradient> create(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1)
+ static PassRefPtrWillBeRawPtr<CanvasGradient> create(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1)
{
- return adoptRef(new CanvasGradient(p0, r0, p1, r1));
+ return adoptRefWillBeNoop(new CanvasGradient(p0, r0, p1, r1));
}
Gradient* gradient() const { return m_gradient.get(); }
void addColorStop(float value, const String& color, ExceptionState&);
+ void trace(Visitor*) { }
+
private:
CanvasGradient(const FloatPoint& p0, const FloatPoint& p1);
CanvasGradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1);

Powered by Google App Engine
This is Rietveld 408576698