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

Unified Diff: Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.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: address comments 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/V8TestInterfaceNamedConstructor.cpp
diff --git a/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp b/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
index 11c500ab289452c58c4a78ba1b21b07154115524..475e61cd54c55b06fa3f1bf2dbc1d3e35fd1cd9d 100644
--- a/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
+++ b/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
@@ -83,12 +83,20 @@ static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
V8StringResource<> defaultNullStringOptionalstringArg;
V8StringResource<> optionalStringArg;
{
- TOSTRING_VOID_INTERNAL(stringArg, info[0]);
+ stringArg = info[0];
+ if (!stringArg.prepare())
+ return;
defaultUndefinedOptionalBooleanArg = info[1]->BooleanValue();
- TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalLongArg, toInt32(info[2], exceptionState), exceptionState);
- TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[3]);
+ defaultUndefinedOptionalLongArg = toInt32(info[2], exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
+ defaultUndefinedOptionalStringArg = info[3];
+ if (!defaultUndefinedOptionalStringArg.prepare())
+ return;
if (!info[4]->IsUndefined()) {
- TOSTRING_VOID_INTERNAL(defaultNullStringOptionalstringArg, info[4]);
+ defaultNullStringOptionalstringArg = info[4];
+ if (!defaultNullStringOptionalstringArg.prepare())
+ return;
} else {
defaultNullStringOptionalstringArg = nullptr;
}
@@ -104,7 +112,9 @@ static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
v8SetReturnValue(info, wrapper);
return;
}
- TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]);
+ optionalStringArg = info[5];
+ if (!optionalStringArg.prepare())
+ return;
}
Document& document = *toDocument(currentExecutionContext(info.GetIsolate()));
RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBooleanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullStringOptionalstringArg, optionalStringArg, exceptionState);

Powered by Google App Engine
This is Rietveld 408576698