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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
11 #include "V8Bar.h" | 11 #include "bindings/tests/v8/V8TestCallbackInterface.h" |
12 #include "V8Foo.h" | 12 #include "bindings/tests/v8/V8TestInterface.h" |
13 #include "V8TestCallbackInterface.h" | 13 #include "bindings/tests/v8/V8TestInterfaceEmpty.h" |
14 #include "V8TestInterfaceEmpty.h" | |
15 #include "V8TestSubObj.h" | |
16 #include "bindings/v8/ExceptionState.h" | 14 #include "bindings/v8/ExceptionState.h" |
17 #include "bindings/v8/V8DOMConfiguration.h" | 15 #include "bindings/v8/V8DOMConfiguration.h" |
18 #include "bindings/v8/V8HiddenValue.h" | 16 #include "bindings/v8/V8HiddenValue.h" |
19 #include "bindings/v8/V8ObjectConstructor.h" | 17 #include "bindings/v8/V8ObjectConstructor.h" |
20 #include "core/dom/ContextFeatures.h" | 18 #include "core/dom/ContextFeatures.h" |
21 #include "core/dom/Document.h" | 19 #include "core/dom/Document.h" |
22 #include "core/frame/DOMWindow.h" | 20 #include "core/frame/DOMWindow.h" |
23 #include "platform/TraceEvent.h" | 21 #include "platform/TraceEvent.h" |
24 #include "wtf/GetPtr.h" | 22 #include "wtf/GetPtr.h" |
25 #include "wtf/RefPtr.h" | 23 #include "wtf/RefPtr.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); | 183 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac
eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); |
186 } | 184 } |
187 | 185 |
188 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 186 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
189 { | 187 { |
190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
191 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); | 189 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); |
192 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
193 } | 191 } |
194 | 192 |
195 static void fooOrBarMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | 193 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
196 { | 194 { |
197 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 195 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
198 bool result0Enabled = false; | 196 bool result0Enabled = false; |
199 RefPtr<Foo> result0; | 197 RefPtr<TestInterfaceImplementation> result0; |
200 bool result1Enabled = false; | 198 bool result1Enabled = false; |
201 RefPtr<Bar> result1; | 199 RefPtr<TestInterfaceEmpty> result1; |
202 impl->fooOrBarMethod(result0Enabled, result0, result1Enabled, result1); | 200 impl->testInterfaceOrTestInterfaceEmptyMethod(result0Enabled, result0, resul
t1Enabled, result1); |
203 if (result0Enabled) { | 201 if (result0Enabled) { |
204 v8SetReturnValue(info, result0.release()); | 202 v8SetReturnValue(info, result0.release()); |
205 return; | 203 return; |
206 } | 204 } |
207 if (result1Enabled) { | 205 if (result1Enabled) { |
208 v8SetReturnValue(info, result1.release()); | 206 v8SetReturnValue(info, result1.release()); |
209 return; | 207 return; |
210 } | 208 } |
211 v8SetReturnValueNull(info); | 209 v8SetReturnValueNull(info); |
212 } | 210 } |
213 | 211 |
214 static void fooOrBarMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 212 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
215 { | 213 { |
216 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 214 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
217 TestTypedefsV8Internal::fooOrBarMethodMethod(info); | 215 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); |
218 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 216 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
219 } | 217 } |
220 | 218 |
221 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 219 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
222 { | 220 { |
223 if (UNLIKELY(info.Length() < 1)) { | 221 if (UNLIKELY(info.Length() < 1)) { |
224 throwMinimumArityTypeErrorForMethod("arrayOfStringsMethodArrayOfStringsA
rg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); | 222 throwMinimumArityTypeErrorForMethod("arrayOfStringsMethodArrayOfStringsA
rg", "TestTypedefs", 1, info.Length(), info.GetIsolate()); |
225 return; | 223 return; |
226 } | 224 } |
227 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 225 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 275 |
278 v8::Handle<v8::Object> wrapper = info.Holder(); | 276 v8::Handle<v8::Object> wrapper = info.Holder(); |
279 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independe
nt); | 277 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independe
nt); |
280 v8SetReturnValue(info, wrapper); | 278 v8SetReturnValue(info, wrapper); |
281 } | 279 } |
282 | 280 |
283 } // namespace TestTypedefsV8Internal | 281 } // namespace TestTypedefsV8Internal |
284 | 282 |
285 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { | 283 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { |
286 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, | 284 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), 0 /* on instance */}, |
287 {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy
pedefsV8Internal::TestTypedefsReplaceableAttributeSetterCallback, 0, 0, const_ca
st<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo), static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on ins
tance */}, | 285 {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy
pedefsV8Internal::TestTypedefsReplaceableAttributeSetterCallback, 0, 0, const_ca
st<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on
instance */}, |
288 }; | 286 }; |
289 | 287 |
290 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { | 288 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { |
291 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs
ArgMethodCallback, 0, 0}, | 289 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs
ArgMethodCallback, 0, 0}, |
292 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt
ringArgMethodCallback, 0, 2}, | 290 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt
ringArgMethodCallback, 0, 2}, |
293 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho
dTestCallbackInterfaceTypeArgMethodCallback, 0, 1}, | 291 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho
dTestCallbackInterfaceTypeArgMethodCallback, 0, 1}, |
294 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal:
:uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1}, | 292 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal:
:uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1}, |
295 {"fooOrBarMethod", TestTypedefsV8Internal::fooOrBarMethodMethodCallback, 0,
0}, | 293 {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInte
rfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0}, |
296 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr
ingsMethodArrayOfStringsArgMethodCallback, 0, 1}, | 294 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr
ingsMethodArrayOfStringsArgMethodCallback, 0, 1}, |
297 {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMetho
dStringArrayArgMethodCallback, 0, 1}, | 295 {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMetho
dStringArrayArgMethodCallback, 0, 1}, |
298 }; | 296 }; |
299 | 297 |
300 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 298 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
301 { | 299 { |
302 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 300 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
303 if (!info.IsConstructCall()) { | 301 if (!info.IsConstructCall()) { |
304 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test
Typedefs"), info.GetIsolate()); | 302 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Test
Typedefs"), info.GetIsolate()); |
305 return; | 303 return; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 fromInternalPointer(object)->deref(); | 384 fromInternalPointer(object)->deref(); |
387 } | 385 } |
388 | 386 |
389 template<> | 387 template<> |
390 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 388 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
391 { | 389 { |
392 return toV8(impl, creationContext, isolate); | 390 return toV8(impl, creationContext, isolate); |
393 } | 391 } |
394 | 392 |
395 } // namespace WebCore | 393 } // namespace WebCore |
OLD | NEW |