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

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

Issue 329223004: [DeprecateAs] if call addEventListener or removeEventListener without enough arguments Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move ext attr to interface 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
Index: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 14e2c60c59862f7c7d31e91d603c0fd9f9e463a9..9752c550e674195e583427b4898e96a4f96bd2f2 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -52,7 +52,6 @@
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "core/dom/custom/CustomElementCallbackDispatcher.h"
-#include "core/frame/DOMWindow.h"
#include "core/frame/UseCounter.h"
#include "core/inspector/ScriptArguments.h"
#include "platform/TraceEvent.h"
@@ -6136,11 +6135,10 @@ static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void voidMethodEventListenerOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEventListenerArg", "TestObject", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwMinimumArityTypeError(exceptionState, 1, info.Length());
+ throwMinimumArityTypeErrorForMethod("voidMethodEventListenerOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
return;
}
TestObject* impl = V8TestObject::toNative(info.Holder());
@@ -6148,15 +6146,15 @@ static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::
{
eventListenerArg = V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), info[1], false, ListenerFindOrCreate);
}
- impl->voidMethodEventListenerArg(eventListenerArg);
+ impl->voidMethodEventListenerOrNullArg(eventListenerArg);
if (listener && !impl->toNode())
removeHiddenValueFromArray(info.Holder(), info[1], V8TestObject::eventListenerCacheIndex, info.GetIsolate());
}
-static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+static void voidMethodEventListenerOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- TestObjectV8Internal::voidMethodEventListenerArgMethod(info);
+ TestObjectV8Internal::voidMethodEventListenerOrNullArgMethod(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
@@ -9196,7 +9194,7 @@ static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
{"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueMethodMethodCallback, 0, 0},
{"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodCallback, 0, 0},
{"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMethodCallback, 0, 1},
- {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListenerArgMethodCallback, 0, 1},
+ {"voidMethodEventListenerOrNullArg", TestObjectV8Internal::voidMethodEventListenerOrNullArgMethodCallback, 0, 1},
{"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMethodCallback, 0, 1},
{"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCallback, 0, 1},
{"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSerializedScriptValueArgMethodCallback, 0, 1},

Powered by Google App Engine
This is Rietveld 408576698