| Index: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| index a6c7caf66d208e3b4b93eb65f7adf0353b770e29..cb5f9232f72b91b2139e1f125b4d90a02400a670 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| @@ -46,6 +46,7 @@ V8AbstractEventListener::V8AbstractEventListener(bool isAttribute, DOMWrapperWor
|
| : EventListener(JSEventListenerType)
|
| , m_isAttribute(isAttribute)
|
| , m_world(world)
|
| + , m_originWorldId(world.originWorldId())
|
| , m_isolate(isolate)
|
| , m_workerGlobalScope(nullptr)
|
| {
|
| @@ -91,11 +92,14 @@ void V8AbstractEventListener::handleEvent(ScriptState* scriptState, Event* event
|
| RefPtrWillBeRawPtr<V8AbstractEventListener> protect(this);
|
|
|
| ScriptState::Scope scope(scriptState);
|
| + // Ensure the parent world id gets propagated to the event and is reset afterwards.
|
| + DOMWrapperWorld::ParentWorldIdPusher worldIdPusher(scriptState->world(), m_originWorldId);
|
|
|
| // Get the V8 wrapper for the event object.
|
| v8::Local<v8::Value> jsEvent = toV8(event, scriptState->context()->Global(), isolate());
|
| if (jsEvent.IsEmpty())
|
| return;
|
| +
|
| invokeEventHandler(scriptState, event, v8::Local<v8::Value>::New(isolate(), jsEvent));
|
| }
|
|
|
|
|