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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp

Issue 2301993002: binding: Introduces ExceptionToPromiseScope. (Closed)
Patch Set: Addressed review comments (rename, empty line). Created 4 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: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
index daa9f8330704da8803491aa3701dc60555186283..e13370da625af50f592b399fc962dc6a52c6e1e4 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
@@ -52,13 +52,13 @@ namespace TestInterfaceConstructor4V8Internal {
static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestInterfaceConstructor4* testInterface4Arg;
- {
- testInterface4Arg = V8TestInterfaceConstructor4::toImplWithTypeCheck(info.GetIsolate(), info[0]);
- if (!testInterface4Arg) {
- V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToConstruct("TestInterfaceConstructor4", "parameter 1 is not of type 'TestInterfaceConstructor4'."));
- return;
- }
+ testInterface4Arg = V8TestInterfaceConstructor4::toImplWithTypeCheck(info.GetIsolate(), info[0]);
+ if (!testInterface4Arg) {
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToConstruct("TestInterfaceConstructor4", "parameter 1 is not of type 'TestInterfaceConstructor4'."));
+
+ return;
}
+
TestInterfaceConstructor4* impl = TestInterfaceConstructor4::create(testInterface4Arg);
v8::Local<v8::Object> wrapper = info.Holder();
wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor4::wrapperTypeInfo, wrapper);
@@ -67,13 +67,13 @@ static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceConstructor4", info.Holder(), info.GetIsolate());
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "TestInterfaceConstructor4");
+
V8StringResource<> usvStringArg;
- {
- usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState);
- if (exceptionState.hadException())
- return;
- }
+ usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState);
+ if (exceptionState.hadException())
+ return;
+
TestInterfaceConstructor4* impl = TestInterfaceConstructor4::create(usvStringArg);
v8::Local<v8::Object> wrapper = info.Holder();
wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor4::wrapperTypeInfo, wrapper);

Powered by Google App Engine
This is Rietveld 408576698