Chromium Code Reviews| Index: Source/core/html/canvas/Path2D.h |
| diff --git a/Source/core/html/canvas/Path2D.h b/Source/core/html/canvas/Path2D.h |
| index 8a59b0c7285cc39124ce9284e0945d0871883877..70d7feb13f09725cb5cee5aa3a739eb7623e4b14 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 WebCore { |
| -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 { |
|
haraken
2014/07/03 04:40:29
Can we probably drop Finalized?
sof
2014/07/03 07:25:48
SkPath (via Path) has a destructor.
|
| + 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() |
| { |