Chromium Code Reviews| Index: Source/core/events/EventTarget.h |
| diff --git a/Source/core/events/EventTarget.h b/Source/core/events/EventTarget.h |
| index 8f7c238282c6b60496e82fb07be2ec55c186ba23..d33142313a6f988d365b6e1fea078833123ed0ff 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,10 @@ 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. |
| +#if ENABLE(OILPAN) |
| +#define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedGarbageCollected<className>) |
| +#else |
| #define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING(RefCounted<className>) |
| +#endif |
|
haraken
2014/05/27 01:39:19
Can we write this:
#define REFCOUNTED_EVENT_TARGE
zerny-chromium
2014/05/27 07:34:33
Yes, that is simpler :-) Done.
|
| #endif // EventTarget_h |