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

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

Issue 26547005: IDL compiler: [PerContextEnabled] for getters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reupload 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,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows: 57 // 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 58 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
59 // in the global namespace. 59 // 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) 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 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object ) 61 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object )
62 { 62 {
63 WebCore::initializeScriptWrappableForInterface(object); 63 WebCore::initializeScriptWrappableForInterface(object);
64 } 64 }
65 65
66 namespace WebCore { 66 namespace WebCore {
67 WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestIn terface::derefObject, V8TestInterface::toActiveDOMObject, 0, 0, V8TestInterface: :installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype }; 67 WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestIn terface::derefObject, V8TestInterface::toActiveDOMObject, 0, 0, V8TestInterface: :installPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype };
68 68
69 namespace TestInterfaceV8Internal { 69 namespace TestInterfaceV8Internal {
70 70
71 template <typename T> void V8_USE(T) { } 71 template <typename T> void V8_USE(T) { }
72 72
73 #if ENABLE(Condition22) || ENABLE(Condition23)
74 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info) 73 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info)
75 { 74 {
76 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr()); 75 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr());
77 } 76 }
78 #endif // ENABLE(Condition22) || ENABLE(Condition23)
79 77
80 #if ENABLE(Condition22) || ENABLE(Condition23)
81 static void implementsStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::St ring> name, const v8::PropertyCallbackInfo<v8::Value>& info) 78 static void implementsStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::St ring> name, const v8::PropertyCallbackInfo<v8::Value>& info)
82 { 79 {
83 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 80 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
84 TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttributeGetter(name, i nfo); 81 TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttributeGetter(name, i nfo);
85 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 82 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
86 } 83 }
87 #endif // ENABLE(Condition22) || ENABLE(Condition23)
88 84
89 #if ENABLE(Condition22) || ENABLE(Condition23)
90 static void implementsStaticAttrAttributeGetter(v8::Local<v8::String> name, cons t v8::PropertyCallbackInfo<v8::Value>& info) 85 static void implementsStaticAttrAttributeGetter(v8::Local<v8::String> name, cons t v8::PropertyCallbackInfo<v8::Value>& info)
91 { 86 {
92 v8SetReturnValueString(info, TestImplements::implementsStaticAttr(), info.Ge tIsolate()); 87 v8SetReturnValueString(info, TestImplements::implementsStaticAttr(), info.Ge tIsolate());
93 } 88 }
94 #endif // ENABLE(Condition22) || ENABLE(Condition23)
95 89
96 #if ENABLE(Condition22) || ENABLE(Condition23)
97 static void implementsStaticAttrAttributeGetterCallback(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info) 90 static void implementsStaticAttrAttributeGetterCallback(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info)
98 { 91 {
99 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 92 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
100 TestInterfaceV8Internal::implementsStaticAttrAttributeGetter(name, info); 93 TestInterfaceV8Internal::implementsStaticAttrAttributeGetter(name, info);
101 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 94 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
102 } 95 }
103 #endif // ENABLE(Condition22) || ENABLE(Condition23)
104
105 #if ENABLE(Condition22) || ENABLE(Condition23)
106 96
107 static void implementsStaticAttrAttributeSetter(v8::Local<v8::String> name, v8:: Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 97 static void implementsStaticAttrAttributeSetter(v8::Local<v8::String> name, v8:: Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
108 { 98 {
109 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); 99 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
110 TestImplements::setImplementsStaticAttr(v); 100 TestImplements::setImplementsStaticAttr(v);
111 } 101 }
112 102
113 #endif // ENABLE(Condition22) || ENABLE(Condition23)
114
115 #if ENABLE(Condition22) || ENABLE(Condition23)
116
117 static void implementsStaticAttrAttributeSetterCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 103 static void implementsStaticAttrAttributeSetterCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
118 { 104 {
119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
120 TestInterfaceV8Internal::implementsStaticAttrAttributeSetter(name, value, in fo); 106 TestInterfaceV8Internal::implementsStaticAttrAttributeSetter(name, value, in fo);
121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
122 } 108 }
123 109
124 #endif // ENABLE(Condition22) || ENABLE(Condition23)
125
126 #if ENABLE(Condition22) || ENABLE(Condition23)
127 static void implementsStr1AttributeGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info) 110 static void implementsStr1AttributeGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
128 { 111 {
129 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 112 TestInterface* imp = V8TestInterface::toNative(info.Holder());
130 v8SetReturnValueString(info, TestImplements::implementsStr1(imp), info.GetIs olate()); 113 v8SetReturnValueString(info, TestImplements::implementsStr1(imp), info.GetIs olate());
131 } 114 }
132 #endif // ENABLE(Condition22) || ENABLE(Condition23)
133 115
134 #if ENABLE(Condition22) || ENABLE(Condition23)
135 static void implementsStr1AttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info) 116 static void implementsStr1AttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info)
136 { 117 {
137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
138 TestInterfaceV8Internal::implementsStr1AttributeGetter(name, info); 119 TestInterfaceV8Internal::implementsStr1AttributeGetter(name, info);
139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
140 } 121 }
141 #endif // ENABLE(Condition22) || ENABLE(Condition23)
142 122
143 #if ENABLE(Condition22) || ENABLE(Condition23)
144 static void implementsStr2AttributeGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info) 123 static void implementsStr2AttributeGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
145 { 124 {
146 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 125 TestInterface* imp = V8TestInterface::toNative(info.Holder());
147 v8SetReturnValueString(info, TestImplements::implementsStr2(imp), info.GetIs olate()); 126 v8SetReturnValueString(info, TestImplements::implementsStr2(imp), info.GetIs olate());
148 } 127 }
149 #endif // ENABLE(Condition22) || ENABLE(Condition23)
150 128
151 #if ENABLE(Condition22) || ENABLE(Condition23)
152 static void implementsStr2AttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info) 129 static void implementsStr2AttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info)
153 { 130 {
154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
155 TestInterfaceV8Internal::implementsStr2AttributeGetter(name, info); 132 TestInterfaceV8Internal::implementsStr2AttributeGetter(name, info);
156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
157 } 134 }
158 #endif // ENABLE(Condition22) || ENABLE(Condition23)
159
160 #if ENABLE(Condition22) || ENABLE(Condition23)
161 135
162 static void implementsStr2AttributeSetter(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 136 static void implementsStr2AttributeSetter(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
163 { 137 {
164 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 138 TestInterface* imp = V8TestInterface::toNative(info.Holder());
165 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value); 139 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
166 TestImplements::setImplementsStr2(imp, v); 140 TestImplements::setImplementsStr2(imp, v);
167 } 141 }
168 142
169 #endif // ENABLE(Condition22) || ENABLE(Condition23)
170
171 #if ENABLE(Condition22) || ENABLE(Condition23)
172
173 static void implementsStr2AttributeSetterCallback(v8::Local<v8::String> name, v8 ::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 143 static void implementsStr2AttributeSetterCallback(v8::Local<v8::String> name, v8 ::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
174 { 144 {
175 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
176 TestInterfaceV8Internal::implementsStr2AttributeSetter(name, value, info); 146 TestInterfaceV8Internal::implementsStr2AttributeSetter(name, value, info);
177 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
178 } 148 }
179 149
180 #endif // ENABLE(Condition22) || ENABLE(Condition23)
181
182 #if ENABLE(Condition22) || ENABLE(Condition23)
183 static void implementsStr3AttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info) 150 static void implementsStr3AttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info)
184 { 151 {
185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
186 V8TestInterface::implementsStr3AttributeGetterCustom(name, info); 153 V8TestInterface::implementsStr3AttributeGetterCustom(name, info);
187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 154 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
188 } 155 }
189 #endif // ENABLE(Condition22) || ENABLE(Condition23)
190
191 #if ENABLE(Condition22) || ENABLE(Condition23)
192 156
193 static void implementsStr3AttributeSetterCallback(v8::Local<v8::String> name, v8 ::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 157 static void implementsStr3AttributeSetterCallback(v8::Local<v8::String> name, v8 ::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
194 { 158 {
195 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
196 V8TestInterface::implementsStr3AttributeSetterCustom(name, value, info); 160 V8TestInterface::implementsStr3AttributeSetterCustom(name, value, info);
197 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
198 } 162 }
199 163
200 #endif // ENABLE(Condition22) || ENABLE(Condition23)
201
202 #if ENABLE(Condition22) || ENABLE(Condition23)
203 static void implementsNodeAttributeGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info) 164 static void implementsNodeAttributeGetter(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
204 { 165 {
205 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 166 TestInterface* imp = V8TestInterface::toNative(info.Holder());
206 v8SetReturnValueFast(info, TestImplements::implementsNode(imp), imp); 167 v8SetReturnValueFast(info, TestImplements::implementsNode(imp), imp);
207 } 168 }
208 #endif // ENABLE(Condition22) || ENABLE(Condition23)
209 169
210 #if ENABLE(Condition22) || ENABLE(Condition23)
211 static void implementsNodeAttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info) 170 static void implementsNodeAttributeGetterCallback(v8::Local<v8::String> name, co nst v8::PropertyCallbackInfo<v8::Value>& info)
212 { 171 {
213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 172 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
214 TestInterfaceV8Internal::implementsNodeAttributeGetter(name, info); 173 TestInterfaceV8Internal::implementsNodeAttributeGetter(name, info);
215 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 174 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
216 } 175 }
217 #endif // ENABLE(Condition22) || ENABLE(Condition23)
218
219 #if ENABLE(Condition22) || ENABLE(Condition23)
220 176
221 static void implementsNodeAttributeSetter(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 177 static void implementsNodeAttributeSetter(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
222 { 178 {
223 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 179 TestInterface* imp = V8TestInterface::toNative(info.Holder());
224 V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worl dType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value) ) : 0); 180 V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worl dType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value) ) : 0);
225 TestImplements::setImplementsNode(imp, WTF::getPtr(v)); 181 TestImplements::setImplementsNode(imp, WTF::getPtr(v));
226 } 182 }
227 183
228 #endif // ENABLE(Condition22) || ENABLE(Condition23)
229
230 #if ENABLE(Condition22) || ENABLE(Condition23)
231
232 static void implementsNodeAttributeSetterCallback(v8::Local<v8::String> name, v8 ::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 184 static void implementsNodeAttributeSetterCallback(v8::Local<v8::String> name, v8 ::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
233 { 185 {
234 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 186 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
235 TestInterfaceV8Internal::implementsNodeAttributeSetter(name, value, info); 187 TestInterfaceV8Internal::implementsNodeAttributeSetter(name, value, info);
236 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
237 } 189 }
238 190
239 #endif // ENABLE(Condition22) || ENABLE(Condition23)
240
241 #if ENABLE(Condition22) || ENABLE(Condition23)
242 static void Node23AttributeGetter(v8::Local<v8::String> name, const v8::Property CallbackInfo<v8::Value>& info) 191 static void Node23AttributeGetter(v8::Local<v8::String> name, const v8::Property CallbackInfo<v8::Value>& info)
243 { 192 {
244 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 193 TestInterface* imp = V8TestInterface::toNative(info.Holder());
245 v8SetReturnValueFast(info, TestImplements::node23(imp), imp); 194 v8SetReturnValueFast(info, TestImplements::node23(imp), imp);
246 } 195 }
247 #endif // ENABLE(Condition22) || ENABLE(Condition23)
248 196
249 #if ENABLE(Condition22) || ENABLE(Condition23)
250 static void Node23AttributeGetterCallback(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info) 197 static void Node23AttributeGetterCallback(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
251 { 198 {
252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 199 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
253 TestInterfaceV8Internal::Node23AttributeGetter(name, info); 200 TestInterfaceV8Internal::Node23AttributeGetter(name, info);
254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 201 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
255 } 202 }
256 #endif // ENABLE(Condition22) || ENABLE(Condition23)
257
258 #if ENABLE(Condition22) || ENABLE(Condition23)
259 203
260 static void Node23AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Valu e> value, const v8::PropertyCallbackInfo<void>& info) 204 static void Node23AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Valu e> value, const v8::PropertyCallbackInfo<void>& info)
261 { 205 {
262 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 206 TestInterface* imp = V8TestInterface::toNative(info.Holder());
263 V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worl dType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value) ) : 0); 207 V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worl dType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value) ) : 0);
264 TestImplements::setNode23(imp, WTF::getPtr(v)); 208 TestImplements::setNode23(imp, WTF::getPtr(v));
265 } 209 }
266 210
267 #endif // ENABLE(Condition22) || ENABLE(Condition23)
268
269 #if ENABLE(Condition22) || ENABLE(Condition23)
270
271 static void Node23AttributeSetterCallback(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 211 static void Node23AttributeSetterCallback(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
272 { 212 {
273 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
274 TestInterfaceV8Internal::Node23AttributeSetter(name, value, info); 214 TestInterfaceV8Internal::Node23AttributeSetter(name, value, info);
275 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 215 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
276 } 216 }
277 217
278 #endif // ENABLE(Condition22) || ENABLE(Condition23)
279
280 #if ENABLE(Condition22) || ENABLE(Condition23)
281 static void Node24AttributeGetter(v8::Local<v8::String> name, const v8::Property CallbackInfo<v8::Value>& info) 218 static void Node24AttributeGetter(v8::Local<v8::String> name, const v8::Property CallbackInfo<v8::Value>& info)
282 { 219 {
283 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 220 TestInterface* imp = V8TestInterface::toNative(info.Holder());
284 v8SetReturnValueFast(info, TestImplements::node24(imp), imp); 221 v8SetReturnValueFast(info, TestImplements::node24(imp), imp);
285 } 222 }
286 #endif // ENABLE(Condition22) || ENABLE(Condition23)
287 223
288 #if ENABLE(Condition22) || ENABLE(Condition23)
289 static void Node24AttributeGetterCallback(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info) 224 static void Node24AttributeGetterCallback(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
290 { 225 {
291 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
292 TestInterfaceV8Internal::Node24AttributeGetter(name, info); 227 TestInterfaceV8Internal::Node24AttributeGetter(name, info);
293 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
294 } 229 }
295 #endif // ENABLE(Condition22) || ENABLE(Condition23)
296
297 #if ENABLE(Condition22) || ENABLE(Condition23)
298 230
299 static void Node24AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Valu e> value, const v8::PropertyCallbackInfo<void>& info) 231 static void Node24AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Valu e> value, const v8::PropertyCallbackInfo<void>& info)
300 { 232 {
301 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 233 TestInterface* imp = V8TestInterface::toNative(info.Holder());
302 V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worl dType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value) ) : 0); 234 V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worl dType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value) ) : 0);
303 TestImplements::setNode24(imp, WTF::getPtr(v)); 235 TestImplements::setNode24(imp, WTF::getPtr(v));
304 } 236 }
305 237
306 #endif // ENABLE(Condition22) || ENABLE(Condition23)
307
308 #if ENABLE(Condition22) || ENABLE(Condition23)
309
310 static void Node24AttributeSetterCallback(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 238 static void Node24AttributeSetterCallback(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
311 { 239 {
312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
313 TestInterfaceV8Internal::Node24AttributeSetter(name, value, info); 241 TestInterfaceV8Internal::Node24AttributeSetter(name, value, info);
314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
315 } 243 }
316 244
317 #endif // ENABLE(Condition22) || ENABLE(Condition23)
318
319 #if ENABLE(Condition22) || ENABLE(Condition23)
320 static void Node25AttributeGetter(v8::Local<v8::String> name, const v8::Property CallbackInfo<v8::Value>& info)
321 {
322 TestInterface* imp = V8TestInterface::toNative(info.Holder());
323 v8SetReturnValueFast(info, TestImplements::node25(imp), imp);
324 }
325 #endif // ENABLE(Condition22) || ENABLE(Condition23)
326
327 #if ENABLE(Condition22) || ENABLE(Condition23)
328 static void Node25AttributeGetterCallback(v8::Local<v8::String> name, const v8:: PropertyCallbackInfo<v8::Value>& info)
329 {
330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
331 TestInterfaceV8Internal::Node25AttributeGetter(name, info);
332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
333 }
334 #endif // ENABLE(Condition22) || ENABLE(Condition23)
335
336 #if ENABLE(Condition22) || ENABLE(Condition23)
337
338 static void Node25AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Valu e> value, const v8::PropertyCallbackInfo<void>& info)
339 {
340 TestInterface* imp = V8TestInterface::toNative(info.Holder());
341 V8TRYCATCH_VOID(Node*, v, V8Node::HasInstance(value, info.GetIsolate(), worl dType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value) ) : 0);
342 TestImplements::setNode25(imp, WTF::getPtr(v));
343 }
344
345 #endif // ENABLE(Condition22) || ENABLE(Condition23)
346
347 #if ENABLE(Condition22) || ENABLE(Condition23)
348
349 static void Node25AttributeSetterCallback(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
350 {
351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
352 TestInterfaceV8Internal::Node25AttributeSetter(name, value, info);
353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
354 }
355
356 #endif // ENABLE(Condition22) || ENABLE(Condition23)
357
358 #if ENABLE(Condition11) || ENABLE(Condition12) 245 #if ENABLE(Condition11) || ENABLE(Condition12)
359 static void supplementalStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 246 static void supplementalStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
360 { 247 {
361 v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAt tr()); 248 v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAt tr());
362 } 249 }
363 #endif // ENABLE(Condition11) || ENABLE(Condition12) 250 #endif // ENABLE(Condition11) || ENABLE(Condition12)
364 251
365 #if ENABLE(Condition11) || ENABLE(Condition12) 252 #if ENABLE(Condition11) || ENABLE(Condition12)
366 static void supplementalStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8:: String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 253 static void supplementalStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8:: String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
367 { 254 {
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 520
634 static void Node15AttributeSetterCallback(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 521 static void Node15AttributeSetterCallback(v8::Local<v8::String> name, v8::Local< v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
635 { 522 {
636 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
637 TestInterfaceV8Internal::Node15AttributeSetter(name, value, info); 524 TestInterfaceV8Internal::Node15AttributeSetter(name, value, info);
638 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
639 } 526 }
640 527
641 #endif // ENABLE(Condition11) || ENABLE(Condition12) 528 #endif // ENABLE(Condition11) || ENABLE(Condition12)
642 529
643 #if ENABLE(Condition22) || ENABLE(Condition23)
644
645 static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 530 static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
646 { 531 {
647 TestInterface* imp = V8TestInterface::toNative(args.Holder()); 532 TestInterface* imp = V8TestInterface::toNative(args.Holder());
648 TestImplements::implementsMethod1(imp); 533 TestImplements::implementsMethod1(imp);
649 534
650 return; 535 return;
651 } 536 }
652 537
653 #endif // ENABLE(Condition22) || ENABLE(Condition23)
654
655 #if ENABLE(Condition22) || ENABLE(Condition23)
656
657 static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args) 538 static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args)
658 { 539 {
659 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 540 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
660 TestInterfaceV8Internal::implementsMethod1Method(args); 541 TestInterfaceV8Internal::implementsMethod1Method(args);
661 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 542 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
662 } 543 }
663 544
664 #endif // ENABLE(Condition22) || ENABLE(Condition23)
665
666 #if ENABLE(Condition22) || ENABLE(Condition23)
667
668 static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 545 static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
669 { 546 {
670 if (UNLIKELY(args.Length() < 2)) { 547 if (UNLIKELY(args.Length() < 2)) {
671 throwTypeError(ExceptionMessages::failedToExecute("implementsMethod2", " TestInterface", ExceptionMessages::notEnoughArguments(2, args.Length())), args.G etIsolate()); 548 throwTypeError(ExceptionMessages::failedToExecute("implementsMethod2", " TestInterface", ExceptionMessages::notEnoughArguments(2, args.Length())), args.G etIsolate());
672 return; 549 return;
673 } 550 }
674 TestInterface* imp = V8TestInterface::toNative(args.Holder()); 551 TestInterface* imp = V8TestInterface::toNative(args.Holder());
675 ExceptionState es(args.GetIsolate()); 552 ExceptionState es(args.GetIsolate());
676 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]); 553 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
677 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0); 554 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[1])) : 0);
678 ExecutionContext* scriptContext = getExecutionContext(); 555 ExecutionContext* scriptContext = getExecutionContext();
679 RefPtr<TestObj> result = TestImplements::implementsMethod2(scriptContext, im p, strArg, objArg, es); 556 RefPtr<TestObj> result = TestImplements::implementsMethod2(scriptContext, im p, strArg, objArg, es);
680 if (es.throwIfNeeded()) 557 if (es.throwIfNeeded())
681 return; 558 return;
682 v8SetReturnValue(args, result.release(), args.Holder()); 559 v8SetReturnValue(args, result.release(), args.Holder());
683 return; 560 return;
684 } 561 }
685 562
686 #endif // ENABLE(Condition22) || ENABLE(Condition23)
687
688 #if ENABLE(Condition22) || ENABLE(Condition23)
689
690 static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args) 563 static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args)
691 { 564 {
692 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 565 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
693 TestInterfaceV8Internal::implementsMethod2Method(args); 566 TestInterfaceV8Internal::implementsMethod2Method(args);
694 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 567 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
695 } 568 }
696 569
697 #endif // ENABLE(Condition22) || ENABLE(Condition23)
698
699 #if ENABLE(Condition22) || ENABLE(Condition23)
700
701 static void implementsMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args) 570 static void implementsMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args)
702 { 571 {
703 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
704 V8TestInterface::implementsMethod3MethodCustom(args); 573 V8TestInterface::implementsMethod3MethodCustom(args);
705 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
706 } 575 }
707 576
708 #endif // ENABLE(Condition22) || ENABLE(Condition23)
709
710 #if ENABLE(Condition22) || ENABLE(Condition23)
711
712 static void implementsMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 577 static void implementsMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
713 { 578 {
714 TestImplements::implementsMethod4(); 579 TestImplements::implementsMethod4();
715 580
716 return; 581 return;
717 } 582 }
718 583
719 #endif // ENABLE(Condition22) || ENABLE(Condition23)
720
721 #if ENABLE(Condition22) || ENABLE(Condition23)
722
723 static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args) 584 static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& args)
724 { 585 {
725 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
726 TestInterfaceV8Internal::implementsMethod4Method(args); 587 TestInterfaceV8Internal::implementsMethod4Method(args);
727 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
728 } 589 }
729 590
730 #endif // ENABLE(Condition22) || ENABLE(Condition23)
731
732 #if ENABLE(Condition11) || ENABLE(Condition12) 591 #if ENABLE(Condition11) || ENABLE(Condition12)
733 592
734 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args) 593 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
735 { 594 {
736 TestInterface* imp = V8TestInterface::toNative(args.Holder()); 595 TestInterface* imp = V8TestInterface::toNative(args.Holder());
737 TestPartialInterface::supplementalMethod1(imp); 596 TestPartialInterface::supplementalMethod1(imp);
738 597
739 return; 598 return;
740 } 599 }
741 600
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Integer>& info) 778 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Integer>& info)
920 { 779 {
921 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 780 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
922 TestInterfaceV8Internal::namedPropertyQuery(name, info); 781 TestInterfaceV8Internal::namedPropertyQuery(name, info);
923 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 782 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
924 } 783 }
925 784
926 } // namespace TestInterfaceV8Internal 785 } // namespace TestInterfaceV8Internal
927 786
928 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = { 787 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = {
929 #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 */}, 788 {"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)
932 #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 */}, 789 {"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)
935 #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 */}, 790 {"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)
938 #if ENABLE(Condition22) || ENABLE(Condition23)
939 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, 791 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
940 #endif // ENABLE(Condition22) || ENABLE(Condition23)
941 #if ENABLE(Condition11) || ENABLE(Condition12) 792 #if ENABLE(Condition11) || ENABLE(Condition12)
942 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 793 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */},
943 #endif // ENABLE(Condition11) || ENABLE(Condition12) 794 #endif // ENABLE(Condition11) || ENABLE(Condition12)
944 #if ENABLE(Condition11) || ENABLE(Condition12) 795 #if ENABLE(Condition11) || ENABLE(Condition12)
945 {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */}, 796 {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
946 #endif // ENABLE(Condition11) || ENABLE(Condition12) 797 #endif // ENABLE(Condition11) || ENABLE(Condition12)
947 #if ENABLE(Condition11) || ENABLE(Condition12) 798 #if ENABLE(Condition11) || ENABLE(Condition12)
948 {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */}, 799 {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
949 #endif // ENABLE(Condition11) || ENABLE(Condition12) 800 #endif // ENABLE(Condition11) || ENABLE(Condition12)
950 #if ENABLE(Condition11) || ENABLE(Condition12) 801 #if ENABLE(Condition11) || ENABLE(Condition12)
951 {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttributeGette rCallback, TestInterfaceV8Internal::supplementalNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */}, 802 {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttributeGette rCallback, TestInterfaceV8Internal::supplementalNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
952 #endif // ENABLE(Condition11) || ENABLE(Condition12) 803 #endif // ENABLE(Condition11) || ENABLE(Condition12)
953 }; 804 };
954 805
955 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { 806 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
956 #if ENABLE(Condition22) || ENABLE(Condition23)
957 {"implementsMethod1", TestInterfaceV8Internal::implementsMethod1MethodCallba ck, 0, 0}, 807 {"implementsMethod1", TestInterfaceV8Internal::implementsMethod1MethodCallba ck, 0, 0},
958 #endif // ENABLE(Condition22) || ENABLE(Condition23)
959 #if ENABLE(Condition22) || ENABLE(Condition23)
960 {"implementsMethod3", TestInterfaceV8Internal::implementsMethod3MethodCallba ck, 0, 0}, 808 {"implementsMethod3", TestInterfaceV8Internal::implementsMethod3MethodCallba ck, 0, 0},
961 #endif // ENABLE(Condition22) || ENABLE(Condition23)
962 #if ENABLE(Condition11) || ENABLE(Condition12) 809 #if ENABLE(Condition11) || ENABLE(Condition12)
963 {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCa llback, 0, 0}, 810 {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCa llback, 0, 0},
964 #endif // ENABLE(Condition11) || ENABLE(Condition12) 811 #endif // ENABLE(Condition11) || ENABLE(Condition12)
965 #if ENABLE(Condition11) || ENABLE(Condition12) 812 #if ENABLE(Condition11) || ENABLE(Condition12)
966 {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCa llback, 0, 0}, 813 {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCa llback, 0, 0},
967 #endif // ENABLE(Condition11) || ENABLE(Condition12) 814 #endif // ENABLE(Condition11) || ENABLE(Condition12)
968 }; 815 };
969 816
970 void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Val ue>& args) 817 void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Val ue>& args)
971 { 818 {
(...skipping 19 matching lines...) Expand all
991 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestIn terface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount , 838 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestIn terface", v8::Local<v8::FunctionTemplate>(), V8TestInterface::internalFieldCount ,
992 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttributes), 839 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttributes),
993 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolat e, currentWorldType); 840 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods), isolat e, currentWorldType);
994 UNUSED_PARAM(defaultSignature); 841 UNUSED_PARAM(defaultSignature);
995 desc->SetCallHandler(V8TestInterface::constructorCallback); 842 desc->SetCallHandler(V8TestInterface::constructorCallback);
996 desc->SetLength(1); 843 desc->SetLength(1);
997 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); 844 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
998 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); 845 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
999 UNUSED_PARAM(instance); 846 UNUSED_PARAM(instance);
1000 UNUSED_PARAM(proto); 847 UNUSED_PARAM(proto);
1001 #if ENABLE(Condition22) || ENABLE(Condition23) 848 if (RuntimeEnabledFeatures::featureName23Enabled()) {
1002 if (RuntimeEnabledFeatures::condition23Enabled()) {
1003 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 849 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1004 {"Node23", TestInterfaceV8Internal::Node23AttributeGetterCallback, TestI nterfaceV8Internal::Node23AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}; 850 {"Node23", TestInterfaceV8Internal::Node23AttributeGetterCallback, TestI nterfaceV8Internal::Node23AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
1005 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate, currentWorldType); 851 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate, currentWorldType);
1006 } 852 }
1007 #endif // ENABLE(Condition22) || ENABLE(Condition23)
1008 #if ENABLE(Condition11) || ENABLE(Condition12) 853 #if ENABLE(Condition11) || ENABLE(Condition12)
1009 if (RuntimeEnabledFeatures::condition13Enabled()) { 854 if (RuntimeEnabledFeatures::condition13Enabled()) {
1010 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 855 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1011 {"Node13", TestInterfaceV8Internal::Node13AttributeGetterCallback, TestI nterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}; 856 {"Node13", TestInterfaceV8Internal::Node13AttributeGetterCallback, TestI nterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
1012 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate, currentWorldType); 857 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate, currentWorldType);
1013 } 858 }
1014 #endif // ENABLE(Condition11) || ENABLE(Condition12) 859 #endif // ENABLE(Condition11) || ENABLE(Condition12)
1015 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { 860 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = {
1016 {"IMPLEMENTSCONSTANT1", 1}, 861 {"IMPLEMENTSCONSTANT1", 1},
1017 {"IMPLEMENTSCONSTANT2", 2}, 862 {"IMPLEMENTSCONSTANT2", 2},
1018 {"SUPPLEMENTALCONSTANT1", 1}, 863 {"SUPPLEMENTALCONSTANT1", 1},
1019 {"SUPPLEMENTALCONSTANT2", 2}, 864 {"SUPPLEMENTALCONSTANT2", 2},
1020 }; 865 };
1021 V8DOMConfiguration::installConstants(desc, proto, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); 866 V8DOMConfiguration::installConstants(desc, proto, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate);
1022 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation); 867 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation);
1023 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS T_IMPLDoesntMatchWithImplementation); 868 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS T_IMPLDoesntMatchWithImplementation);
1024 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); 869 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation);
1025 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac e_CONST_IMPLDoesntMatchWithImplementation); 870 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac e_CONST_IMPLDoesntMatchWithImplementation);
1026 desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::n amedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback , TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Interna l::namedPropertyEnumeratorCallback); 871 desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::n amedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback , TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Interna l::namedPropertyEnumeratorCallback);
1027 #if ENABLE(Condition22) || ENABLE(Condition23)
1028 872
1029 // Custom Signature 'implementsMethod2' 873 // Custom Signature 'implementsMethod2'
1030 const int implementsMethod2Argc = 2; 874 const int implementsMethod2Argc = 2;
1031 v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc ] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTe mplate(&V8TestObject::info, currentWorldType) }; 875 v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc ] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTe mplate(&V8TestObject::info, currentWorldType) };
1032 v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(de sc, implementsMethod2Argc, implementsMethod2Argv); 876 v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(de sc, implementsMethod2Argc, implementsMethod2Argv);
1033 proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate: :New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), im plementsMethod2Signature, 2)); 877 proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate: :New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), im plementsMethod2Signature, 2));
1034 #endif // ENABLE(Condition22) || ENABLE(Condition23)
1035 #if ENABLE(Condition22) || ENABLE(Condition23)
1036 desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate:: New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8: :Local<v8::Signature>(), 0)); 878 desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate:: New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8: :Local<v8::Signature>(), 0));
1037 #endif // ENABLE(Condition22) || ENABLE(Condition23)
1038 #if ENABLE(Condition11) || ENABLE(Condition12) 879 #if ENABLE(Condition11) || ENABLE(Condition12)
1039 880
1040 // Custom Signature 'supplementalMethod2' 881 // Custom Signature 'supplementalMethod2'
1041 const int supplementalMethod2Argc = 2; 882 const int supplementalMethod2Argc = 2;
1042 v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2 Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r awTemplate(&V8TestObject::info, currentWorldType) }; 883 v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2 Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r awTemplate(&V8TestObject::info, currentWorldType) };
1043 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New( desc, supplementalMethod2Argc, supplementalMethod2Argv); 884 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New( desc, supplementalMethod2Argc, supplementalMethod2Argv);
1044 proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplat e::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined() , supplementalMethod2Signature, 2)); 885 proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplat e::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined() , supplementalMethod2Signature, 2));
1045 #endif // ENABLE(Condition11) || ENABLE(Condition12) 886 #endif // ENABLE(Condition11) || ENABLE(Condition12)
1046 #if ENABLE(Condition11) || ENABLE(Condition12) 887 #if ENABLE(Condition11) || ENABLE(Condition12)
1047 desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate ::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); 888 desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate ::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
1048 #endif // ENABLE(Condition11) || ENABLE(Condition12) 889 #endif // ENABLE(Condition11) || ENABLE(Condition12)
1049 #if ENABLE(Condition22) || ENABLE(Condition23)
1050 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticReadOnlyA ttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttributeGetterCallb ack, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8:: Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 890 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticReadOnlyA ttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttributeGetterCallb ack, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8:: Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
1051 #endif // ENABLE(Condition22) || ENABLE(Condition23)
1052 #if ENABLE(Condition22) || ENABLE(Condition23)
1053 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticAttr"), T estInterfaceV8Internal::implementsStaticAttrAttributeGetterCallback, TestInterfa ceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature> (), static_cast<v8::AccessControl>(v8::DEFAULT)); 891 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticAttr"), T estInterfaceV8Internal::implementsStaticAttrAttributeGetterCallback, TestInterfa ceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature> (), static_cast<v8::AccessControl>(v8::DEFAULT));
1054 #endif // ENABLE(Condition22) || ENABLE(Condition23)
1055 #if ENABLE(Condition11) || ENABLE(Condition12) 892 #if ENABLE(Condition11) || ENABLE(Condition12)
1056 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticReadOnl yAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttributeGetterC allback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT) ); 893 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticReadOnl yAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttributeGetterC allback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT) );
1057 #endif // ENABLE(Condition11) || ENABLE(Condition12) 894 #endif // ENABLE(Condition11) || ENABLE(Condition12)
1058 #if ENABLE(Condition11) || ENABLE(Condition12) 895 #if ENABLE(Condition11) || ENABLE(Condition12)
1059 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticAttr"), TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCallback, TestInt erfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v8::External::N ew(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSign ature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 896 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticAttr"), TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCallback, TestInt erfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v8::External::N ew(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSign ature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
1060 #endif // ENABLE(Condition11) || ENABLE(Condition12) 897 #endif // ENABLE(Condition11) || ENABLE(Condition12)
1061 898
1062 // Custom toString template 899 // Custom toString template
1063 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate()); 900 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate());
1064 return desc; 901 return desc;
(...skipping 19 matching lines...) Expand all
1084 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor ldType); 921 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor ldType);
1085 } 922 }
1086 923
1087 bool V8TestInterface::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Iso late* isolate) 924 bool V8TestInterface::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Iso late* isolate)
1088 { 925 {
1089 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) 926 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld)
1090 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo rld) 927 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo rld)
1091 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl d); 928 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl d);
1092 } 929 }
1093 930
1094 void V8TestInterface::installPerContextProperties(v8::Handle<v8::Object> instanc e, TestInterface* impl, v8::Isolate* isolate) 931 void V8TestInterface::installPerContextEnabledProperties(v8::Handle<v8::Object> instance, TestInterface* impl, v8::Isolate* isolate)
1095 { 932 {
1096 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto type()); 933 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto type());
1097 934 if (ContextFeatures::featureName24Enabled(impl->document())) {
1098 #if ENABLE(Condition22) || ENABLE(Condition23) 935 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1099 if (ContextFeatures::condition24Enabled(impl->document())) {
1100 static const V8DOMConfiguration::AttributeConfiguration attributeConf iguration =\
1101 {"Node24", TestInterfaceV8Internal::Node24AttributeGetterCallback, TestI nterfaceV8Internal::Node24AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}; 936 {"Node24", TestInterfaceV8Internal::Node24AttributeGetterCallback, TestI nterfaceV8Internal::Node24AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
1102 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate); 937 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate);
1103 } 938 }
1104 #endif // ENABLE(Condition22) || ENABLE(Condition23)
1105
1106 #if ENABLE(Condition22) || ENABLE(Condition23)
1107 if (ContextFeatures::condition26Enabled(impl->document()) && RuntimeEnabledF eatures::condition25Enabled()) {
1108 static const V8DOMConfiguration::AttributeConfiguration attributeConf iguration =\
1109 {"Node25", TestInterfaceV8Internal::Node25AttributeGetterCallback, TestI nterfaceV8Internal::Node25AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
1110 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate);
1111 }
1112 #endif // ENABLE(Condition22) || ENABLE(Condition23)
1113
1114 #if ENABLE(Condition11) || ENABLE(Condition12)
1115 if (ContextFeatures::condition14Enabled(impl->document())) { 939 if (ContextFeatures::condition14Enabled(impl->document())) {
1116 static const V8DOMConfiguration::AttributeConfiguration attributeConf iguration =\ 940 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1117 {"Node14", TestInterfaceV8Internal::Node14AttributeGetterCallback, TestI nterfaceV8Internal::Node14AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}; 941 {"Node14", TestInterfaceV8Internal::Node14AttributeGetterCallback, TestI nterfaceV8Internal::Node14AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
1118 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate); 942 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate);
1119 } 943 }
1120 #endif // ENABLE(Condition11) || ENABLE(Condition12) 944 if (ContextFeatures::condition16Enabled(impl->document())) {
1121 945 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1122 #if ENABLE(Condition11) || ENABLE(Condition12)
1123 if (ContextFeatures::condition16Enabled(impl->document()) && RuntimeEnabledF eatures::condition15Enabled()) {
1124 static const V8DOMConfiguration::AttributeConfiguration attributeConf iguration =\
1125 {"Node15", TestInterfaceV8Internal::Node15AttributeGetterCallback, TestI nterfaceV8Internal::Node15AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}; 946 {"Node15", TestInterfaceV8Internal::Node15AttributeGetterCallback, TestI nterfaceV8Internal::Node15AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
1126 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate); 947 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura tion, isolate);
1127 } 948 }
1128 #endif // ENABLE(Condition11) || ENABLE(Condition12)
1129 } 949 }
1130 950
1131 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> objec t) 951 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> objec t)
1132 { 952 {
1133 return toNative(object); 953 return toNative(object);
1134 } 954 }
1135 955
1136 v8::Handle<v8::Object> V8TestInterface::createWrapper(PassRefPtr<TestInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 956 v8::Handle<v8::Object> V8TestInterface::createWrapper(PassRefPtr<TestInterface> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
1137 { 957 {
1138 ASSERT(impl); 958 ASSERT(impl);
1139 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface>(impl.get(), isolate)) ; 959 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface>(impl.get(), isolate)) ;
1140 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 960 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
1141 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); 961 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get());
1142 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 962 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have
1143 // the same object de-ref functions, though, so use that as the basis of the check. 963 // the same object de-ref functions, though, so use that as the basis of the check.
1144 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction); 964 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction);
1145 } 965 }
1146 966
1147 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &info, toInternalPointer(impl.get()), isolate); 967 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &info, toInternalPointer(impl.get()), isolate);
1148 if (UNLIKELY(wrapper.IsEmpty())) 968 if (UNLIKELY(wrapper.IsEmpty()))
1149 return wrapper; 969 return wrapper;
1150 970
1151 installPerContextProperties(wrapper, impl.get(), isolate); 971 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
1152 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl, &info, wrapp er, isolate, WrapperConfiguration::Dependent); 972 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl, &info, wrapp er, isolate, WrapperConfiguration::Dependent);
1153 return wrapper; 973 return wrapper;
1154 } 974 }
1155 975
1156 void V8TestInterface::derefObject(void* object) 976 void V8TestInterface::derefObject(void* object)
1157 { 977 {
1158 fromInternalPointer(object)->deref(); 978 fromInternalPointer(object)->deref();
1159 } 979 }
1160 980
1161 } // namespace WebCore 981 } // namespace WebCore
1162 982
1163 #endif // ENABLE(Condition1) || ENABLE(Condition2) 983 #endif // ENABLE(Condition1) || ENABLE(Condition2)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.h ('k') | Source/bindings/tests/results/V8TestInterfaceEmpty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698