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

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

Issue 105693002: Generate a bit less code to handle failed arity checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years 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/V8TestInterface.cpp
diff --git a/Source/bindings/tests/results/V8TestInterface.cpp b/Source/bindings/tests/results/V8TestInterface.cpp
index b2b235d4e7fa50f005dbdcace86a96fecebf6161..c976370053e04cc8e86bb316af16c0af36245659 100644
--- a/Source/bindings/tests/results/V8TestInterface.cpp
+++ b/Source/bindings/tests/results/V8TestInterface.cpp
@@ -558,7 +558,8 @@ static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsMethod2", "TestInterface", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
- throwTypeError(ExceptionMessages::failedToExecute("implementsMethod2", "TestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate());
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
+ exceptionState.throwIfNeeded();
return;
}
TestInterface* imp = V8TestInterface::toNative(info.Holder());
@@ -619,7 +620,8 @@ static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
{
ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementalMethod2", "TestInterface", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 2)) {
- throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2", "TestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate());
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
+ exceptionState.throwIfNeeded();
return;
}
TestInterface* imp = V8TestInterface::toNative(info.Holder());
« no previous file with comments | « Source/bindings/tests/results/V8SupportTestInterface.cpp ('k') | Source/bindings/tests/results/V8TestNamedConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698