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

Unified Diff: Source/bindings/tests/results/V8TestNamedConstructor.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
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestNamedConstructor.cpp
diff --git a/Source/bindings/tests/results/V8TestNamedConstructor.cpp b/Source/bindings/tests/results/V8TestNamedConstructor.cpp
index 5a8fc347e68375e31f7dfeee094de52a979a7e0a..21dafe4b888b5b6119dee7dff6c7c3a35cdd9402 100644
--- a/Source/bindings/tests/results/V8TestNamedConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestNamedConstructor.cpp
@@ -95,11 +95,12 @@ static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback
// may end up being the only node in the map and get garbage-collected prematurely.
toV8(document, info.Holder(), info.GetIsolate());
+ ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestNamedConstructor", info.Holder(), info.GetIsolate());
if (UNLIKELY(info.Length() < 1)) {
- throwTypeError(ExceptionMessages::failedToExecute("NamedConstructor", "TestNamedConstructor", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
+ exceptionState.throwIfNeeded();
return;
}
- ExceptionState exceptionState(info.Holder(), info.GetIsolate());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str3, argumentOrNull(info, 2));
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698