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

Unified Diff: Source/core/events/EventTarget.h

Issue 307433003: Oilpan: Allocate all EventTarget derived types on the manged heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 7 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/Node.cpp ('k') | Source/core/fileapi/FileReader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventTarget.h
diff --git a/Source/core/events/EventTarget.h b/Source/core/events/EventTarget.h
index 8f7c238282c6b60496e82fb07be2ec55c186ba23..44b4ead1add6e245554d4bb8fe5c63e8fa45e722 100644
--- a/Source/core/events/EventTarget.h
+++ b/Source/core/events/EventTarget.h
@@ -72,7 +72,7 @@ public:
OwnPtr<FiringEventIteratorVector> firingEventIterators;
};
-class EventTarget {
+class EventTarget : public WillBeGarbageCollectedMixin {
public:
void ref() { refEventTarget(); }
void deref() { derefEventTarget(); }
@@ -110,6 +110,8 @@ public:
bool fireEventListeners(Event*);
+ virtual void trace(Visitor*) { }
+
protected:
virtual ~EventTarget();
@@ -223,6 +225,6 @@ private: \
// Use this macro if your EventTarget subclass is also a subclass of WTF::RefCounted.
// A ref-counted class that uses a different method of refcounting should use DEFINE_EVENT_TARGET_REFCOUNTING directly.
// Both of these macros are meant to be placed just before the "public:" section of the class declaration.
-#define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCounted<className>)
+#define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<className>)
#endif // EventTarget_h
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/fileapi/FileReader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698