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

Unified Diff: Source/bindings/core/v8/V8EventListenerList.cpp

Issue 938553003: [DO NOT COMMIT] [DO NOT REVIEW] XHR timeout layout test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/bindings/core/v8/V8EventListener.cpp ('k') | Source/core/events/EventTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8EventListenerList.cpp
diff --git a/Source/bindings/core/v8/V8EventListenerList.cpp b/Source/bindings/core/v8/V8EventListenerList.cpp
index bd3e83c559b010a4cfe88e9250df8c191c8d9ca3..7e795347887bc6e64b7b5ad763e2f54634c5fedf 100644
--- a/Source/bindings/core/v8/V8EventListenerList.cpp
+++ b/Source/bindings/core/v8/V8EventListenerList.cpp
@@ -44,11 +44,18 @@ PassRefPtr<EventListener> V8EventListenerList::getEventListener(ScriptState* scr
// Used by EventTarget::removeEventListener, specifically
// EventTargetV8Internal::removeEventListenerMethod
ASSERT(!isAttribute);
- return V8EventListenerList::findWrapper(value, scriptState);
+ PassRefPtr<EventListener> p = V8EventListenerList::findWrapper(value, scriptState);
+ fprintf(stderr, "%s (ListenerFindOnly) return %p\n", __PRETTY_FUNCTION__, p.get());
+ return p;
}
- if (toDOMWindow(scriptState->context()))
- return V8EventListenerList::findOrCreateWrapper<V8EventListener>(value, isAttribute, scriptState);
- return V8EventListenerList::findOrCreateWrapper<V8WorkerGlobalScopeEventListener>(value, isAttribute, scriptState);
+ if (toDOMWindow(scriptState->context())) {
+ PassRefPtr<EventListener> p = V8EventListenerList::findOrCreateWrapper<V8EventListener>(value, isAttribute, scriptState);
+ fprintf(stderr, "%s (document) return %p\n", __PRETTY_FUNCTION__, p.get());
+ return p;
+ }
+ PassRefPtr<EventListener> p = V8EventListenerList::findOrCreateWrapper<V8WorkerGlobalScopeEventListener>(value, isAttribute, scriptState);
+ fprintf(stderr, "%s (otherwise) return %p\n", __PRETTY_FUNCTION__, p.get());
+ return p;
}
} // namespace blink
« no previous file with comments | « Source/bindings/core/v8/V8EventListener.cpp ('k') | Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698