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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
9 #include "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 namespace TestInterface5ImplementationV8Internal { | 37 namespace TestInterface5ImplementationV8Internal { |
38 | 38 |
39 template<class CallbackInfo> | 39 template<class CallbackInfo> |
40 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::St
ring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) | 40 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::St
ring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
41 { | 41 { |
42 ASSERT(info.This()->IsObject()); | 42 ASSERT(info.This()->IsObject()); |
43 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 43 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
44 } | 44 } |
45 | 45 |
46 static void TestInterface5ImplementationForceSetAttributeOnThisCallback(v8::Loca
l<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) | |
47 { | |
48 TestInterface5ImplementationV8Internal::TestInterface5ImplementationForceSet
AttributeOnThis(name, v8Value, info); | |
49 } | |
50 | |
51 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 46 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
52 { | 47 { |
53 v8::Local<v8::Object> holder = info.Holder(); | 48 v8::Local<v8::Object> holder = info.Holder(); |
54 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 49 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
55 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 50 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
56 } | 51 } |
57 | 52 |
58 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 53 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
59 { | 54 { |
60 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 55 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
(...skipping 15 matching lines...) Expand all Loading... |
76 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 71 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
77 } | 72 } |
78 | 73 |
79 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 74 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
80 { | 75 { |
81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
82 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); | 77 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); |
83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
84 } | 79 } |
85 | 80 |
| 81 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 82 { |
| 83 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test
InterfaceConstructorAttribute"); |
| 84 TestInterface5ImplementationForceSetAttributeOnThis(propertyName, v8Value, i
nfo); |
| 85 } |
| 86 |
| 87 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
| 88 { |
| 89 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 90 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt
ributeSetter(v8Value, info); |
| 91 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 92 } |
| 93 |
86 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 94 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
87 { | 95 { |
88 v8::Local<v8::Object> holder = info.Holder(); | 96 v8::Local<v8::Object> holder = info.Holder(); |
89 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 97 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
90 v8SetReturnValue(info, impl->doubleAttribute()); | 98 v8SetReturnValue(info, impl->doubleAttribute()); |
91 } | 99 } |
92 | 100 |
93 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 101 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
94 { | 102 { |
95 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 impl->setWindowExposedAttribute(cppValue); | 335 impl->setWindowExposedAttribute(cppValue); |
328 } | 336 } |
329 | 337 |
330 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 338 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
331 { | 339 { |
332 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 340 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
333 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); | 341 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); |
334 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 342 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
335 } | 343 } |
336 | 344 |
337 static void TestInterface5ImplementationConstructorGetter(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | |
338 { | |
339 v8::Local<v8::Value> data = info.Data(); | |
340 ASSERT(data->IsExternal()); | |
341 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | |
342 if (!perContextData) | |
343 return; | |
344 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | |
345 } | |
346 | |
347 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 345 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
348 { | 346 { |
349 if (UNLIKELY(info.Length() < 1)) { | 347 if (UNLIKELY(info.Length() < 1)) { |
350 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le
ngth()), info.GetIsolate()); | 348 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le
ngth()), info.GetIsolate()); |
351 return; | 349 return; |
352 } | 350 } |
353 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 351 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
354 TestInterfaceEmpty* testInterfaceEmptyArg; | 352 TestInterfaceEmpty* testInterfaceEmptyArg; |
355 { | 353 { |
356 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 354 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 if (referencedName) { | 895 if (referencedName) { |
898 if (!DOMDataStore::containsWrapper(referencedName, isolate)) | 896 if (!DOMDataStore::containsWrapper(referencedName, isolate)) |
899 referencedName->wrap(creationContext, isolate); | 897 referencedName->wrap(creationContext, isolate); |
900 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); | 898 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); |
901 } | 899 } |
902 setObjectGroup(isolate, scriptWrappable, wrapper); | 900 setObjectGroup(isolate, scriptWrappable, wrapper); |
903 } | 901 } |
904 | 902 |
905 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut
es[] = { | 903 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut
es[] = { |
906 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter
faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te
stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 904 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter
faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te
stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
907 {"testInterfaceConstructorAttribute", TestInterface5ImplementationV8Internal
::TestInterface5ImplementationConstructorGetter, TestInterface5ImplementationV8I
nternal::TestInterface5ImplementationForceSetAttributeOnThisCallback, 0, 0, cons
t_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 905 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetterAsProperty
, TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAttri
buteSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrappe
rTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigu
ration::OnInstance}, |
908 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, | 906 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, |
909 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt
ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}, | 907 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt
ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}, |
910 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre
strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In
ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast
<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 908 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre
strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In
ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast
<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
911 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres
trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte
rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 909 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres
trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte
rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
912 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp
osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al
waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 910 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp
osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al
waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
913 }; | 911 }; |
914 | 912 |
915 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] =
{ | 913 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] =
{ |
916 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 914 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
917 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, | 915 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 1046 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
1049 } | 1047 } |
1050 | 1048 |
1051 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 1049 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
1052 { | 1050 { |
1053 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 1051 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
1054 } | 1052 } |
1055 | 1053 |
1056 } // namespace blink | 1054 } // namespace blink |
1057 #endif // ENABLE(CONDITION) | 1055 #endif // ENABLE(CONDITION) |
OLD | NEW |