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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp

Issue 373043004: IDL: Treat undefined as missing for optional arguments with defaults (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceConstructor2.h" 8 #include "V8TestInterfaceConstructor2.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 V8StringResource<> defaultUndefinedOptionalStringArg; 86 V8StringResource<> defaultUndefinedOptionalStringArg;
87 V8StringResource<> defaultNullStringOptionalStringArg; 87 V8StringResource<> defaultNullStringOptionalStringArg;
88 Dictionary defaultUndefinedOptionalDictionaryArg; 88 Dictionary defaultUndefinedOptionalDictionaryArg;
89 V8StringResource<> optionalStringArg; 89 V8StringResource<> optionalStringArg;
90 { 90 {
91 v8::TryCatch block; 91 v8::TryCatch block;
92 V8RethrowTryCatchScope rethrow(block); 92 V8RethrowTryCatchScope rethrow(block);
93 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0])); 93 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa tiveWithTypeCheck(info.GetIsolate(), info[0]));
94 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio nState), exceptionState); 94 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio nState), exceptionState);
95 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); 95 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]);
96 if (info.Length() > 3) { 96 if (!info[3]->IsUndefined()) {
97 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]); 97 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]);
98 } else { 98 } else {
99 defaultNullStringOptionalStringArg = nullptr; 99 defaultNullStringOptionalStringArg = nullptr;
100 } 100 }
101 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary (info[4], info.GetIsolate())); 101 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary (info[4], info.GetIsolate()));
102 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau ltUndefinedOptionalDictionaryArg.isObject()) { 102 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau ltUndefinedOptionalDictionaryArg.isObject()) {
103 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona lDictionaryArg') is not an object."); 103 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona lDictionaryArg') is not an object.");
104 exceptionState.throwIfNeeded(); 104 exceptionState.throwIfNeeded();
105 return; 105 return;
106 } 106 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 fromInternalPointer(object)->deref(); 262 fromInternalPointer(object)->deref();
263 } 263 }
264 264
265 template<> 265 template<>
266 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate) 266 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate)
267 { 267 {
268 return toV8(impl, creationContext, isolate); 268 return toV8(impl, creationContext, isolate);
269 } 269 }
270 270
271 } // namespace WebCore 271 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698