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

Side by Side Diff: Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 1078913002: Revert of bindings: Move named/indexed attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface5.h" 9 #include "V8TestInterface5.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 if (!perContextData) 52 if (!perContextData)
53 break; 53 break;
54 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data); 54 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data);
55 if (!wrapperTypeInfo) 55 if (!wrapperTypeInfo)
56 break; 56 break;
57 TestInterface5ImplementationForceSetAttributeOnThis(v8String(info.GetIso late(), wrapperTypeInfo->interfaceName), v8Value, info); 57 TestInterface5ImplementationForceSetAttributeOnThis(v8String(info.GetIso late(), wrapperTypeInfo->interfaceName), v8Value, info);
58 } while (false); // do ... while (false) just for use of break 58 } while (false); // do ... while (false) just for use of break
59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
60 } 60 }
61 61
62 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 62 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
63 { 63 {
64 v8::Local<v8::Object> holder = info.Holder(); 64 v8::Local<v8::Object> holder = info.Holder();
65 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 65 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
66 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 66 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
67 } 67 }
68 68
69 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 69 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
70 { 70 {
71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info); 72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info);
73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
74 } 74 }
75 75
76 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 76 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
77 { 77 {
78 v8::Local<v8::Object> holder = info.Holder(); 78 v8::Local<v8::Object> holder = info.Holder();
79 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate()); 79 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate());
80 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 80 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
81 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value); 81 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value);
82 if (!cppValue) { 82 if (!cppValue) {
83 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'."); 83 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'.");
84 exceptionState.throwIfNeeded(); 84 exceptionState.throwIfNeeded();
85 return; 85 return;
86 } 86 }
87 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); 87 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
88 } 88 }
89 89
90 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 90 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
91 { 91 {
92 v8::Local<v8::Value> v8Value = info[0];
93 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 92 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
94 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info); 93 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info);
95 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 94 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
96 } 95 }
97 96
98 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info) 97 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info)
99 { 98 {
100 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test InterfaceConstructorAttribute"); 99 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test InterfaceConstructorAttribute");
101 TestInterface5ImplementationForceSetAttributeOnThis(propertyName, v8Value, i nfo); 100 TestInterface5ImplementationForceSetAttributeOnThis(propertyName, v8Value, i nfo);
102 } 101 }
103 102
104 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo) 103 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
105 { 104 {
106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
107 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt ributeSetter(v8Value, info); 106 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt ributeSetter(v8Value, info);
108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
109 } 108 }
110 109
111 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) 110 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
112 { 111 {
113 v8::Local<v8::Object> holder = info.Holder(); 112 v8::Local<v8::Object> holder = info.Holder();
114 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 113 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
115 v8SetReturnValue(info, impl->doubleAttribute()); 114 v8SetReturnValue(info, impl->doubleAttribute());
116 } 115 }
117 116
118 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 117 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8 ::PropertyCallbackInfo<v8::Value>& info)
119 { 118 {
120 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 119 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
121 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ; 120 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ;
122 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 121 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
123 } 122 }
124 123
125 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) 124 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
126 { 125 {
127 v8::Local<v8::Object> holder = info.Holder(); 126 v8::Local<v8::Object> holder = info.Holder();
128 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate()); 127 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate());
129 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 128 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
130 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate); 129 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate);
131 if (exceptionState.throwIfNeeded()) 130 if (exceptionState.throwIfNeeded())
132 return; 131 return;
133 impl->setDoubleAttribute(cppValue); 132 impl->setDoubleAttribute(cppValue);
134 } 133 }
135 134
136 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 135 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
137 { 136 {
138 v8::Local<v8::Value> v8Value = info[0];
139 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 137 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
140 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info); 138 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info);
141 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 139 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
142 } 140 }
143 141
144 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info) 142 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
145 { 143 {
146 v8::Local<v8::Object> holder = info.Holder(); 144 v8::Local<v8::Object> holder = info.Holder();
147 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 145 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
148 v8SetReturnValue(info, impl->floatAttribute()); 146 v8SetReturnValue(info, impl->floatAttribute());
149 } 147 }
150 148
151 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 149 static void floatAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8: :PropertyCallbackInfo<v8::Value>& info)
152 { 150 {
153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 151 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
154 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); 152 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info);
155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 153 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
156 } 154 }
157 155
158 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info) 156 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
159 { 157 {
160 v8::Local<v8::Object> holder = info.Holder(); 158 v8::Local<v8::Object> holder = info.Holder();
161 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate()); 159 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate());
162 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 160 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
163 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e); 161 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e);
164 if (exceptionState.throwIfNeeded()) 162 if (exceptionState.throwIfNeeded())
165 return; 163 return;
166 impl->setFloatAttribute(cppValue); 164 impl->setFloatAttribute(cppValue);
167 } 165 }
168 166
169 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 167 static void floatAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
170 { 168 {
171 v8::Local<v8::Value> v8Value = info[0];
172 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 169 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
173 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info); 170 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info);
174 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 171 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
175 } 172 }
176 173
177 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) 174 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
178 { 175 {
179 v8::Local<v8::Object> holder = info.Holder(); 176 v8::Local<v8::Object> holder = info.Holder();
180 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 177 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
181 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 178 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
182 } 179 }
183 180
184 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 181 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Nam e>, const v8::PropertyCallbackInfo<v8::Value>& info)
185 { 182 {
186 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 183 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
187 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info); 184 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info);
188 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 185 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
189 } 186 }
190 187
191 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 188 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
192 { 189 {
193 v8::Local<v8::Object> holder = info.Holder(); 190 v8::Local<v8::Object> holder = info.Holder();
194 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate()); 191 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate());
195 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 192 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
196 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); 193 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
197 if (exceptionState.throwIfNeeded()) 194 if (exceptionState.throwIfNeeded())
198 return; 195 return;
199 impl->setUnrestrictedDoubleAttribute(cppValue); 196 impl->setUnrestrictedDoubleAttribute(cppValue);
200 } 197 }
201 198
202 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 199 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Nam e>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
203 { 200 {
204 v8::Local<v8::Value> v8Value = info[0];
205 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
206 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info); 202 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info);
207 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
208 } 204 }
209 205
210 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 206 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
211 { 207 {
212 v8::Local<v8::Object> holder = info.Holder(); 208 v8::Local<v8::Object> holder = info.Holder();
213 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 209 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
214 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 210 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
215 } 211 }
216 212
217 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 213 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Name >, const v8::PropertyCallbackInfo<v8::Value>& info)
218 { 214 {
219 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
220 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info); 216 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info);
221 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
222 } 218 }
223 219
224 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 220 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info)
225 { 221 {
226 v8::Local<v8::Object> holder = info.Holder(); 222 v8::Local<v8::Object> holder = info.Holder();
227 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate()); 223 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate());
228 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 224 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
229 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); 225 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
230 if (exceptionState.throwIfNeeded()) 226 if (exceptionState.throwIfNeeded())
231 return; 227 return;
232 impl->setUnrestrictedFloatAttribute(cppValue); 228 impl->setUnrestrictedFloatAttribute(cppValue);
233 } 229 }
234 230
235 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 231 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Name >, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
236 { 232 {
237 v8::Local<v8::Value> v8Value = info[0];
238 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 233 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
239 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info); 234 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info);
240 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 235 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
241 } 236 }
242 237
243 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 238 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
244 { 239 {
245 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate()); 240 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate());
246 } 241 }
247 242
(...skipping 12 matching lines...) Expand all
260 TestInterface5Implementation::setStaticStringAttribute(cppValue); 255 TestInterface5Implementation::setStaticStringAttribute(cppValue);
261 } 256 }
262 257
263 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 258 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
264 { 259 {
265 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
266 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info); 261 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info);
267 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
268 } 263 }
269 264
270 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 265 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
271 { 266 {
272 v8::Local<v8::Object> holder = info.Holder(); 267 v8::Local<v8::Object> holder = info.Holder();
273 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 268 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
274 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 269 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
275 } 270 }
276 271
277 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 272 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
278 { 273 {
279 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
280 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info); 275 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info);
281 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
282 } 277 }
283 278
284 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 279 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
285 { 280 {
286 v8::Local<v8::Object> holder = info.Holder(); 281 v8::Local<v8::Object> holder = info.Holder();
287 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 282 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
288 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 283 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
289 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 284 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
290 if (exceptionState.throwIfNeeded()) 285 if (exceptionState.throwIfNeeded())
291 return; 286 return;
292 impl->setAlwaysExposedAttribute(cppValue); 287 impl->setAlwaysExposedAttribute(cppValue);
293 } 288 }
294 289
295 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 290 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
296 { 291 {
297 v8::Local<v8::Value> v8Value = info[0];
298 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
299 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info); 293 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info);
300 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
301 } 295 }
302 296
303 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 297 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
304 { 298 {
305 v8::Local<v8::Object> holder = info.Holder(); 299 v8::Local<v8::Object> holder = info.Holder();
306 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 300 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
307 v8SetReturnValueInt(info, impl->workerExposedAttribute()); 301 v8SetReturnValueInt(info, impl->workerExposedAttribute());
308 } 302 }
309 303
310 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 304 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
311 { 305 {
312 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 306 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
313 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info); 307 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info);
314 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 308 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
315 } 309 }
316 310
317 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 311 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
318 { 312 {
319 v8::Local<v8::Object> holder = info.Holder(); 313 v8::Local<v8::Object> holder = info.Holder();
320 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 314 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
321 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 315 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
322 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 316 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
323 if (exceptionState.throwIfNeeded()) 317 if (exceptionState.throwIfNeeded())
324 return; 318 return;
325 impl->setWorkerExposedAttribute(cppValue); 319 impl->setWorkerExposedAttribute(cppValue);
326 } 320 }
327 321
328 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 322 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
329 { 323 {
330 v8::Local<v8::Value> v8Value = info[0];
331 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
332 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info); 325 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info);
333 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
334 } 327 }
335 328
336 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 329 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
337 { 330 {
338 v8::Local<v8::Object> holder = info.Holder(); 331 v8::Local<v8::Object> holder = info.Holder();
339 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 332 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
340 v8SetReturnValueInt(info, impl->windowExposedAttribute()); 333 v8SetReturnValueInt(info, impl->windowExposedAttribute());
341 } 334 }
342 335
343 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 336 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
344 { 337 {
345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 338 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
346 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info); 339 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info);
347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 340 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
348 } 341 }
349 342
350 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 343 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
351 { 344 {
352 v8::Local<v8::Object> holder = info.Holder(); 345 v8::Local<v8::Object> holder = info.Holder();
353 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 346 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
354 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 347 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
355 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 348 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
356 if (exceptionState.throwIfNeeded()) 349 if (exceptionState.throwIfNeeded())
357 return; 350 return;
358 impl->setWindowExposedAttribute(cppValue); 351 impl->setWindowExposedAttribute(cppValue);
359 } 352 }
360 353
361 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 354 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::Name>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
362 { 355 {
363 v8::Local<v8::Value> v8Value = info[0];
364 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 356 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
365 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info); 357 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info);
366 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 358 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
367 } 359 }
368 360
369 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 361 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
370 { 362 {
371 if (UNLIKELY(info.Length() < 1)) { 363 if (UNLIKELY(info.Length() < 1)) {
372 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le ngth()), info.GetIsolate()); 364 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le ngth()), info.GetIsolate());
373 return; 365 return;
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 TestInterface5Implementation* referencedName = impl->referencedName(); 892 TestInterface5Implementation* referencedName = impl->referencedName();
901 if (referencedName) { 893 if (referencedName) {
902 if (!DOMDataStore::containsWrapper(referencedName, isolate)) 894 if (!DOMDataStore::containsWrapper(referencedName, isolate))
903 referencedName->wrap(creationContext, isolate); 895 referencedName->wrap(creationContext, isolate);
904 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); 896 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate);
905 } 897 }
906 setObjectGroup(isolate, scriptWrappable, wrapper); 898 setObjectGroup(isolate, scriptWrappable, wrapper);
907 } 899 }
908 900
909 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = { 901 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = {
902 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
910 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance}, 903 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance},
911 }; 904 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts, V8DOMConfiguration::OnInstance},
912 905 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::OnInstance},
913 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = { 906 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast <v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
914 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts}, 907 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
915 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts}, 908 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
916 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts },
917 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast <v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts},
918 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts},
919 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts},
920 }; 909 };
921 910
922 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { 911 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
923 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 912 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
924 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts}, 913 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts},
925 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 914 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
926 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts}, 915 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts},
927 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 916 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
928 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 917 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
929 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 918 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts},
930 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts}, 919 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts},
931 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 920 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
932 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 921 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts},
933 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts}, 922 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0 , 1, V8DOMConfiguration::ExposedToAllScripts},
934 }; 923 };
935 924
936 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) 925 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate)
937 { 926 {
938 functionTemplate->ReadOnlyPrototype(); 927 functionTemplate->ReadOnlyPrototype();
939 928
940 v8::Local<v8::Signature> defaultSignature; 929 v8::Local<v8::Signature> defaultSignature;
941 if (!RuntimeEnabledFeatures::featureNameEnabled()) 930 if (!RuntimeEnabledFeatures::featureNameEnabled())
942 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac e5::internalFieldCount, 0, 0, 0, 0, 0, 0); 931 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac e5::internalFieldCount, 0, 0, 0, 0, 0, 0);
943 else 932 else
944 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount, 933 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount,
945 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attribu tes), 934 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attribu tes),
946 V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessor s), 935 0, 0,
947 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods)); 936 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods));
948 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 937 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
949 ALLOW_UNUSED_LOCAL(instanceTemplate); 938 ALLOW_UNUSED_LOCAL(instanceTemplate);
950 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 939 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
951 ALLOW_UNUSED_LOCAL(prototypeTemplate); 940 ALLOW_UNUSED_LOCAL(prototypeTemplate);
952 static const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Const ants[] = { 941 static const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Const ants[] = {
953 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} , 942 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} ,
954 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 943 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
955 }; 944 };
956 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); 945 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 { 1001 {
1013 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 1002 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
1014 } 1003 }
1015 1004
1016 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate) 1005 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate)
1017 { 1006 {
1018 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 1007 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
1019 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1008 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1020 1009
1021 if (context && (context->isWorkerGlobalScope())) { 1010 if (context && (context->isWorkerGlobalScope())) {
1022 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts}; 1011 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::work erExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna l::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
1023 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration); 1012 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
1024 } 1013 }
1025 if (context && (context->isDocument())) { 1014 if (context && (context->isDocument())) {
1026 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts}; 1015 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::wind owExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna l::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
1027 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration); 1016 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
1028 } 1017 }
1029 } 1018 }
1030 1019
1031 void V8TestInterface5::installConditionallyEnabledMethods(v8::Local<v8::Object> prototypeObject, v8::Isolate* isolate) 1020 void V8TestInterface5::installConditionallyEnabledMethods(v8::Local<v8::Object> prototypeObject, v8::Isolate* isolate)
1032 { 1021 {
1033 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1022 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
1034 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1023 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1035 ASSERT(context); 1024 ASSERT(context);
1036 1025
1037 if (context && (context->isWorkerGlobalScope())) { 1026 if (context && (context->isWorkerGlobalScope())) {
(...skipping 17 matching lines...) Expand all
1055 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1044 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1056 } 1045 }
1057 1046
1058 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1047 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1059 { 1048 {
1060 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1049 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1061 } 1050 }
1062 1051
1063 } // namespace blink 1052 } // namespace blink
1064 #endif // ENABLE(CONDITION) 1053 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698