Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp

Issue 1561663003: CL for perf tryjob on win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698