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

Unified Diff: Source/core/html/canvas/Path2D.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/Path2D.h
diff --git a/Source/core/html/canvas/Path2D.h b/Source/core/html/canvas/Path2D.h
index 193657006840390408120426534706e1606fe6eb..49b2bec163f2b70bb72c08a953f9d12412063c80 100644
--- a/Source/core/html/canvas/Path2D.h
+++ b/Source/core/html/canvas/Path2D.h
@@ -32,20 +32,21 @@
#include "core/html/canvas/CanvasPathMethods.h"
#include "core/svg/SVGMatrixTearOff.h"
#include "core/svg/SVGPathUtilities.h"
+#include "platform/heap/Handle.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace blink {
-class Path2D FINAL : public RefCounted<Path2D>, public CanvasPathMethods, public ScriptWrappable {
- WTF_MAKE_NONCOPYABLE(Path2D); WTF_MAKE_FAST_ALLOCATED;
+class Path2D FINAL : public RefCountedWillBeGarbageCollectedFinalized<Path2D>, public CanvasPathMethods, public ScriptWrappable {
+ WTF_MAKE_NONCOPYABLE(Path2D); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- static PassRefPtr<Path2D> create() { return adoptRef(new Path2D); }
- static PassRefPtr<Path2D> create(const String& pathData) { return adoptRef(new Path2D(pathData)); }
- static PassRefPtr<Path2D> create(Path2D* path) { return adoptRef(new Path2D(path)); }
+ static PassRefPtrWillBeRawPtr<Path2D> create() { return adoptRefWillBeNoop(new Path2D); }
+ static PassRefPtrWillBeRawPtr<Path2D> create(const String& pathData) { return adoptRefWillBeNoop(new Path2D(pathData)); }
+ static PassRefPtrWillBeRawPtr<Path2D> create(Path2D* path) { return adoptRefWillBeNoop(new Path2D(path)); }
- static PassRefPtr<Path2D> create(const Path& path) { return adoptRef(new Path2D(path)); }
+ static PassRefPtrWillBeRawPtr<Path2D> create(const Path& path) { return adoptRefWillBeNoop(new Path2D(path)); }
const Path& path() const { return m_path; }
@@ -59,7 +60,10 @@ public:
Path src = path->path();
m_path.addPath(src, transform ? transform->value() : AffineTransform(1, 0, 0, 1, 0, 0));
}
+
virtual ~Path2D() { }
+ void trace(Visitor*) { }
+
private:
Path2D() : CanvasPathMethods()
{

Powered by Google App Engine
This is Rietveld 408576698