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

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

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: make constructors explicit Created 6 years, 7 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/V8TestInterfaceConstructor.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp b/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
index 821d801dcad30ed8a0fd8c6c7ef39e74992ec205..0cb2f68048e334a706a0759c6e5d8cb9eb1e58a8 100644
--- a/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceConstructor.cpp
@@ -75,6 +75,7 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
TestInterfaceEmpty* optionalTestInterfaceEmptyArg;
{
v8::TryCatch block;
+ V8RethrowTryCatchScope rethrow(block);
TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberValue()));
TOSTRING_VOID_INTERNAL(stringArg, info[1]);
TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[2]));
@@ -82,7 +83,6 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not an object.");
exceptionState.throwIfNeeded();
- block.ReThrow();
return;
}
TONATIVE_VOID_INTERNAL(sequenceStringArg, toNativeArray<String>(info[4], 5, info.GetIsolate()));
@@ -91,7 +91,6 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isObject()) {
exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg') is not an object.");
exceptionState.throwIfNeeded();
- block.ReThrow();
return;
}
TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[7]));
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698