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

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

Issue 203603005: Explicitly mark first 2 args of addEventListener/removeEventListener as optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test result (addEventListener.length now 0, not 2) Created 6 years, 9 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/templates/methods.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObjectPython.cpp
diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp
index 15f6eeeabd13a5603492a1c751ef1980ef771ad8..b5822851bb72252b9334ba10fb105ae155913876 100644
--- a/Source/bindings/tests/results/V8TestObjectPython.cpp
+++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
@@ -5368,13 +5368,17 @@ static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEventListenerArg", "TestObjectPython", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToExecute("voidMethodEventListenerArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ exceptionState.throwIfNeeded();
return;
}
TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
RefPtr<EventListener> eventListenerArg = V8EventListenerList::getEventListener(info[1], false, ListenerFindOrCreate);
impl->voidMethodEventListenerArg(eventListenerArg);
+ if (listener && !impl->toNode())
+ removeHiddenValueFromArray(info.Holder(), info[1], V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
}
static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698