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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.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/V8TestInterfaceEventInitConstructor.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
index c761bfa1531cb4f9b1f8bcd38df3c84751bbba95..089ac2ba79fd7701b7a64c0c9efcc3ad4603ab08 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
@@ -7,6 +7,7 @@
#include "V8TestInterfaceEventInitConstructor.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 "bindings/core/v8/V8TestInterfaceEventInit.h"
@@ -74,25 +75,28 @@ void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceEventInitConstructor", info.Holder(), info.GetIsolate());
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "TestInterfaceEventInitConstructor");
+
if (UNLIKELY(info.Length() < 2)) {
- setMinimumArityTypeError(exceptionState, 2, info.Length());
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
return;
}
+
V8StringResource<> type;
TestInterfaceEventInit testInterfaceEventInit;
- {
- type = info[0];
- if (!type.prepare())
- return;
- if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) {
- exceptionState.throwTypeError("parameter 2 ('testInterfaceEventInit') is not an object.");
- return;
- }
- V8TestInterfaceEventInit::toImpl(info.GetIsolate(), info[1], testInterfaceEventInit, exceptionState);
- if (exceptionState.hadException())
- return;
+ type = info[0];
+ if (!type.prepare())
+ return;
+
+ if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) {
+ exceptionState.throwTypeError("parameter 2 ('testInterfaceEventInit') is not an object.");
+
+ return;
}
+ V8TestInterfaceEventInit::toImpl(info.GetIsolate(), info[1], testInterfaceEventInit, exceptionState);
+ if (exceptionState.hadException())
+ return;
+
TestInterfaceEventInitConstructor* impl = TestInterfaceEventInitConstructor::create(type, testInterfaceEventInit);
v8::Local<v8::Object> wrapper = info.Holder();
wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEventInitConstructor::wrapperTypeInfo, wrapper);

Powered by Google App Engine
This is Rietveld 408576698