| Index: Source/core/inspector/EventListenerInfo.h
|
| diff --git a/Source/core/inspector/EventListenerInfo.h b/Source/core/inspector/EventListenerInfo.h
|
| index 1079971120b7167ef98da28261a7dfe80f0fdfda..15c3d75a14c0c28cbb9095ab4a8a4ad770ad6432 100644
|
| --- a/Source/core/inspector/EventListenerInfo.h
|
| +++ b/Source/core/inspector/EventListenerInfo.h
|
| @@ -7,17 +7,19 @@
|
|
|
| #include "core/InspectorTypeBuilder.h"
|
| #include "core/events/EventListenerMap.h"
|
| +#include "core/events/EventTarget.h"
|
| #include "core/events/RegisteredEventListener.h"
|
| #include "wtf/Vector.h"
|
| #include "wtf/text/AtomicString.h"
|
|
|
| namespace blink {
|
|
|
| -class EventTarget;
|
| class ExecutionContext;
|
| class InjectedScriptManager;
|
|
|
| -struct EventListenerInfo {
|
| +class EventListenerInfo {
|
| + ALLOW_ONLY_INLINE_ALLOCATION();
|
| +public:
|
| EventListenerInfo(EventTarget* eventTarget, const AtomicString& eventType, const EventListenerVector& eventListenerVector)
|
| : eventTarget(eventTarget)
|
| , eventType(eventType)
|
| @@ -25,17 +27,24 @@ struct EventListenerInfo {
|
| {
|
| }
|
|
|
| - EventTarget* eventTarget;
|
| + RawPtrWillBeMember<EventTarget> eventTarget;
|
| const AtomicString eventType;
|
| const EventListenerVector eventListenerVector;
|
|
|
| - static void getEventListeners(EventTarget*, Vector<EventListenerInfo>& listenersArray, bool includeAncestors);
|
| + DEFINE_INLINE_VIRTUAL_TRACE()
|
| + {
|
| + visitor->trace(eventTarget);
|
| + visitor->trace(eventListenerVector);
|
| + }
|
| +
|
| + static void getEventListeners(EventTarget*, WillBeHeapVector<EventListenerInfo>& listenersArray, bool includeAncestors);
|
| };
|
|
|
| class RegisteredEventListenerIterator {
|
| WTF_MAKE_NONCOPYABLE(RegisteredEventListenerIterator);
|
| + STACK_ALLOCATED();
|
| public:
|
| - RegisteredEventListenerIterator(Vector<EventListenerInfo>& listenersArray)
|
| + RegisteredEventListenerIterator(WillBeHeapVector<EventListenerInfo>& listenersArray)
|
| : m_listenersArray(listenersArray)
|
| , m_infoIndex(0)
|
| , m_listenerIndex(0)
|
| @@ -47,7 +56,7 @@ public:
|
| const EventListenerInfo& currentEventListenerInfo();
|
|
|
| private:
|
| - Vector<EventListenerInfo>& m_listenersArray;
|
| + WillBeHeapVector<EventListenerInfo>& m_listenersArray;
|
| unsigned m_infoIndex;
|
| unsigned m_listenerIndex;
|
| bool m_isUseCapturePass;
|
| @@ -57,4 +66,6 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> eventHandlerObject(ExecutionConte
|
|
|
| } // namespace blink
|
|
|
| +WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(blink::EventListenerInfo);
|
| +
|
| #endif // EventListenerInfo_h
|
|
|