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

Unified Diff: Source/core/dom/TouchList.h

Issue 185413023: Oilpan: move Touch related objects to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Avoid MSVC local class member function restriction Created 6 years, 9 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/dom/Touch.idl ('k') | Source/core/dom/TouchList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TouchList.h
diff --git a/Source/core/dom/TouchList.h b/Source/core/dom/TouchList.h
index 6d5f2bf2c9ce172f90196770ffe262061eb0a618..68b5341f9bfe398996c0611c0f9d8384245823ff 100644
--- a/Source/core/dom/TouchList.h
+++ b/Source/core/dom/TouchList.h
@@ -28,21 +28,22 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/Touch.h"
+#include "heap/Handle.h"
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
namespace WebCore {
-class TouchList : public RefCounted<TouchList>, public ScriptWrappable {
+class TouchList : public RefCountedWillBeGarbageCollectedFinalized<TouchList>, public ScriptWrappable {
public:
- static PassRefPtr<TouchList> create()
+ static PassRefPtrWillBeRawPtr<TouchList> create()
{
- return adoptRef(new TouchList);
+ return adoptRefWillBeNoop(new TouchList);
}
- static PassRefPtr<TouchList> create(Vector<RefPtr<Touch> >& touches)
+ static PassRefPtrWillBeRawPtr<TouchList> create(WillBeHeapVector<RefPtrWillBeMember<Touch> >& touches)
{
- return adoptRef(new TouchList(touches));
+ return adoptRefWillBeNoop(new TouchList(touches));
}
unsigned length() const { return m_values.size(); }
@@ -50,7 +51,9 @@ public:
Touch* item(unsigned);
const Touch* item(unsigned) const;
- void append(const PassRefPtr<Touch> touch) { m_values.append(touch); }
+ void append(const PassRefPtrWillBeRawPtr<Touch> touch) { m_values.append(touch); }
+
+ void trace(Visitor*);
private:
TouchList()
@@ -58,13 +61,13 @@ private:
ScriptWrappable::init(this);
}
- TouchList(Vector<RefPtr<Touch> >& touches)
+ TouchList(WillBeHeapVector<RefPtrWillBeMember<Touch> >& touches)
{
m_values.swap(touches);
ScriptWrappable::init(this);
}
- Vector<RefPtr<Touch> > m_values;
+ WillBeHeapVector<RefPtrWillBeMember<Touch> > m_values;
};
} // namespace WebCore
« no previous file with comments | « Source/core/dom/Touch.idl ('k') | Source/core/dom/TouchList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698