| Index: Source/core/events/EventTarget.cpp
|
| diff --git a/Source/core/events/EventTarget.cpp b/Source/core/events/EventTarget.cpp
|
| index 5dede6f454943b4f267b852e70f1fb4202c21e12..fefdecf4274f325e746f302f0015c652280719f8 100644
|
| --- a/Source/core/events/EventTarget.cpp
|
| +++ b/Source/core/events/EventTarget.cpp
|
| @@ -43,6 +43,7 @@
|
| #include "platform/EventDispatchForbiddenScope.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "wtf/StdLibExtras.h"
|
| +#include "wtf/Threading.h"
|
| #include "wtf/Vector.h"
|
|
|
| using namespace WTF;
|
| @@ -356,15 +357,15 @@ void EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
|
|
|
| const EventListenerVector& EventTarget::getEventListeners(const AtomicString& eventType)
|
| {
|
| - DEFINE_STATIC_LOCAL(EventListenerVector, emptyVector, ());
|
| + AtomicallyInitializedStatic(EventListenerVector*, emptyVector = new EventListenerVector);
|
|
|
| EventTargetData* d = eventTargetData();
|
| if (!d)
|
| - return emptyVector;
|
| + return *emptyVector;
|
|
|
| EventListenerVector* listenerVector = d->eventListenerMap.find(eventType);
|
| if (!listenerVector)
|
| - return emptyVector;
|
| + return *emptyVector;
|
|
|
| return *listenerVector;
|
| }
|
|
|