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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.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/modules/V8TestInterface2Partial.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
index 3a8aef5d4ae0a30a11d548f7155852f4ef09b602..c17d8abfd0ffe5c8c0ccfe5bad3f0d68b95e53f1 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
@@ -26,17 +26,18 @@ namespace TestInterface2PartialV8Internal {
static void voidMethodPartial1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
+
if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::createTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodPartial1", "TestInterface2", ExceptionMessages::notEnoughArguments(1, info.Length()))));
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodPartial1", "TestInterface2", ExceptionMessages::notEnoughArguments(1, info.Length())));
return;
}
- TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
+
V8StringResource<> value;
- {
- value = info[0];
- if (!value.prepare())
- return;
- }
+ value = info[0];
+ if (!value.prepare())
+ return;
+
TestInterface2Partial::voidMethodPartial1(*impl, value);
}
@@ -47,17 +48,18 @@ static void voidMethodPartial1MethodCallback(const v8::FunctionCallbackInfo<v8::
static void voidMethodPartial2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
+ TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
+
if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::createTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEnoughArguments(1, info.Length()))));
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEnoughArguments(1, info.Length())));
return;
}
- TestInterface2* impl = V8TestInterface2::toImpl(info.Holder());
+
V8StringResource<> value;
- {
- value = info[0];
- if (!value.prepare())
- return;
- }
+ value = info[0];
+ if (!value.prepare())
+ return;
+
TestInterface2Partial2::voidMethodPartial2(*impl, value);
}

Powered by Google App Engine
This is Rietveld 408576698