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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceNamedConstructor.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 "V8TestInterfaceNamedConstructor.h" 8 #include "V8TestInterfaceNamedConstructor.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 V8StringResource<> defaultUndefinedOptionalStringArg; 95 V8StringResource<> defaultUndefinedOptionalStringArg;
96 V8StringResource<> defaultNullStringOptionalstringArg; 96 V8StringResource<> defaultNullStringOptionalstringArg;
97 V8StringResource<> optionalStringArg; 97 V8StringResource<> optionalStringArg;
98 { 98 {
99 v8::TryCatch block; 99 v8::TryCatch block;
100 V8RethrowTryCatchScope rethrow(block); 100 V8RethrowTryCatchScope rethrow(block);
101 TOSTRING_VOID_INTERNAL(stringArg, info[0]); 101 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
102 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalBooleanArg, info[1]->Bool eanValue()); 102 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalBooleanArg, info[1]->Bool eanValue());
103 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalLongArg, t oInt32(info[2], exceptionState), exceptionState); 103 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalLongArg, t oInt32(info[2], exceptionState), exceptionState);
104 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[3]); 104 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[3]);
105 if (info.Length() > 4) { 105 if (!info[4]->IsUndefined()) {
106 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalstringArg, info[4]); 106 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalstringArg, info[4]);
107 } else { 107 } else {
108 defaultNullStringOptionalstringArg = nullptr; 108 defaultNullStringOptionalstringArg = nullptr;
109 } 109 }
110 if (UNLIKELY(info.Length() <= 5)) { 110 if (UNLIKELY(info.Length() <= 5)) {
111 Document& document = *toDocument(currentExecutionContext(info.GetIso late())); 111 Document& document = *toDocument(currentExecutionContext(info.GetIso late()));
112 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConst ructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBool eanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defa ultNullStringOptionalstringArg, exceptionState); 112 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConst ructor::createForJSConstructor(document, stringArg, defaultUndefinedOptionalBool eanArg, defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defa ultNullStringOptionalstringArg, exceptionState);
113 if (exceptionState.hadException()) { 113 if (exceptionState.hadException()) {
114 exceptionState.throwIfNeeded(); 114 exceptionState.throwIfNeeded();
115 return; 115 return;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 fromInternalPointer(object)->deref(); 224 fromInternalPointer(object)->deref();
225 } 225 }
226 226
227 template<> 227 template<>
228 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 228 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
229 { 229 {
230 return toV8(impl, creationContext, isolate); 230 return toV8(impl, creationContext, isolate);
231 } 231 }
232 232
233 } // namespace WebCore 233 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp ('k') | Source/bindings/tests/results/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698