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

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

Issue 335113002: IDL: Support argument default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 6 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/V8TestInterfaceConstructor2.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp b/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp
index 75a9142d2a51e38c303f81c2e7ae312b44a897c2..db7418d2cc729e7c73e819feb23d818afd96c45c 100644
--- a/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp
@@ -95,7 +95,11 @@ static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptionState), exceptionState);
TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]);
- TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, argumentOrNull(info, 3));
+ if (info.Length() > 3) {
+ TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]);
+ } else {
+ defaultNullStringOptionalStringArg = nullptr;
+ }
TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary(info[4], info.GetIsolate()));
if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUndefinedOptionalDictionaryArg.isObject()) {
exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDictionaryArg') is not an object.");
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698