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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp

Issue 946973005: IDL: Drop value conversion (V8 -> C++) macros from generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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: Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp b/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
index cd186f8dc2583a69fb954b399e02e318ed9d91c5..195907016e8ba6aac6ac86bdff041e7c962b6eb0 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
@@ -36,7 +36,7 @@ static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
{
V8StringResource<> stringArg;
{
- TOSTRING_VOID_INTERNAL(stringArg, info[0]);
+ TONATIVE_CONVERT((stringArg = info[0]).prepare(), return);
}
RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(stringArg);
v8::Local<v8::Object> wrapper = info.Holder();
@@ -54,7 +54,7 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
exceptionState.throwIfNeeded();
return;
}
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolate(), exceptionState), exceptionState);
+ TONATIVE_CONVERT(convertAndThrow(dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState), exceptionState), return);
}
RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(dictionaryArg);
v8::Local<v8::Object> wrapper = info.Holder();
@@ -67,7 +67,7 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceConstructor2", info.Holder(), info.GetIsolate());
Vector<Vector<String>> stringSequenceSequenceArg;
{
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringSequenceSequenceArg, toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState);
+ TONATIVE_CONVERT(convertAndThrow(stringSequenceSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState), exceptionState), return);
}
RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(stringSequenceSequenceArg);
v8::Local<v8::Object> wrapper = info.Holder();
@@ -86,10 +86,10 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
V8StringResource<> optionalStringArg;
{
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]);
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptionState), exceptionState);
- TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]);
+ TONATIVE_CONVERT(convertAndThrow(longArg = toInt32(info[1], exceptionState), exceptionState), return);
+ TONATIVE_CONVERT((defaultUndefinedOptionalStringArg = info[2]).prepare(), return);
if (!info[3]->IsUndefined()) {
- TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]);
+ TONATIVE_CONVERT((defaultNullStringOptionalStringArg = info[3]).prepare(), return);
} else {
defaultNullStringOptionalStringArg = nullptr;
}
@@ -98,7 +98,7 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
exceptionState.throwIfNeeded();
return;
}
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary(info[4], info.GetIsolate(), exceptionState), exceptionState);
+ TONATIVE_CONVERT(convertAndThrow(defaultUndefinedOptionalDictionaryArg = Dictionary(info[4], info.GetIsolate(), exceptionState), exceptionState), return);
if (UNLIKELY(info.Length() <= 5)) {
RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg);
v8::Local<v8::Object> wrapper = info.Holder();
@@ -106,7 +106,7 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
v8SetReturnValue(info, wrapper);
return;
}
- TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]);
+ TONATIVE_CONVERT((optionalStringArg = info[5]).prepare(), return);
}
RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg);
v8::Local<v8::Object> wrapper = info.Holder();

Powered by Google App Engine
This is Rietveld 408576698