Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: Source/bindings/tests/results/V8TestInterface.cpp

Issue 26792002: Reland: Reland: Implement new Blink IDL attribute [SetReference] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: setWrapperReference_reupl Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "V8ReachableToType.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/V8Binding.h" 35 #include "bindings/v8/V8Binding.h"
35 #include "bindings/v8/V8DOMConfiguration.h" 36 #include "bindings/v8/V8DOMConfiguration.h"
36 #include "bindings/v8/V8DOMWrapper.h" 37 #include "bindings/v8/V8DOMWrapper.h"
37 #include "bindings/v8/V8ObjectConstructor.h" 38 #include "bindings/v8/V8ObjectConstructor.h"
(...skipping 19 matching lines...) Expand all
57 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows: 58 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows:
58 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function 59 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
59 // in the global namespace. 60 // in the global namespace.
60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c) 61 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c)
61 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object ) 62 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object )
62 { 63 {
63 WebCore::initializeScriptWrappableForInterface(object); 64 WebCore::initializeScriptWrappableForInterface(object);
64 } 65 }
65 66
66 namespace WebCore { 67 namespace WebCore {
67 WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestIn terface::derefObject, V8TestInterface::toActiveDOMObject, 0, 0, V8TestInterface: :installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype }; 68 WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestIn terface::derefObject, V8TestInterface::toActiveDOMObject, 0, V8TestInterface::re solveWrapperReachability, V8TestInterface::installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype };
68 69
69 namespace TestInterfaceV8Internal { 70 namespace TestInterfaceV8Internal {
70 71
71 template <typename T> void V8_USE(T) { } 72 template <typename T> void V8_USE(T) { }
72 73
73 #if ENABLE(Condition22) || ENABLE(Condition23) 74 #if ENABLE(Condition22) || ENABLE(Condition23)
74 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info) 75 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info)
75 { 76 {
76 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr()); 77 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr());
77 } 78 }
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 919
919 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Integer>& info) 920 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Integer>& info)
920 { 921 {
921 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
922 TestInterfaceV8Internal::namedPropertyQuery(name, info); 923 TestInterfaceV8Internal::namedPropertyQuery(name, info);
923 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
924 } 925 }
925 926
926 } // namespace TestInterfaceV8Internal 927 } // namespace TestInterfaceV8Internal
927 928
929 void V8TestInterface::resolveWrapperReachability(void* object, const v8::Persist ent<v8::Object>& wrapper, v8::Isolate* isolate)
930 {
931 TestInterface* impl = fromInternalPointer(object);
932 v8::Local<v8::Object> creationContext = v8::Local<v8::Object>::New(isolate, wrapper);
933 ReachableToType* reachableTo = impl->reachableTo();
934 if (reachableTo) {
935 if(! DOMDataStore::containsWrapper<V8ReachableToType>(reachableTo, isola te))
936 wrap(reachableTo, creationContext, isolate);
937 DOMDataStore::setWrapperReferenceFrom<V8ReachableToType>(wrapper, reacha bleTo, isolate);
938 }
939 setObjectGroup(object, wrapper, isolate);
haraken 2013/10/16 04:46:38 It looks inconsistent that setObjectGroup is a met
kouhei (in TOK) 2013/10/17 02:30:09 setObjectGroup is not a method of WrapperTypeInfo.
haraken 2013/10/17 03:28:22 I still think these methods are misplaced, but it'
940 }
941
928 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = { 942 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = {
929 #if ENABLE(Condition22) || ENABLE(Condition23) 943 #if ENABLE(Condition22) || ENABLE(Condition23)
930 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), 0 /* on instance */}, 944 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), 0 /* on instance */},
931 #endif // ENABLE(Condition22) || ENABLE(Condition23) 945 #endif // ENABLE(Condition22) || ENABLE(Condition23)
932 #if ENABLE(Condition22) || ENABLE(Condition23) 946 #if ENABLE(Condition22) || ENABLE(Condition23)
933 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, 947 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
934 #endif // ENABLE(Condition22) || ENABLE(Condition23) 948 #endif // ENABLE(Condition22) || ENABLE(Condition23)
935 #if ENABLE(Condition22) || ENABLE(Condition23) 949 #if ENABLE(Condition22) || ENABLE(Condition23)
936 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, 950 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
937 #endif // ENABLE(Condition22) || ENABLE(Condition23) 951 #endif // ENABLE(Condition22) || ENABLE(Condition23)
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 } 1172 }
1159 1173
1160 void V8TestInterface::derefObject(void* object) 1174 void V8TestInterface::derefObject(void* object)
1161 { 1175 {
1162 fromInternalPointer(object)->deref(); 1176 fromInternalPointer(object)->deref();
1163 } 1177 }
1164 1178
1165 } // namespace WebCore 1179 } // namespace WebCore
1166 1180
1167 #endif // ENABLE(Condition1) || ENABLE(Condition2) 1181 #endif // ENABLE(Condition1) || ENABLE(Condition2)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698