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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.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/core/V8TestInterfaceNamedConstructor2.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
index f8c6f95c53222ff49f910d55b30403cbabc56e74..8f5070e29570077e1a26ca9b9d8c9ba4f64f8754 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
@@ -7,6 +7,7 @@
#include "V8TestInterfaceNamedConstructor2.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/GeneratedCodeHelper.h"
#include "bindings/core/v8/V8DOMConfiguration.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "core/dom/Document.h"
@@ -71,16 +72,17 @@ static void V8TestInterfaceNamedConstructor2ConstructorCallback(const v8::Functi
v8SetReturnValue(info, info.Holder());
return;
}
+
if (UNLIKELY(info.Length() < 1)) {
- V8ThrowException::throwException(info.GetIsolate(), createMinimumArityTypeErrorForConstructor(info.GetIsolate(), "TestInterfaceNamedConstructor2", 1, info.Length()));
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToConstruct("TestInterfaceNamedConstructor2", ExceptionMessages::notEnoughArguments(1, info.Length())));
return;
}
+
V8StringResource<> stringArg;
- {
- stringArg = info[0];
- if (!stringArg.prepare())
- return;
- }
+ stringArg = info[0];
+ if (!stringArg.prepare())
+ return;
+
TestInterfaceNamedConstructor2* impl = TestInterfaceNamedConstructor2::createForJSConstructor(stringArg);
v8::Local<v8::Object> wrapper = info.Holder();
wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceNamedConstructor2Constructor::wrapperTypeInfo, wrapper);

Powered by Google App Engine
This is Rietveld 408576698