Chromium Code Reviews| 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 781 | 782 |
| 782 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Integer>& info) | 783 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Integer>& info) |
| 783 { | 784 { |
| 784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 785 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 785 TestInterfaceV8Internal::namedPropertyQuery(name, info); | 786 TestInterfaceV8Internal::namedPropertyQuery(name, info); |
| 786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 787 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 787 } | 788 } |
| 788 | 789 |
| 789 } // namespace TestInterfaceV8Internal | 790 } // namespace TestInterfaceV8Internal |
| 790 | 791 |
| 792 void V8TestInterface::resolveWrapperReachability(void* object, const v8::Persist ent<v8::Object>& wrapper, v8::Isolate* isolate) | |
| 793 { | |
| 794 TestInterface* impl = fromInternalPointer(object); | |
| 795 v8::Local<v8::Object> creationContext = v8::Local<v8::Object>::New(isolate, wrapper); | |
| 796 V8WrapperInstantiationScope scope(creationContext, isolate); | |
|
haraken
2013/10/29 01:14:53
You can move this into the if branch.
This is OK
kouhei (in TOK)
2013/10/29 04:19:58
There may be multiple [SetReference]s, so I think
| |
| 797 ReferencedType* referencedName = impl->referencedName(); | |
| 798 if (referencedName) { | |
| 799 if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, iso late)) | |
| 800 wrap(referencedName, creationContext, isolate); | |
| 801 DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedN ame, isolate); | |
| 802 } | |
| 803 setObjectGroup(object, wrapper, isolate); | |
| 804 } | |
| 805 | |
| 791 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = { | 806 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = { |
| 792 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), 0 /* on instance */}, | 807 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 793 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, | 808 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, |
| 794 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, | 809 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, |
| 795 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, | 810 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, |
| 796 {"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 */}, | 811 {"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 */}, |
| 797 #if ENABLE(Condition11) || ENABLE(Condition12) | 812 #if ENABLE(Condition11) || ENABLE(Condition12) |
| 798 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 813 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 799 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 814 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
| 800 #if ENABLE(Condition11) || ENABLE(Condition12) | 815 #if ENABLE(Condition11) || ENABLE(Condition12) |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 979 } | 994 } |
| 980 | 995 |
| 981 void V8TestInterface::derefObject(void* object) | 996 void V8TestInterface::derefObject(void* object) |
| 982 { | 997 { |
| 983 fromInternalPointer(object)->deref(); | 998 fromInternalPointer(object)->deref(); |
| 984 } | 999 } |
| 985 | 1000 |
| 986 } // namespace WebCore | 1001 } // namespace WebCore |
| 987 | 1002 |
| 988 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1003 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
| OLD | NEW |