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

Unified Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 70963003: IDL compiler: addEventListener, removeEventListener methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 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: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index e459385b2f31b51a46f07a53a510cb32e10c258e..07f0ba71f4e780b288020be106361a31a09e75c3 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -3105,15 +3105,13 @@ static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& in
es.throwIfNeeded();
return;
}
-
if (!window->document())
return;
}
-
RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[1], false, ListenerFindOrCreate);
if (listener) {
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, stringResource, info[0]);
- impl->addEventListener(stringResource, listener, info[2]->BooleanValue());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, eventName, info[0]);
+ impl->addEventListener(eventName, listener, info[2]->BooleanValue());
if (!impl->toNode())
createHiddenDependency(info.Holder(), info[1], V8TestObject::eventListenerCacheIndex, info.GetIsolate());
}
@@ -3135,15 +3133,13 @@ static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>&
es.throwIfNeeded();
return;
}
-
if (!window->document())
return;
}
-
RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[1], false, ListenerFindOnly);
if (listener) {
- V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, stringResource, info[0]);
- impl->removeEventListener(stringResource, listener.get(), info[2]->BooleanValue());
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, eventName, info[0]);
+ impl->removeEventListener(eventName, listener.get(), info[2]->BooleanValue());
if (!impl->toNode())
removeHiddenDependency(info.Holder(), info[1], V8TestObject::eventListenerCacheIndex, info.GetIsolate());
}
« no previous file with comments | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | Source/bindings/tests/results/V8TestObjectPython.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698