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

Unified Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 604833002: Use ExceptionState when converting string arguments to promise methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/core/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index fdc935b9716e268701399c070654212f8a51b6c3..3b96f2ac4c4ecb6bf6fce37febb8b3421cf1a2ce 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -6589,8 +6589,6 @@ static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
V8StringResource<> arg3;
Vector<String> variadic;
{
- v8::TryCatch block;
- V8RethrowTryCatchScope rethrow(block);
TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exceptionState), exceptionState, info, ScriptState::current(info.GetIsolate()));
if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) {
exceptionState.throwTypeError("parameter 2 ('arg2') is not an object.");
@@ -6598,7 +6596,7 @@ static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
}
arg2 = Dictionary(info[1], info.GetIsolate());
- TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info);
+ TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg3, info[2], exceptionState, info, ScriptState::current(info.GetIsolate()));
TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(variadic, toImplArguments<String>(info, 3, exceptionState), exceptionState, info, ScriptState::current(info.GetIsolate()));
}
v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Value());
@@ -6813,12 +6811,11 @@ static void overloadedPromiseMethod1Method(const v8::FunctionCallbackInfo<v8::Va
static void overloadedPromiseMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPromiseMethod", "TestObject", info.Holder(), info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(info.Holder());
V8StringResource<> arg;
{
- v8::TryCatch block;
- V8RethrowTryCatchScope rethrow(block);
- TOSTRING_VOID_PROMISE_INTERNAL(arg, info[0], info);
+ TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg, info[0], exceptionState, info, ScriptState::current(info.GetIsolate()));
}
v8SetReturnValue(info, impl->overloadedPromiseMethod(arg).v8Value());
}
« Source/bindings/core/v8/V8BindingMacros.h ('K') | « Source/bindings/scripts/v8_types.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698