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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp

Issue 2301993002: binding: Introduces ExceptionToPromiseScope. (Closed)
Patch Set: Removed throwMinimumArityError family. 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 7c74ee7aa883f868328b31b0ce245d01564b4a65..c17d8abfd0ffe5c8c0ccfe5bad3f0d68b95e53f1 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
@@ -7,6 +7,7 @@
#include "V8TestInterface2Partial.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/GeneratedCodeHelper.h"
#include "bindings/core/v8/V8DOMConfiguration.h"
#include "bindings/core/v8/V8GCController.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
@@ -25,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(), createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodPartial1", "TestInterface2", 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);
}
@@ -46,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(), createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodPartial2", "TestInterface2", 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