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

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2492793002: Support fetching attribute listeners from outside v8 context scopes. (Closed)
Patch Set: try to tidy up logic Created 4 years, 1 month 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/core/events/EventTarget.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index 99562b50dbc1064632c9c4b1335e3a1f0570fef2..329f68dac5f754f349b632821aa2bf69577f238d 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -413,9 +413,11 @@ EventListener* EventTarget::getAttributeEventListener(
EventListenerVector* listenerVector = getEventListeners(eventType);
if (!listenerVector)
return nullptr;
+
for (auto& eventListener : *listenerVector) {
EventListener* listener = eventListener.listener();
- if (listener->isAttribute() && listener->belongsToTheCurrentWorld())
+ if (listener->isAttribute() &&
+ listener->belongsToTheCurrentWorld(getExecutionContext()))
return listener;
}
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698