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

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

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/core/css/CSSKeyframesRule.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/Optional.h"
11 #include "bindings/core/v8/V8DOMConfiguration.h" 12 #include "bindings/core/v8/V8DOMConfiguration.h"
12 #include "bindings/core/v8/V8HiddenValue.h" 13 #include "bindings/core/v8/V8HiddenValue.h"
13 #include "bindings/core/v8/V8ObjectConstructor.h" 14 #include "bindings/core/v8/V8ObjectConstructor.h"
14 #include "bindings/tests/v8/V8TestCallbackInterface.h" 15 #include "bindings/tests/v8/V8TestCallbackInterface.h"
15 #include "bindings/tests/v8/V8TestInterface.h" 16 #include "bindings/tests/v8/V8TestInterface.h"
16 #include "bindings/tests/v8/V8TestInterfaceEmpty.h" 17 #include "bindings/tests/v8/V8TestInterfaceEmpty.h"
17 #include "core/dom/ContextFeatures.h" 18 #include "core/dom/ContextFeatures.h"
18 #include "core/dom/Document.h" 19 #include "core/dom/Document.h"
19 #include "core/frame/LocalDOMWindow.h" 20 #include "core/frame/LocalDOMWindow.h"
20 #include "platform/RuntimeEnabledFeatures.h" 21 #include "platform/RuntimeEnabledFeatures.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 96 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
96 { 97 {
97 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i nfo); 98 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i nfo);
98 } 99 }
99 100
100 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 101 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
101 { 102 {
102 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 103 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder());
103 Vector<int> arrayOfLongsArg; 104 Vector<int> arrayOfLongsArg;
105 bool arrayOfLongsArgMissing = false;
104 { 106 {
105 v8::TryCatch block; 107 v8::TryCatch block;
106 V8RethrowTryCatchScope rethrow(block); 108 V8RethrowTryCatchScope rethrow(block);
107 if (UNLIKELY(info.Length() <= 0)) { 109 if (!info[0]->IsUndefined()) {
108 impl->voidMethodArrayOfLongsArg(); 110 TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
109 return; 111 } else {
112 arrayOfLongsArgMissing = true;
110 } 113 }
111 TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toNativeArray<int>(info[0], 1, i nfo.GetIsolate()));
112 } 114 }
113 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); 115 impl->voidMethodArrayOfLongsArg(Optional<Vector<int> >(arrayOfLongsArg, arra yOfLongsArgMissing));
114 } 116 }
115 117
116 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 118 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
117 { 119 {
118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
119 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); 121 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info);
120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
121 } 123 }
122 124
123 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 125 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 fromInternalPointer(internalPointer)->deref(); 410 fromInternalPointer(internalPointer)->deref();
409 } 411 }
410 412
411 template<> 413 template<>
412 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate) 414 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate)
413 { 415 {
414 return toV8(impl, creationContext, isolate); 416 return toV8(impl, creationContext, isolate);
415 } 417 }
416 418
417 } // namespace blink 419 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/core/css/CSSKeyframesRule.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698