Index: third_party/WebKit/Source/core/events/EventSender.h |
diff --git a/third_party/WebKit/Source/core/events/EventSender.h b/third_party/WebKit/Source/core/events/EventSender.h |
index ab7f59ac66d51e9971b8c49f1fcf41bc8b1cca53..03f75c70babe0fcb3ac9b1f2453e30119b3b2d2b 100644 |
--- a/third_party/WebKit/Source/core/events/EventSender.h |
+++ b/third_party/WebKit/Source/core/events/EventSender.h |
@@ -27,15 +27,21 @@ |
#define EventSender_h |
#include "platform/Timer.h" |
+#include "platform/heap/Handle.h" |
#include "wtf/Vector.h" |
#include "wtf/text/AtomicString.h" |
namespace blink { |
-template<typename T> class EventSender { |
- WTF_MAKE_NONCOPYABLE(EventSender); USING_FAST_MALLOC(EventSender); |
+template<typename T> |
+class EventSender final : public NoBaseWillBeGarbageCollectedFinalized<EventSender<T>> { |
+ WTF_MAKE_NONCOPYABLE(EventSender); |
+ USING_FAST_MALLOC_WILL_BE_REMOVED(EventSender); |
public: |
- explicit EventSender(const AtomicString& eventType); |
+ static PassOwnPtrWillBeRawPtr<EventSender> create(const AtomicString& eventType) |
+ { |
+ return adoptPtrWillBeNoop(new EventSender(eventType)); |
+ } |
const AtomicString& eventType() const { return m_eventType; } |
void dispatchEventSoon(T*); |
@@ -49,13 +55,21 @@ public: |
} |
#endif |
+ DEFINE_INLINE_TRACE() |
+ { |
+ visitor->trace(m_dispatchSoonList); |
+ visitor->trace(m_dispatchingList); |
+ } |
+ |
private: |
+ explicit EventSender(const AtomicString& eventType); |
+ |
void timerFired(Timer<EventSender<T>>*) { dispatchPendingEvents(); } |
AtomicString m_eventType; |
Timer<EventSender<T>> m_timer; |
- WillBePersistentHeapVector<RawPtrWillBeMember<T>> m_dispatchSoonList; |
- WillBePersistentHeapVector<RawPtrWillBeMember<T>> m_dispatchingList; |
+ WillBeHeapVector<RawPtrWillBeMember<T>> m_dispatchSoonList; |
+ WillBeHeapVector<RawPtrWillBeMember<T>> m_dispatchingList; |
}; |
template<typename T> EventSender<T>::EventSender(const AtomicString& eventType) |