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

Unified Diff: Source/bindings/tests/results/V8TestOverloadedConstructors.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/V8TestOverloadedConstructors.cpp
diff --git a/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp b/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp
index 0c3040233716e064db6b8fc562ba52fb2209391c..4b5e75dff6d2c7cf78780c988fa784d1efc24cf0 100644
--- a/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp
+++ b/Source/bindings/tests/results/V8TestOverloadedConstructors.cpp
@@ -116,6 +116,7 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestOverloadedConstructors", info.Holder(), info.GetIsolate());
if (((info.Length() == 1) && (V8ArrayBuffer::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))))) {
TestOverloadedConstructorsV8Internal::constructor1(info);
return;
@@ -133,11 +134,12 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToConstruct("TestOverloadedConstructors", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ exceptionState.throwIfNeeded();
return;
}
- throwTypeError(ExceptionMessages::failedToConstruct("TestOverloadedConstructors", "No matching constructor signature."), info.GetIsolate());
- return;
+ exceptionState.throwTypeError("No matching constructor signature.");
+ exceptionState.throwIfNeeded();
}
} // namespace TestOverloadedConstructorsV8Internal
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.cpp ('k') | Source/bindings/tests/results/V8TestTypedefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698