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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceConstructor.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/V8TestInterfaceConstructor.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp b/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
index 33e1d39519e4bbd6a5c54b6006154ae50c32bb27..4e627257d907fa6afe48683b4eebc43e37bf23d0 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
@@ -61,23 +61,23 @@ static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
Dictionary optionalDictionaryArg;
TestInterfaceEmpty* optionalTestInterfaceEmptyArg;
{
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toDouble(info[0], exceptionState), exceptionState);
- TOSTRING_VOID_INTERNAL(stringArg, info[1]);
+ TONATIVE_CONVERT(convertAndThrow(doubleArg = toDouble(info[0], exceptionState), exceptionState), return);
+ TONATIVE_CONVERT((stringArg = info[1]).prepare(), return);
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[2]);
if (!isUndefinedOrNull(info[3]) && !info[3]->IsObject()) {
exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not an object.");
exceptionState.throwIfNeeded();
return;
}
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(dictionaryArg, Dictionary(info[3], info.GetIsolate(), exceptionState), exceptionState);
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(sequenceStringArg, toImplArray<String>(info[4], 5, info.GetIsolate(), exceptionState), exceptionState);
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(sequenceDictionaryArg, toImplArray<Dictionary>(info[5], 6, info.GetIsolate(), exceptionState), exceptionState);
+ TONATIVE_CONVERT(convertAndThrow(dictionaryArg = Dictionary(info[3], info.GetIsolate(), exceptionState), exceptionState), return);
+ TONATIVE_CONVERT(convertAndThrow(sequenceStringArg = toImplArray<String>(info[4], 5, info.GetIsolate(), exceptionState), exceptionState), return);
+ TONATIVE_CONVERT(convertAndThrow(sequenceDictionaryArg = toImplArray<Dictionary>(info[5], 6, info.GetIsolate(), exceptionState), exceptionState), return);
if (!isUndefinedOrNull(info[6]) && !info[6]->IsObject()) {
exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg') is not an object.");
exceptionState.throwIfNeeded();
return;
}
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalDictionaryArg, Dictionary(info[6], info.GetIsolate(), exceptionState), exceptionState);
+ TONATIVE_CONVERT(convertAndThrow(optionalDictionaryArg = Dictionary(info[6], info.GetIsolate(), exceptionState), exceptionState), return);
optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[7]);
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
@@ -99,7 +99,7 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
V8StringResource<> arg;
V8StringResource<> optArg;
{
- TOSTRING_VOID_INTERNAL(arg, info[0]);
+ TONATIVE_CONVERT((arg = info[0]).prepare(), return);
if (UNLIKELY(info.Length() <= 1)) {
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
@@ -114,7 +114,7 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
v8SetReturnValue(info, wrapper);
return;
}
- TOSTRING_VOID_INTERNAL(optArg, info[1]);
+ TONATIVE_CONVERT((optArg = info[1]).prepare(), return);
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
@@ -136,9 +136,9 @@ static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
V8StringResource<> arg2;
V8StringResource<> arg3;
{
- TOSTRING_VOID_INTERNAL(arg, info[0]);
- TOSTRING_VOID_INTERNAL(arg2, info[1]);
- TOSTRING_VOID_INTERNAL(arg3, info[2]);
+ TONATIVE_CONVERT((arg = info[0]).prepare(), return);
+ TONATIVE_CONVERT((arg2 = info[1]).prepare(), return);
+ TONATIVE_CONVERT((arg3 = info[2]).prepare(), return);
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
@@ -236,7 +236,7 @@ static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall
V8StringResource<> arg;
V8StringResource<> optArg;
{
- TOSTRING_VOID_INTERNAL(arg, info[0]);
+ TONATIVE_CONVERT((arg = info[0]).prepare(), return);
if (UNLIKELY(info.Length() <= 1)) {
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
@@ -251,7 +251,7 @@ static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall
v8SetReturnValue(info, wrapper);
return;
}
- TOSTRING_VOID_INTERNAL(optArg, info[1]);
+ TONATIVE_CONVERT((optArg = info[1]).prepare(), return);
}
ScriptState* scriptState = ScriptState::current(info.GetIsolate());
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698