OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 Library General Public License for more details. | 13 Library General Public License for more details. |
14 | 14 |
15 You should have received a copy of the GNU Library General Public License | 15 You should have received a copy of the GNU Library General Public License |
16 along with this library; see the file COPYING.LIB. If not, write to | 16 along with this library; see the file COPYING.LIB. If not, write to |
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 Boston, MA 02111-1307, USA. | 18 Boston, MA 02111-1307, USA. |
19 */ | 19 */ |
20 | 20 |
21 #include "config.h" | 21 #include "config.h" |
22 #if ENABLE(Condition1) || ENABLE(Condition2) | 22 #if ENABLE(Condition1) || ENABLE(Condition2) |
23 #include "V8TestInterface.h" | 23 #include "V8TestInterface.h" |
24 | 24 |
25 #include "RuntimeEnabledFeatures.h" | 25 #include "RuntimeEnabledFeatures.h" |
26 #include "V8Node.h" | 26 #include "V8Node.h" |
27 #include "V8NodeList.h" | 27 #include "V8NodeList.h" |
| 28 #include "V8ReferencedType.h" |
28 #include "V8TestObject.h" | 29 #include "V8TestObject.h" |
29 #include "bindings/tests/idls/TestImplements.h" | 30 #include "bindings/tests/idls/TestImplements.h" |
30 #include "bindings/tests/idls/TestPartialInterface.h" | 31 #include "bindings/tests/idls/TestPartialInterface.h" |
31 #include "bindings/v8/ExceptionMessages.h" | 32 #include "bindings/v8/ExceptionMessages.h" |
32 #include "bindings/v8/ExceptionState.h" | 33 #include "bindings/v8/ExceptionState.h" |
33 #include "bindings/v8/ScriptController.h" | 34 #include "bindings/v8/ScriptController.h" |
34 #include "bindings/v8/V8AbstractEventListener.h" | 35 #include "bindings/v8/V8AbstractEventListener.h" |
35 #include "bindings/v8/V8Binding.h" | 36 #include "bindings/v8/V8Binding.h" |
36 #include "bindings/v8/V8DOMConfiguration.h" | 37 #include "bindings/v8/V8DOMConfiguration.h" |
37 #include "bindings/v8/V8DOMWrapper.h" | 38 #include "bindings/v8/V8DOMWrapper.h" |
(...skipping 21 matching lines...) Expand all Loading... |
59 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 60 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
60 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 61 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
61 // in the global namespace. | 62 // in the global namespace. |
62 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 63 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
63 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object
) | 64 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object
) |
64 { | 65 { |
65 WebCore::initializeScriptWrappableForInterface(object); | 66 WebCore::initializeScriptWrappableForInterface(object); |
66 } | 67 } |
67 | 68 |
68 namespace WebCore { | 69 namespace WebCore { |
69 const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { V8TestInterface::GetT
emplate, V8TestInterface::derefObject, V8TestInterface::toActiveDOMObject, 0, 0,
V8TestInterface::installPerContextEnabledPrototypeProperties, 0, WrapperTypeObj
ectPrototype }; | 70 const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { V8TestInterface::GetT
emplate, V8TestInterface::derefObject, V8TestInterface::toActiveDOMObject, 0, V8
TestInterface::resolveWrapperReachability, V8TestInterface::installPerContextEna
bledPrototypeProperties, 0, WrapperTypeObjectPrototype }; |
70 | 71 |
71 namespace TestInterfaceV8Internal { | 72 namespace TestInterfaceV8Internal { |
72 | 73 |
73 template <typename T> void V8_USE(T) { } | 74 template <typename T> void V8_USE(T) { } |
74 | 75 |
75 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 76 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
76 { | 77 { |
77 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr()); | 78 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr()); |
78 } | 79 } |
79 | 80 |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 | 772 |
772 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Integer>& info) | 773 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro
pertyCallbackInfo<v8::Integer>& info) |
773 { | 774 { |
774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 775 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
775 TestInterfaceV8Internal::namedPropertyQuery(name, info); | 776 TestInterfaceV8Internal::namedPropertyQuery(name, info); |
776 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 777 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
777 } | 778 } |
778 | 779 |
779 } // namespace TestInterfaceV8Internal | 780 } // namespace TestInterfaceV8Internal |
780 | 781 |
| 782 void V8TestInterface::resolveWrapperReachability(void* object, const v8::Persist
ent<v8::Object>& wrapper, v8::Isolate* isolate) |
| 783 { |
| 784 TestInterface* impl = fromInternalPointer(object); |
| 785 v8::Local<v8::Object> creationContext = v8::Local<v8::Object>::New(isolate,
wrapper); |
| 786 V8WrapperInstantiationScope scope(creationContext, isolate); |
| 787 ReferencedType* referencedName = impl->referencedName(); |
| 788 if (referencedName) { |
| 789 if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, iso
late)) |
| 790 wrap(referencedName, creationContext, isolate); |
| 791 DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedN
ame, isolate); |
| 792 } |
| 793 setObjectGroup(object, wrapper, isolate); |
| 794 } |
| 795 |
781 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute
s[] = { | 796 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute
s[] = { |
782 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal
lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}, | 797 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal
lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::None), 0 /* on instance */}, |
783 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal
lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, | 798 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal
lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
784 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal
lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, | 799 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal
lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
785 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal
lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, | 800 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal
lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(
v8::None), 0 /* on instance */}, |
786 {"eventHandlerAttribute", TestInterfaceV8Internal::eventHandlerAttributeAttr
ibuteGetterCallback, TestInterfaceV8Internal::eventHandlerAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, | 801 {"eventHandlerAttribute", TestInterfaceV8Internal::eventHandlerAttributeAttr
ibuteGetterCallback, TestInterfaceV8Internal::eventHandlerAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, |
787 #if ENABLE(Condition11) || ENABLE(Condition12) | 802 #if ENABLE(Condition11) || ENABLE(Condition12) |
788 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette
rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<
v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 803 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette
rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<
v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
789 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 804 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
790 #if ENABLE(Condition11) || ENABLE(Condition12) | 805 #if ENABLE(Condition11) || ENABLE(Condition12) |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 } | 984 } |
970 | 985 |
971 void V8TestInterface::derefObject(void* object) | 986 void V8TestInterface::derefObject(void* object) |
972 { | 987 { |
973 fromInternalPointer(object)->deref(); | 988 fromInternalPointer(object)->deref(); |
974 } | 989 } |
975 | 990 |
976 } // namespace WebCore | 991 } // namespace WebCore |
977 | 992 |
978 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 993 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
OLD | NEW |