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

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

Issue 331323012: Revert of Throw TypeError when addEventListener or removeEventListener are called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/tests/idls/TestObject.idl ('k') | Source/core/events/EventTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index de8701a0a63d3d11e97d253aa7a2e3537c4bd6e4..4b312e40b928d0b9eed5158f1026900df98c2222 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -6411,10 +6411,11 @@
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void voidMethodEventListenerOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
+static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEventListenerArg", "TestObject", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwMinimumArityTypeErrorForMethod("voidMethodEventListenerOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
+ throwMinimumArityTypeError(exceptionState, 1, info.Length());
return;
}
TestObject* impl = V8TestObject::toNative(info.Holder());
@@ -6422,15 +6423,15 @@
{
eventListenerArg = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[1], false, ListenerFindOrCreate);
}
- impl->voidMethodEventListenerOrNullArg(eventListenerArg);
+ impl->voidMethodEventListenerArg(eventListenerArg);
if (listener && !impl->toNode())
removeHiddenValueFromArray(info.Holder(), info[1], V8TestObject::eventListenerCacheIndex, info.GetIsolate());
}
-static void voidMethodEventListenerOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- TestObjectV8Internal::voidMethodEventListenerOrNullArgMethod(info);
+static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
+ TestObjectV8Internal::voidMethodEventListenerArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -9824,7 +9825,7 @@
{"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueMethodMethodCallback, 0, 0},
{"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodCallback, 0, 0},
{"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMethodCallback, 0, 1},
- {"voidMethodEventListenerOrNullArg", TestObjectV8Internal::voidMethodEventListenerOrNullArgMethodCallback, 0, 1},
+ {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListenerArgMethodCallback, 0, 1},
{"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMethodCallback, 0, 1},
{"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCallback, 0, 1},
{"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSerializedScriptValueArgMethodCallback, 0, 1},
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/core/events/EventTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698