OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |