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

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: 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 cd505c76cd9960e4d96ac3b2c78e433bbdfbd2f5..3c9d758f5744487242b653cfe35343086decc227 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.");

Powered by Google App Engine
This is Rietveld 408576698