OLD | NEW |
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 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "HTMLNames.h" | 10 #include "HTMLNames.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 v8SetReturnValueString(info, TestObject::staticStringAttr(), info.GetIsolate
()); | 132 v8SetReturnValueString(info, TestObject::staticStringAttr(), info.GetIsolate
()); |
133 } | 133 } |
134 | 134 |
135 static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 135 static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
136 { | 136 { |
137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
138 TestObjectV8Internal::staticStringAttrAttributeGetter(info); | 138 TestObjectV8Internal::staticStringAttrAttributeGetter(info); |
139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
140 } | 140 } |
141 | 141 |
142 static void staticStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 142 static void staticStringAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
143 { | 143 { |
144 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 144 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
145 TestObject::setStaticStringAttr(cppValue); | 145 TestObject::setStaticStringAttr(cppValue); |
146 } | 146 } |
147 | 147 |
148 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 148 static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
149 { | 149 { |
150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
151 TestObjectV8Internal::staticStringAttrAttributeSetter(jsValue, info); | 151 TestObjectV8Internal::staticStringAttrAttributeSetter(v8Value, info); |
152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
153 } | 153 } |
154 | 154 |
155 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 155 static void enumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
156 { | 156 { |
157 v8::Handle<v8::Object> holder = info.Holder(); | 157 v8::Handle<v8::Object> holder = info.Holder(); |
158 TestObject* impl = V8TestObject::toNative(holder); | 158 TestObject* impl = V8TestObject::toNative(holder); |
159 v8SetReturnValueString(info, impl->enumAttr(), info.GetIsolate()); | 159 v8SetReturnValueString(info, impl->enumAttr(), info.GetIsolate()); |
160 } | 160 } |
161 | 161 |
162 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 162 static void enumAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
163 { | 163 { |
164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
165 TestObjectV8Internal::enumAttrAttributeGetter(info); | 165 TestObjectV8Internal::enumAttrAttributeGetter(info); |
166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
167 } | 167 } |
168 | 168 |
169 static void enumAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 169 static void enumAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
170 { | 170 { |
171 v8::Handle<v8::Object> holder = info.Holder(); | 171 v8::Handle<v8::Object> holder = info.Holder(); |
172 TestObject* impl = V8TestObject::toNative(holder); | 172 TestObject* impl = V8TestObject::toNative(holder); |
173 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 173 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
174 String string = cppValue; | 174 String string = cppValue; |
175 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 175 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) |
176 return; | 176 return; |
177 impl->setEnumAttr(cppValue); | 177 impl->setEnumAttr(cppValue); |
178 } | 178 } |
179 | 179 |
180 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 180 static void enumAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
181 { | 181 { |
182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
183 TestObjectV8Internal::enumAttrAttributeSetter(jsValue, info); | 183 TestObjectV8Internal::enumAttrAttributeSetter(v8Value, info); |
184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
185 } | 185 } |
186 | 186 |
187 static void readOnlyEnumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 187 static void readOnlyEnumAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
188 { | 188 { |
189 v8::Handle<v8::Object> holder = info.Holder(); | 189 v8::Handle<v8::Object> holder = info.Holder(); |
190 TestObject* impl = V8TestObject::toNative(holder); | 190 TestObject* impl = V8TestObject::toNative(holder); |
191 v8SetReturnValueString(info, impl->readOnlyEnumAttr(), info.GetIsolate()); | 191 v8SetReturnValueString(info, impl->readOnlyEnumAttr(), info.GetIsolate()); |
192 } | 192 } |
193 | 193 |
(...skipping 11 matching lines...) Expand all Loading... |
205 v8SetReturnValueInt(info, impl->byteAttr()); | 205 v8SetReturnValueInt(info, impl->byteAttr()); |
206 } | 206 } |
207 | 207 |
208 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 208 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
209 { | 209 { |
210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
211 TestObjectV8Internal::byteAttrAttributeGetter(info); | 211 TestObjectV8Internal::byteAttrAttributeGetter(info); |
212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
213 } | 213 } |
214 | 214 |
215 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 215 static void byteAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
216 { | 216 { |
217 v8::Handle<v8::Object> holder = info.Holder(); | 217 v8::Handle<v8::Object> holder = info.Holder(); |
218 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te
stObject", holder, info.GetIsolate()); | 218 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te
stObject", holder, info.GetIsolate()); |
219 TestObject* impl = V8TestObject::toNative(holder); | 219 TestObject* impl = V8TestObject::toNative(holder); |
220 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), ex
ceptionState); | 220 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(v8Value, exceptionState), ex
ceptionState); |
221 impl->setByteAttr(cppValue); | 221 impl->setByteAttr(cppValue); |
222 } | 222 } |
223 | 223 |
224 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 224 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
225 { | 225 { |
226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
227 TestObjectV8Internal::byteAttrAttributeSetter(jsValue, info); | 227 TestObjectV8Internal::byteAttrAttributeSetter(v8Value, info); |
228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
229 } | 229 } |
230 | 230 |
231 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 231 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
232 { | 232 { |
233 v8::Handle<v8::Object> holder = info.Holder(); | 233 v8::Handle<v8::Object> holder = info.Holder(); |
234 TestObject* impl = V8TestObject::toNative(holder); | 234 TestObject* impl = V8TestObject::toNative(holder); |
235 v8SetReturnValueUnsigned(info, impl->octetAttr()); | 235 v8SetReturnValueUnsigned(info, impl->octetAttr()); |
236 } | 236 } |
237 | 237 |
238 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 238 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
239 { | 239 { |
240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
241 TestObjectV8Internal::octetAttrAttributeGetter(info); | 241 TestObjectV8Internal::octetAttrAttributeGetter(info); |
242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
243 } | 243 } |
244 | 244 |
245 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) | 245 static void octetAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pro
pertyCallbackInfo<void>& info) |
246 { | 246 { |
247 v8::Handle<v8::Object> holder = info.Holder(); | 247 v8::Handle<v8::Object> holder = info.Holder(); |
248 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T
estObject", holder, info.GetIsolate()); | 248 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T
estObject", holder, info.GetIsolate()); |
249 TestObject* impl = V8TestObject::toNative(holder); | 249 TestObject* impl = V8TestObject::toNative(holder); |
250 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionStat
e), exceptionState); | 250 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(v8Value, exceptionStat
e), exceptionState); |
251 impl->setOctetAttr(cppValue); | 251 impl->setOctetAttr(cppValue); |
252 } | 252 } |
253 | 253 |
254 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 254 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
255 { | 255 { |
256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
257 TestObjectV8Internal::octetAttrAttributeSetter(jsValue, info); | 257 TestObjectV8Internal::octetAttrAttributeSetter(v8Value, info); |
258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
259 } | 259 } |
260 | 260 |
261 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 261 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
262 { | 262 { |
263 v8::Handle<v8::Object> holder = info.Holder(); | 263 v8::Handle<v8::Object> holder = info.Holder(); |
264 TestObject* impl = V8TestObject::toNative(holder); | 264 TestObject* impl = V8TestObject::toNative(holder); |
265 v8SetReturnValueInt(info, impl->shortAttr()); | 265 v8SetReturnValueInt(info, impl->shortAttr()); |
266 } | 266 } |
267 | 267 |
268 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 268 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
269 { | 269 { |
270 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 270 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
271 TestObjectV8Internal::shortAttrAttributeGetter(info); | 271 TestObjectV8Internal::shortAttrAttributeGetter(info); |
272 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 272 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
273 } | 273 } |
274 | 274 |
275 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro
pertyCallbackInfo<void>& info) | 275 static void shortAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pro
pertyCallbackInfo<void>& info) |
276 { | 276 { |
277 v8::Handle<v8::Object> holder = info.Holder(); | 277 v8::Handle<v8::Object> holder = info.Holder(); |
278 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T
estObject", holder, info.GetIsolate()); | 278 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T
estObject", holder, info.GetIsolate()); |
279 TestObject* impl = V8TestObject::toNative(holder); | 279 TestObject* impl = V8TestObject::toNative(holder); |
280 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), e
xceptionState); | 280 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(v8Value, exceptionState), e
xceptionState); |
281 impl->setShortAttr(cppValue); | 281 impl->setShortAttr(cppValue); |
282 } | 282 } |
283 | 283 |
284 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 284 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
285 { | 285 { |
286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
287 TestObjectV8Internal::shortAttrAttributeSetter(jsValue, info); | 287 TestObjectV8Internal::shortAttrAttributeSetter(v8Value, info); |
288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
289 } | 289 } |
290 | 290 |
291 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) | 291 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::
Value>& info) |
292 { | 292 { |
293 v8::Handle<v8::Object> holder = info.Holder(); | 293 v8::Handle<v8::Object> holder = info.Holder(); |
294 TestObject* impl = V8TestObject::toNative(holder); | 294 TestObject* impl = V8TestObject::toNative(holder); |
295 v8SetReturnValueUnsigned(info, impl->unsignedShortAttr()); | 295 v8SetReturnValueUnsigned(info, impl->unsignedShortAttr()); |
296 } | 296 } |
297 | 297 |
298 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 298 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
299 { | 299 { |
300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 300 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
301 TestObjectV8Internal::unsignedShortAttrAttributeGetter(info); | 301 TestObjectV8Internal::unsignedShortAttrAttributeGetter(info); |
302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 302 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
303 } | 303 } |
304 | 304 |
305 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 305 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
306 { | 306 { |
307 v8::Handle<v8::Object> holder = info.Holder(); | 307 v8::Handle<v8::Object> holder = info.Holder(); |
308 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttr", "TestObject", holder, info.GetIsolate()); | 308 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA
ttr", "TestObject", holder, info.GetIsolate()); |
309 TestObject* impl = V8TestObject::toNative(holder); | 309 TestObject* impl = V8TestObject::toNative(holder); |
310 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionSta
te), exceptionState); | 310 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, exceptionSta
te), exceptionState); |
311 impl->setUnsignedShortAttr(cppValue); | 311 impl->setUnsignedShortAttr(cppValue); |
312 } | 312 } |
313 | 313 |
314 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 314 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
315 { | 315 { |
316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
317 TestObjectV8Internal::unsignedShortAttrAttributeSetter(jsValue, info); | 317 TestObjectV8Internal::unsignedShortAttrAttributeSetter(v8Value, info); |
318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
319 } | 319 } |
320 | 320 |
321 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 321 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
322 { | 322 { |
323 v8::Handle<v8::Object> holder = info.Holder(); | 323 v8::Handle<v8::Object> holder = info.Holder(); |
324 TestObject* impl = V8TestObject::toNative(holder); | 324 TestObject* impl = V8TestObject::toNative(holder); |
325 v8SetReturnValueInt(info, impl->longAttr()); | 325 v8SetReturnValueInt(info, impl->longAttr()); |
326 } | 326 } |
327 | 327 |
328 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 328 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
329 { | 329 { |
330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
331 TestObjectV8Internal::longAttrAttributeGetter(info); | 331 TestObjectV8Internal::longAttrAttributeGetter(info); |
332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
333 } | 333 } |
334 | 334 |
335 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 335 static void longAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
336 { | 336 { |
337 v8::Handle<v8::Object> holder = info.Holder(); | 337 v8::Handle<v8::Object> holder = info.Holder(); |
338 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te
stObject", holder, info.GetIsolate()); | 338 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te
stObject", holder, info.GetIsolate()); |
339 TestObject* impl = V8TestObject::toNative(holder); | 339 TestObject* impl = V8TestObject::toNative(holder); |
340 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 340 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
341 impl->setLongAttr(cppValue); | 341 impl->setLongAttr(cppValue); |
342 } | 342 } |
343 | 343 |
344 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 344 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
345 { | 345 { |
346 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 346 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
347 TestObjectV8Internal::longAttrAttributeSetter(jsValue, info); | 347 TestObjectV8Internal::longAttrAttributeSetter(v8Value, info); |
348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
349 } | 349 } |
350 | 350 |
351 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 351 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
352 { | 352 { |
353 v8::Handle<v8::Object> holder = info.Holder(); | 353 v8::Handle<v8::Object> holder = info.Holder(); |
354 TestObject* impl = V8TestObject::toNative(holder); | 354 TestObject* impl = V8TestObject::toNative(holder); |
355 v8SetReturnValue(info, static_cast<double>(impl->longLongAttr())); | 355 v8SetReturnValue(info, static_cast<double>(impl->longLongAttr())); |
356 } | 356 } |
357 | 357 |
358 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 358 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
359 { | 359 { |
360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
361 TestObjectV8Internal::longLongAttrAttributeGetter(info); | 361 TestObjectV8Internal::longLongAttrAttributeGetter(info); |
362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
363 } | 363 } |
364 | 364 |
365 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) | 365 static void longLongAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
366 { | 366 { |
367 v8::Handle<v8::Object> holder = info.Holder(); | 367 v8::Handle<v8::Object> holder = info.Holder(); |
368 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr",
"TestObject", holder, info.GetIsolate()); | 368 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr",
"TestObject", holder, info.GetIsolate()); |
369 TestObject* impl = V8TestObject::toNative(holder); | 369 TestObject* impl = V8TestObject::toNative(holder); |
370 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionSta
te), exceptionState); | 370 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(v8Value, exceptionSta
te), exceptionState); |
371 impl->setLongLongAttr(cppValue); | 371 impl->setLongLongAttr(cppValue); |
372 } | 372 } |
373 | 373 |
374 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 374 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
375 { | 375 { |
376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
377 TestObjectV8Internal::longLongAttrAttributeSetter(jsValue, info); | 377 TestObjectV8Internal::longLongAttrAttributeSetter(v8Value, info); |
378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
379 } | 379 } |
380 | 380 |
381 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 381 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
382 { | 382 { |
383 v8::Handle<v8::Object> holder = info.Holder(); | 383 v8::Handle<v8::Object> holder = info.Holder(); |
384 TestObject* impl = V8TestObject::toNative(holder); | 384 TestObject* impl = V8TestObject::toNative(holder); |
385 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); | 385 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttr())); |
386 } | 386 } |
387 | 387 |
388 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 388 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
389 { | 389 { |
390 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 390 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
391 TestObjectV8Internal::unsignedLongLongAttrAttributeGetter(info); | 391 TestObjectV8Internal::unsignedLongLongAttrAttributeGetter(info); |
392 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 392 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
393 } | 393 } |
394 | 394 |
395 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 395 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
396 { | 396 { |
397 v8::Handle<v8::Object> holder = info.Holder(); | 397 v8::Handle<v8::Object> holder = info.Holder(); |
398 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestObject", holder, info.GetIsolate()); | 398 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo
ngAttr", "TestObject", holder, info.GetIsolate()); |
399 TestObject* impl = V8TestObject::toNative(holder); | 399 TestObject* impl = V8TestObject::toNative(holder); |
400 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex
ceptionState), exceptionState); | 400 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, ex
ceptionState), exceptionState); |
401 impl->setUnsignedLongLongAttr(cppValue); | 401 impl->setUnsignedLongLongAttr(cppValue); |
402 } | 402 } |
403 | 403 |
404 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 404 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
405 { | 405 { |
406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
407 TestObjectV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); | 407 TestObjectV8Internal::unsignedLongLongAttrAttributeSetter(v8Value, info); |
408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
409 } | 409 } |
410 | 410 |
411 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 411 static void stringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
412 { | 412 { |
413 v8::Handle<v8::Object> holder = info.Holder(); | 413 v8::Handle<v8::Object> holder = info.Holder(); |
414 TestObject* impl = V8TestObject::toNative(holder); | 414 TestObject* impl = V8TestObject::toNative(holder); |
415 v8SetReturnValueString(info, impl->stringAttr(), info.GetIsolate()); | 415 v8SetReturnValueString(info, impl->stringAttr(), info.GetIsolate()); |
416 } | 416 } |
417 | 417 |
418 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 418 static void stringAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
419 { | 419 { |
420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
421 TestObjectV8Internal::stringAttrAttributeGetter(info); | 421 TestObjectV8Internal::stringAttrAttributeGetter(info); |
422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
423 } | 423 } |
424 | 424 |
425 static void stringAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 425 static void stringAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
426 { | 426 { |
427 v8::Handle<v8::Object> holder = info.Holder(); | 427 v8::Handle<v8::Object> holder = info.Holder(); |
428 TestObject* impl = V8TestObject::toNative(holder); | 428 TestObject* impl = V8TestObject::toNative(holder); |
429 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 429 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
430 impl->setStringAttr(cppValue); | 430 impl->setStringAttr(cppValue); |
431 } | 431 } |
432 | 432 |
433 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 433 static void stringAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
434 { | 434 { |
435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
436 TestObjectV8Internal::stringAttrAttributeSetter(jsValue, info); | 436 TestObjectV8Internal::stringAttrAttributeSetter(v8Value, info); |
437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
438 } | 438 } |
439 | 439 |
440 static void treatNullAsNullStringStringAttrAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 440 static void treatNullAsNullStringStringAttrAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
441 { | 441 { |
442 v8::Handle<v8::Object> holder = info.Holder(); | 442 v8::Handle<v8::Object> holder = info.Holder(); |
443 TestObject* impl = V8TestObject::toNative(holder); | 443 TestObject* impl = V8TestObject::toNative(holder); |
444 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttr(), info.G
etIsolate()); | 444 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttr(), info.G
etIsolate()); |
445 } | 445 } |
446 | 446 |
447 static void treatNullAsNullStringStringAttrAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 447 static void treatNullAsNullStringStringAttrAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
448 { | 448 { |
449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
450 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeGetter(info); | 450 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeGetter(info); |
451 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 451 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
452 } | 452 } |
453 | 453 |
454 static void treatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 454 static void treatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
455 { | 455 { |
456 v8::Handle<v8::Object> holder = info.Holder(); | 456 v8::Handle<v8::Object> holder = info.Holder(); |
457 TestObject* impl = V8TestObject::toNative(holder); | 457 TestObject* impl = V8TestObject::toNative(holder); |
458 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 458 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
459 impl->setTreatNullAsNullStringStringAttr(cppValue); | 459 impl->setTreatNullAsNullStringStringAttr(cppValue); |
460 } | 460 } |
461 | 461 |
462 static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 462 static void treatNullAsNullStringStringAttrAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
463 { | 463 { |
464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
465 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(jsValue
, info); | 465 TestObjectV8Internal::treatNullAsNullStringStringAttrAttributeSetter(v8Value
, info); |
466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
467 } | 467 } |
468 | 468 |
469 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) | 469 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tter(const v8::PropertyCallbackInfo<v8::Value>& info) |
470 { | 470 { |
471 v8::Handle<v8::Object> holder = info.Holder(); | 471 v8::Handle<v8::Object> holder = info.Holder(); |
472 TestObject* impl = V8TestObject::toNative(holder); | 472 TestObject* impl = V8TestObject::toNative(holder); |
473 v8SetReturnValueString(info, impl->treatNullAsNullStringTreatUndefinedAsNull
StringStringAttr(), info.GetIsolate()); | 473 v8SetReturnValueString(info, impl->treatNullAsNullStringTreatUndefinedAsNull
StringStringAttr(), info.GetIsolate()); |
474 } | 474 } |
475 | 475 |
476 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 476 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeGe
tterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
477 { | 477 { |
478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
479 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetter(info); | 479 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeGetter(info); |
480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
481 } | 481 } |
482 | 482 |
483 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 483 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
484 { | 484 { |
485 v8::Handle<v8::Object> holder = info.Holder(); | 485 v8::Handle<v8::Object> holder = info.Holder(); |
486 TestObject* impl = V8TestObject::toNative(holder); | 486 TestObject* impl = V8TestObject::toNative(holder); |
487 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 487 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
488 impl->setTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr(cppValue)
; | 488 impl->setTreatNullAsNullStringTreatUndefinedAsNullStringStringAttr(cppValue)
; |
489 } | 489 } |
490 | 490 |
491 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 491 static void treatNullAsNullStringTreatUndefinedAsNullStringStringAttrAttributeSe
tterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
492 { | 492 { |
493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
494 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeSetter(jsValue, info); | 494 TestObjectV8Internal::treatNullAsNullStringTreatUndefinedAsNullStringStringA
ttrAttributeSetter(v8Value, info); |
495 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 495 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
496 } | 496 } |
497 | 497 |
498 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 498 static void eventHandlerAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
499 { | 499 { |
500 v8::Handle<v8::Object> holder = info.Holder(); | 500 v8::Handle<v8::Object> holder = info.Holder(); |
501 TestObject* impl = V8TestObject::toNative(holder); | 501 TestObject* impl = V8TestObject::toNative(holder); |
502 EventListener* jsValue = impl->eventHandlerAttr(); | 502 EventListener* v8Value = impl->eventHandlerAttr(); |
503 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); | 503 v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); |
504 } | 504 } |
505 | 505 |
506 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 506 static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
507 { | 507 { |
508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
509 TestObjectV8Internal::eventHandlerAttrAttributeGetter(info); | 509 TestObjectV8Internal::eventHandlerAttrAttributeGetter(info); |
510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
511 } | 511 } |
512 | 512 |
513 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 513 static void eventHandlerAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
514 { | 514 { |
515 v8::Handle<v8::Object> holder = info.Holder(); | 515 v8::Handle<v8::Object> holder = info.Holder(); |
516 TestObject* impl = V8TestObject::toNative(holder); | 516 TestObject* impl = V8TestObject::toNative(holder); |
517 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttr(), jsValue, V8T
estObject::eventListenerCacheIndex, info.GetIsolate()); | 517 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttr(), v8Value, V8T
estObject::eventListenerCacheIndex, info.GetIsolate()); |
518 impl->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, tru
e, ListenerFindOrCreate)); | 518 impl->setEventHandlerAttr(V8EventListenerList::getEventListener(v8Value, tru
e, ListenerFindOrCreate)); |
519 } | 519 } |
520 | 520 |
521 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 521 static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
522 { | 522 { |
523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
524 TestObjectV8Internal::eventHandlerAttrAttributeSetter(jsValue, info); | 524 TestObjectV8Internal::eventHandlerAttrAttributeSetter(v8Value, info); |
525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
526 } | 526 } |
527 | 527 |
528 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 528 static void testObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
529 { | 529 { |
530 v8::Handle<v8::Object> holder = info.Holder(); | 530 v8::Handle<v8::Object> holder = info.Holder(); |
531 TestObject* impl = V8TestObject::toNative(holder); | 531 TestObject* impl = V8TestObject::toNative(holder); |
532 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjAttr()), impl); | 532 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjAttr()), impl); |
533 } | 533 } |
534 | 534 |
535 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 535 static void testObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
536 { | 536 { |
537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
538 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 538 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
539 TestObjectV8Internal::testObjAttrAttributeGetter(info); | 539 TestObjectV8Internal::testObjAttrAttributeGetter(info); |
540 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 540 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
541 } | 541 } |
542 | 542 |
543 static void testObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 543 static void testObjAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
544 { | 544 { |
545 v8::Handle<v8::Object> holder = info.Holder(); | 545 v8::Handle<v8::Object> holder = info.Holder(); |
546 TestObject* impl = V8TestObject::toNative(holder); | 546 TestObject* impl = V8TestObject::toNative(holder); |
547 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 547 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
548 impl->setTestObjAttr(WTF::getPtr(cppValue)); | 548 impl->setTestObjAttr(WTF::getPtr(cppValue)); |
549 } | 549 } |
550 | 550 |
551 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 551 static void testObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
552 { | 552 { |
553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
554 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 554 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
555 TestObjectV8Internal::testObjAttrAttributeSetter(jsValue, info); | 555 TestObjectV8Internal::testObjAttrAttributeSetter(v8Value, info); |
556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
557 } | 557 } |
558 | 558 |
559 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 559 static void attrWithJSGetterAndSetterAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
560 { | 560 { |
561 v8::Handle<v8::Object> holder = info.Holder(); | 561 v8::Handle<v8::Object> holder = info.Holder(); |
562 TestObject* impl = V8TestObject::toNative(holder); | 562 TestObject* impl = V8TestObject::toNative(holder); |
563 v8SetReturnValueString(info, impl->attrWithJSGetterAndSetter(), info.GetIsol
ate()); | 563 v8SetReturnValueString(info, impl->attrWithJSGetterAndSetter(), info.GetIsol
ate()); |
564 } | 564 } |
565 | 565 |
566 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 566 static void attrWithJSGetterAndSetterAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
567 { | 567 { |
568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
569 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); | 569 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeGetter(info); |
570 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 570 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
571 } | 571 } |
572 | 572 |
573 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::FunctionCallbackInfo<v8::Value>& info) | 573 static void attrWithJSGetterAndSetterAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
574 { | 574 { |
575 v8::Handle<v8::Object> holder = info.Holder(); | 575 v8::Handle<v8::Object> holder = info.Holder(); |
576 TestObject* impl = V8TestObject::toNative(holder); | 576 TestObject* impl = V8TestObject::toNative(holder); |
577 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 577 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
578 impl->setAttrWithJSGetterAndSetter(cppValue); | 578 impl->setAttrWithJSGetterAndSetter(cppValue); |
579 } | 579 } |
580 | 580 |
581 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 581 static void attrWithJSGetterAndSetterAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
582 { | 582 { |
583 v8::Local<v8::Value> jsValue = info[0]; | 583 v8::Local<v8::Value> v8Value = info[0]; |
584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
585 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(jsValue, info
); | 585 TestObjectV8Internal::attrWithJSGetterAndSetterAttributeSetter(v8Value, info
); |
586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
587 } | 587 } |
588 | 588 |
589 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 589 static void XMLObjAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
590 { | 590 { |
591 v8::Handle<v8::Object> holder = info.Holder(); | 591 v8::Handle<v8::Object> holder = info.Holder(); |
592 TestObject* impl = V8TestObject::toNative(holder); | 592 TestObject* impl = V8TestObject::toNative(holder); |
593 v8SetReturnValueFast(info, WTF::getPtr(impl->xmlObjAttr()), impl); | 593 v8SetReturnValueFast(info, WTF::getPtr(impl->xmlObjAttr()), impl); |
594 } | 594 } |
595 | 595 |
596 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 596 static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
597 { | 597 { |
598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
599 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); | 599 TestObjectV8Internal::XMLObjAttrAttributeGetter(info); |
600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
601 } | 601 } |
602 | 602 |
603 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 603 static void XMLObjAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
604 { | 604 { |
605 v8::Handle<v8::Object> holder = info.Holder(); | 605 v8::Handle<v8::Object> holder = info.Holder(); |
606 TestObject* impl = V8TestObject::toNative(holder); | 606 TestObject* impl = V8TestObject::toNative(holder); |
607 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 607 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
608 impl->setXMLObjAttr(WTF::getPtr(cppValue)); | 608 impl->setXMLObjAttr(WTF::getPtr(cppValue)); |
609 } | 609 } |
610 | 610 |
611 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 611 static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
612 { | 612 { |
613 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 613 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
614 TestObjectV8Internal::XMLObjAttrAttributeSetter(jsValue, info); | 614 TestObjectV8Internal::XMLObjAttrAttributeSetter(v8Value, info); |
615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
616 } | 616 } |
617 | 617 |
618 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 618 static void reflectedStringAttrAttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
619 { | 619 { |
620 v8::Handle<v8::Object> holder = info.Holder(); | 620 v8::Handle<v8::Object> holder = info.Holder(); |
621 TestObject* impl = V8TestObject::toNative(holder); | 621 TestObject* impl = V8TestObject::toNative(holder); |
622 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedstri
ngattrAttr), info.GetIsolate()); | 622 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedstri
ngattrAttr), info.GetIsolate()); |
623 } | 623 } |
624 | 624 |
625 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 625 static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
626 { | 626 { |
627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 627 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
628 TestObjectV8Internal::reflectedStringAttrAttributeGetter(info); | 628 TestObjectV8Internal::reflectedStringAttrAttributeGetter(info); |
629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 629 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
630 } | 630 } |
631 | 631 |
632 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 632 static void reflectedStringAttrAttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
633 { | 633 { |
634 v8::Handle<v8::Object> holder = info.Holder(); | 634 v8::Handle<v8::Object> holder = info.Holder(); |
635 TestObject* impl = V8TestObject::toNative(holder); | 635 TestObject* impl = V8TestObject::toNative(holder); |
636 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 636 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
637 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 637 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
638 impl->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); | 638 impl->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue); |
639 } | 639 } |
640 | 640 |
641 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 641 static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
642 { | 642 { |
643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 643 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
644 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 644 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
645 TestObjectV8Internal::reflectedStringAttrAttributeSetter(jsValue, info); | 645 TestObjectV8Internal::reflectedStringAttrAttributeSetter(v8Value, info); |
646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
647 } | 647 } |
648 | 648 |
649 static void reflectedTreatNullAsNullStringStringAttrAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 649 static void reflectedTreatNullAsNullStringStringAttrAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
650 { | 650 { |
651 v8::Handle<v8::Object> holder = info.Holder(); | 651 v8::Handle<v8::Object> holder = info.Holder(); |
652 TestObject* impl = V8TestObject::toNative(holder); | 652 TestObject* impl = V8TestObject::toNative(holder); |
653 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringstringattrAttr), info.GetIsolate()); | 653 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringstringattrAttr), info.GetIsolate()); |
654 } | 654 } |
655 | 655 |
656 static void reflectedTreatNullAsNullStringStringAttrAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 656 static void reflectedTreatNullAsNullStringStringAttrAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
657 { | 657 { |
658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
659 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeGette
r(info); | 659 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeGette
r(info); |
660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
661 } | 661 } |
662 | 662 |
663 static void reflectedTreatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 663 static void reflectedTreatNullAsNullStringStringAttrAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
664 { | 664 { |
665 v8::Handle<v8::Object> holder = info.Holder(); | 665 v8::Handle<v8::Object> holder = info.Holder(); |
666 TestObject* impl = V8TestObject::toNative(holder); | 666 TestObject* impl = V8TestObject::toNative(holder); |
667 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 667 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
668 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 668 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
669 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringstringattrAttr,
cppValue); | 669 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringstringattrAttr,
cppValue); |
670 } | 670 } |
671 | 671 |
672 static void reflectedTreatNullAsNullStringStringAttrAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 672 static void reflectedTreatNullAsNullStringStringAttrAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
673 { | 673 { |
674 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 674 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
675 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 675 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
676 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeSette
r(jsValue, info); | 676 TestObjectV8Internal::reflectedTreatNullAsNullStringStringAttrAttributeSette
r(v8Value, info); |
677 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 677 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
678 } | 678 } |
679 | 679 |
680 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 680 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
681 { | 681 { |
682 v8::Handle<v8::Object> holder = info.Holder(); | 682 v8::Handle<v8::Object> holder = info.Holder(); |
683 TestObject* impl = V8TestObject::toNative(holder); | 683 TestObject* impl = V8TestObject::toNative(holder); |
684 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringtreatundefinedasnullstringstringattrAttr), info.GetIsolate()); | 684 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectedtrea
tnullasnullstringtreatundefinedasnullstringstringattrAttr), info.GetIsolate()); |
685 } | 685 } |
686 | 686 |
687 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::
Value>& info) | 687 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::
Value>& info) |
688 { | 688 { |
689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
690 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeGetter(info); | 690 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeGetter(info); |
691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
692 } | 692 } |
693 | 693 |
694 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>
& info) | 694 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>
& info) |
695 { | 695 { |
696 v8::Handle<v8::Object> holder = info.Holder(); | 696 v8::Handle<v8::Object> holder = info.Holder(); |
697 TestObject* impl = V8TestObject::toNative(holder); | 697 TestObject* impl = V8TestObject::toNative(holder); |
698 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 698 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
699 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 699 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
700 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringstringattrAttr, cppValue); | 700 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringstringattrAttr, cppValue); |
701 } | 701 } |
702 | 702 |
703 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 703 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringStringAttrAt
tributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
704 { | 704 { |
705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
706 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 706 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
707 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeSetter(jsValue, info); | 707 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngStringAttrAttributeSetter(v8Value, info); |
708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
709 } | 709 } |
710 | 710 |
711 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 711 static void reflectedIntegralAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
712 { | 712 { |
713 v8::Handle<v8::Object> holder = info.Holder(); | 713 v8::Handle<v8::Object> holder = info.Holder(); |
714 TestObject* impl = V8TestObject::toNative(holder); | 714 TestObject* impl = V8TestObject::toNative(holder); |
715 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectedint
egralattrAttr)); | 715 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectedint
egralattrAttr)); |
716 } | 716 } |
717 | 717 |
718 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 718 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
719 { | 719 { |
720 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 720 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
721 TestObjectV8Internal::reflectedIntegralAttrAttributeGetter(info); | 721 TestObjectV8Internal::reflectedIntegralAttrAttributeGetter(info); |
722 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 722 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
723 } | 723 } |
724 | 724 |
725 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 725 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
726 { | 726 { |
727 v8::Handle<v8::Object> holder = info.Holder(); | 727 v8::Handle<v8::Object> holder = info.Holder(); |
728 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg
ralAttr", "TestObject", holder, info.GetIsolate()); | 728 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg
ralAttr", "TestObject", holder, info.GetIsolate()); |
729 TestObject* impl = V8TestObject::toNative(holder); | 729 TestObject* impl = V8TestObject::toNative(holder); |
730 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 730 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
731 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 731 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
732 impl->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); | 732 impl->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); |
733 } | 733 } |
734 | 734 |
735 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 735 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
736 { | 736 { |
737 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 737 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
738 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 738 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
739 TestObjectV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info); | 739 TestObjectV8Internal::reflectedIntegralAttrAttributeSetter(v8Value, info); |
740 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 740 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
741 } | 741 } |
742 | 742 |
743 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 743 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
744 { | 744 { |
745 v8::Handle<v8::Object> holder = info.Holder(); | 745 v8::Handle<v8::Object> holder = info.Holder(); |
746 TestObject* impl = V8TestObject::toNative(holder); | 746 TestObject* impl = V8TestObject::toNative(holder); |
747 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa
mes::reflectedunsignedintegralattrAttr))); | 747 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa
mes::reflectedunsignedintegralattrAttr))); |
748 } | 748 } |
749 | 749 |
750 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 750 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
751 { | 751 { |
752 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 752 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
753 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); | 753 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); |
754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
755 } | 755 } |
756 | 756 |
757 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 757 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
758 { | 758 { |
759 v8::Handle<v8::Object> holder = info.Holder(); | 759 v8::Handle<v8::Object> holder = info.Holder(); |
760 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig
nedIntegralAttr", "TestObject", holder, info.GetIsolate()); | 760 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig
nedIntegralAttr", "TestObject", holder, info.GetIsolate()); |
761 TestObject* impl = V8TestObject::toNative(holder); | 761 TestObject* impl = V8TestObject::toNative(holder); |
762 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionSta
te), exceptionState); | 762 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, exceptionSta
te), exceptionState); |
763 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 763 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
764 impl->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrA
ttr, cppValue); | 764 impl->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrA
ttr, cppValue); |
765 } | 765 } |
766 | 766 |
767 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 767 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
768 { | 768 { |
769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
770 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 770 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
771 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue,
info); | 771 TestObjectV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(v8Value,
info); |
772 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 772 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
773 } | 773 } |
774 | 774 |
775 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 775 static void reflectedBooleanAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
776 { | 776 { |
777 v8::Handle<v8::Object> holder = info.Holder(); | 777 v8::Handle<v8::Object> holder = info.Holder(); |
778 TestObject* impl = V8TestObject::toNative(holder); | 778 TestObject* impl = V8TestObject::toNative(holder); |
779 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectedboolea
nattrAttr)); | 779 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectedboolea
nattrAttr)); |
780 } | 780 } |
781 | 781 |
782 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 782 static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
783 { | 783 { |
784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
785 TestObjectV8Internal::reflectedBooleanAttrAttributeGetter(info); | 785 TestObjectV8Internal::reflectedBooleanAttrAttributeGetter(info); |
786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
787 } | 787 } |
788 | 788 |
789 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 789 static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
790 { | 790 { |
791 v8::Handle<v8::Object> holder = info.Holder(); | 791 v8::Handle<v8::Object> holder = info.Holder(); |
792 TestObject* impl = V8TestObject::toNative(holder); | 792 TestObject* impl = V8TestObject::toNative(holder); |
793 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); | 793 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue()); |
794 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 794 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
795 impl->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); | 795 impl->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue); |
796 } | 796 } |
797 | 797 |
798 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 798 static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
799 { | 799 { |
800 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 800 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
801 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 801 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
802 TestObjectV8Internal::reflectedBooleanAttrAttributeSetter(jsValue, info); | 802 TestObjectV8Internal::reflectedBooleanAttrAttributeSetter(v8Value, info); |
803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
804 } | 804 } |
805 | 805 |
806 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 806 static void reflectedURLAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
807 { | 807 { |
808 v8::Handle<v8::Object> holder = info.Holder(); | 808 v8::Handle<v8::Object> holder = info.Holder(); |
809 TestObject* impl = V8TestObject::toNative(holder); | 809 TestObject* impl = V8TestObject::toNative(holder); |
810 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedurlat
trAttr), info.GetIsolate()); | 810 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedurlat
trAttr), info.GetIsolate()); |
811 } | 811 } |
812 | 812 |
813 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 813 static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
814 { | 814 { |
815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
816 TestObjectV8Internal::reflectedURLAttrAttributeGetter(info); | 816 TestObjectV8Internal::reflectedURLAttrAttributeGetter(info); |
817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
818 } | 818 } |
819 | 819 |
820 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 820 static void reflectedURLAttrAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
821 { | 821 { |
822 v8::Handle<v8::Object> holder = info.Holder(); | 822 v8::Handle<v8::Object> holder = info.Holder(); |
823 TestObject* impl = V8TestObject::toNative(holder); | 823 TestObject* impl = V8TestObject::toNative(holder); |
824 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 824 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
825 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 825 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
826 impl->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); | 826 impl->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue); |
827 } | 827 } |
828 | 828 |
829 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 829 static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
830 { | 830 { |
831 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 831 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
832 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 832 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
833 TestObjectV8Internal::reflectedURLAttrAttributeSetter(jsValue, info); | 833 TestObjectV8Internal::reflectedURLAttrAttributeSetter(v8Value, info); |
834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
835 } | 835 } |
836 | 836 |
837 static void reflectedTreatNullAsNullStringURLAttrAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 837 static void reflectedTreatNullAsNullStringURLAttrAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
838 { | 838 { |
839 v8::Handle<v8::Object> holder = info.Holder(); | 839 v8::Handle<v8::Object> holder = info.Holder(); |
840 TestObject* impl = V8TestObject::toNative(holder); | 840 TestObject* impl = V8TestObject::toNative(holder); |
841 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringurlattrAttr), info.GetIsolate()); | 841 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringurlattrAttr), info.GetIsolate()); |
842 } | 842 } |
843 | 843 |
844 static void reflectedTreatNullAsNullStringURLAttrAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 844 static void reflectedTreatNullAsNullStringURLAttrAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
845 { | 845 { |
846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
847 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeGetter(i
nfo); | 847 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeGetter(i
nfo); |
848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
849 } | 849 } |
850 | 850 |
851 static void reflectedTreatNullAsNullStringURLAttrAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 851 static void reflectedTreatNullAsNullStringURLAttrAttributeSetter(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
852 { | 852 { |
853 v8::Handle<v8::Object> holder = info.Holder(); | 853 v8::Handle<v8::Object> holder = info.Holder(); |
854 TestObject* impl = V8TestObject::toNative(holder); | 854 TestObject* impl = V8TestObject::toNative(holder); |
855 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 855 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
856 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 856 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
857 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringurlattrAttr, cpp
Value); | 857 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringurlattrAttr, cpp
Value); |
858 } | 858 } |
859 | 859 |
860 static void reflectedTreatNullAsNullStringURLAttrAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 860 static void reflectedTreatNullAsNullStringURLAttrAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
861 { | 861 { |
862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
863 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 863 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
864 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeSetter(j
sValue, info); | 864 TestObjectV8Internal::reflectedTreatNullAsNullStringURLAttrAttributeSetter(v
8Value, info); |
865 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 865 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
866 } | 866 } |
867 | 867 |
868 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 868 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
869 { | 869 { |
870 v8::Handle<v8::Object> holder = info.Holder(); | 870 v8::Handle<v8::Object> holder = info.Holder(); |
871 TestObject* impl = V8TestObject::toNative(holder); | 871 TestObject* impl = V8TestObject::toNative(holder); |
872 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringtreatundefinedasnullstringurlattrAttr), info.GetIsolate()); | 872 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectedtreat
nullasnullstringtreatundefinedasnullstringurlattrAttr), info.GetIsolate()); |
873 } | 873 } |
874 | 874 |
875 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 875 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
876 { | 876 { |
877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
878 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeGetter(info); | 878 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeGetter(info); |
879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
880 } | 880 } |
881 | 881 |
882 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) | 882 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i
nfo) |
883 { | 883 { |
884 v8::Handle<v8::Object> holder = info.Holder(); | 884 v8::Handle<v8::Object> holder = info.Holder(); |
885 TestObject* impl = V8TestObject::toNative(holder); | 885 TestObject* impl = V8TestObject::toNative(holder); |
886 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 886 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
887 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 887 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
888 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringurlattrAttr, cppValue); | 888 impl->setAttribute(HTMLNames::reflectedtreatnullasnullstringtreatundefinedas
nullstringurlattrAttr, cppValue); |
889 } | 889 } |
890 | 890 |
891 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 891 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringURLAttrAttri
buteSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
892 { | 892 { |
893 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 893 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
894 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 894 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
895 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeSetter(jsValue, info); | 895 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngURLAttrAttributeSetter(v8Value, info); |
896 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 896 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
897 } | 897 } |
898 | 898 |
899 static void reflectedCustomStringAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 899 static void reflectedCustomStringAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
900 { | 900 { |
901 v8::Handle<v8::Object> holder = info.Holder(); | 901 v8::Handle<v8::Object> holder = info.Holder(); |
902 TestObject* impl = V8TestObject::toNative(holder); | 902 TestObject* impl = V8TestObject::toNative(holder); |
903 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); | 903 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
904 } | 904 } |
905 | 905 |
906 static void reflectedCustomStringAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 906 static void reflectedCustomStringAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
907 { | 907 { |
908 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 908 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
909 TestObjectV8Internal::reflectedCustomStringAttrAttributeGetter(info); | 909 TestObjectV8Internal::reflectedCustomStringAttrAttributeGetter(info); |
910 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 910 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
911 } | 911 } |
912 | 912 |
913 static void reflectedCustomStringAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 913 static void reflectedCustomStringAttrAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
914 { | 914 { |
915 v8::Handle<v8::Object> holder = info.Holder(); | 915 v8::Handle<v8::Object> holder = info.Holder(); |
916 TestObject* impl = V8TestObject::toNative(holder); | 916 TestObject* impl = V8TestObject::toNative(holder); |
917 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 917 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
918 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 918 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
919 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 919 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
920 } | 920 } |
921 | 921 |
922 static void reflectedCustomStringAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 922 static void reflectedCustomStringAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
923 { | 923 { |
924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
925 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 925 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
926 TestObjectV8Internal::reflectedCustomStringAttrAttributeSetter(jsValue, info
); | 926 TestObjectV8Internal::reflectedCustomStringAttrAttributeSetter(v8Value, info
); |
927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
928 } | 928 } |
929 | 929 |
930 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 930 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
931 { | 931 { |
932 v8::Handle<v8::Object> holder = info.Holder(); | 932 v8::Handle<v8::Object> holder = info.Holder(); |
933 TestObject* impl = V8TestObject::toNative(holder); | 933 TestObject* impl = V8TestObject::toNative(holder); |
934 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); | 934 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
935 } | 935 } |
936 | 936 |
937 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 937 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
938 { | 938 { |
939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
940 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eGetter(info); | 940 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eGetter(info); |
941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
942 } | 942 } |
943 | 943 |
944 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetter(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 944 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetter(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
945 { | 945 { |
946 v8::Handle<v8::Object> holder = info.Holder(); | 946 v8::Handle<v8::Object> holder = info.Holder(); |
947 TestObject* impl = V8TestObject::toNative(holder); | 947 TestObject* impl = V8TestObject::toNative(holder); |
948 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 948 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
949 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 949 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
950 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 950 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
951 } | 951 } |
952 | 952 |
953 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) | 953 static void reflectedTreatNullAsNullStringCustomStringAttrAttributeSetterCallbac
k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
954 { | 954 { |
955 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 955 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
956 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 956 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
957 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eSetter(jsValue, info); | 957 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomStringAttrAttribut
eSetter(v8Value, info); |
958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
959 } | 959 } |
960 | 960 |
961 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 961 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
962 { | 962 { |
963 v8::Handle<v8::Object> holder = info.Holder(); | 963 v8::Handle<v8::Object> holder = info.Holder(); |
964 TestObject* impl = V8TestObject::toNative(holder); | 964 TestObject* impl = V8TestObject::toNative(holder); |
965 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); | 965 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::customContent
StringAttrAttr), info.GetIsolate()); |
966 } | 966 } |
967 | 967 |
968 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) | 968 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf
o<v8::Value>& info) |
969 { | 969 { |
970 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 970 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
971 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeGetter(info); | 971 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeGetter(info); |
972 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 972 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
973 } | 973 } |
974 | 974 |
975 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) | 975 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) |
976 { | 976 { |
977 v8::Handle<v8::Object> holder = info.Holder(); | 977 v8::Handle<v8::Object> holder = info.Holder(); |
978 TestObject* impl = V8TestObject::toNative(holder); | 978 TestObject* impl = V8TestObject::toNative(holder); |
979 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 979 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
980 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 980 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
981 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); | 981 impl->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue); |
982 } | 982 } |
983 | 983 |
984 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 984 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomString
AttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
985 { | 985 { |
986 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 986 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
987 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 987 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
988 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeSetter(jsValue, info); | 988 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomStringAttrAttributeSetter(v8Value, info); |
989 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 989 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
990 } | 990 } |
991 | 991 |
992 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 992 static void reflectedCustomIntegralAttrAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
993 { | 993 { |
994 v8::Handle<v8::Object> holder = info.Holder(); | 994 v8::Handle<v8::Object> holder = info.Holder(); |
995 TestObject* impl = V8TestObject::toNative(holder); | 995 TestObject* impl = V8TestObject::toNative(holder); |
996 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::customConten
tIntegralAttrAttr)); | 996 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::customConten
tIntegralAttrAttr)); |
997 } | 997 } |
998 | 998 |
999 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 999 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1000 { | 1000 { |
1001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1002 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); | 1002 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); |
1003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1004 } | 1004 } |
1005 | 1005 |
1006 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) | 1006 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
1007 { | 1007 { |
1008 v8::Handle<v8::Object> holder = info.Holder(); | 1008 v8::Handle<v8::Object> holder = info.Holder(); |
1009 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto
mIntegralAttr", "TestObject", holder, info.GetIsolate()); | 1009 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto
mIntegralAttr", "TestObject", holder, info.GetIsolate()); |
1010 TestObject* impl = V8TestObject::toNative(holder); | 1010 TestObject* impl = V8TestObject::toNative(holder); |
1011 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1011 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
1012 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1012 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1013 impl->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValu
e); | 1013 impl->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValu
e); |
1014 } | 1014 } |
1015 | 1015 |
1016 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1016 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1017 { | 1017 { |
1018 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1018 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1019 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1019 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1020 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, in
fo); | 1020 TestObjectV8Internal::reflectedCustomIntegralAttrAttributeSetter(v8Value, in
fo); |
1021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1022 } | 1022 } |
1023 | 1023 |
1024 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 1024 static void reflectedCustomBooleanAttrAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
1025 { | 1025 { |
1026 v8::Handle<v8::Object> holder = info.Holder(); | 1026 v8::Handle<v8::Object> holder = info.Holder(); |
1027 TestObject* impl = V8TestObject::toNative(holder); | 1027 TestObject* impl = V8TestObject::toNative(holder); |
1028 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::customContentBo
oleanAttrAttr)); | 1028 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::customContentBo
oleanAttrAttr)); |
1029 } | 1029 } |
1030 | 1030 |
1031 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1031 static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1032 { | 1032 { |
1033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1034 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); | 1034 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeGetter(info); |
1035 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1035 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1036 } | 1036 } |
1037 | 1037 |
1038 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> jsVal
ue, const v8::PropertyCallbackInfo<void>& info) | 1038 static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
1039 { | 1039 { |
1040 v8::Handle<v8::Object> holder = info.Holder(); | 1040 v8::Handle<v8::Object> holder = info.Holder(); |
1041 TestObject* impl = V8TestObject::toNative(holder); | 1041 TestObject* impl = V8TestObject::toNative(holder); |
1042 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue()); | 1042 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue()); |
1043 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1043 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1044 impl->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue)
; | 1044 impl->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue)
; |
1045 } | 1045 } |
1046 | 1046 |
1047 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1047 static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1048 { | 1048 { |
1049 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1049 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1050 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1050 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1051 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeSetter(jsValue, inf
o); | 1051 TestObjectV8Internal::reflectedCustomBooleanAttrAttributeSetter(v8Value, inf
o); |
1052 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1052 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1053 } | 1053 } |
1054 | 1054 |
1055 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1055 static void reflectedCustomURLAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1056 { | 1056 { |
1057 v8::Handle<v8::Object> holder = info.Holder(); | 1057 v8::Handle<v8::Object> holder = info.Holder(); |
1058 TestObject* impl = V8TestObject::toNative(holder); | 1058 TestObject* impl = V8TestObject::toNative(holder); |
1059 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); | 1059 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1060 } | 1060 } |
1061 | 1061 |
1062 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1062 static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1063 { | 1063 { |
1064 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1064 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1065 TestObjectV8Internal::reflectedCustomURLAttrAttributeGetter(info); | 1065 TestObjectV8Internal::reflectedCustomURLAttrAttributeGetter(info); |
1066 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1066 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1067 } | 1067 } |
1068 | 1068 |
1069 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1069 static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1070 { | 1070 { |
1071 v8::Handle<v8::Object> holder = info.Holder(); | 1071 v8::Handle<v8::Object> holder = info.Holder(); |
1072 TestObject* impl = V8TestObject::toNative(holder); | 1072 TestObject* impl = V8TestObject::toNative(holder); |
1073 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1073 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1074 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1074 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1075 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1075 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1076 } | 1076 } |
1077 | 1077 |
1078 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1078 static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1079 { | 1079 { |
1080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1080 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1081 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1081 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1082 TestObjectV8Internal::reflectedCustomURLAttrAttributeSetter(jsValue, info); | 1082 TestObjectV8Internal::reflectedCustomURLAttrAttributeSetter(v8Value, info); |
1083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1084 } | 1084 } |
1085 | 1085 |
1086 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) | 1086 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
1087 { | 1087 { |
1088 v8::Handle<v8::Object> holder = info.Holder(); | 1088 v8::Handle<v8::Object> holder = info.Holder(); |
1089 TestObject* impl = V8TestObject::toNative(holder); | 1089 TestObject* impl = V8TestObject::toNative(holder); |
1090 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); | 1090 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1091 } | 1091 } |
1092 | 1092 |
1093 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1093 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1094 { | 1094 { |
1095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1096 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeGe
tter(info); | 1096 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeGe
tter(info); |
1097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1098 } | 1098 } |
1099 | 1099 |
1100 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetter(v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1100 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetter(v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1101 { | 1101 { |
1102 v8::Handle<v8::Object> holder = info.Holder(); | 1102 v8::Handle<v8::Object> holder = info.Holder(); |
1103 TestObject* impl = V8TestObject::toNative(holder); | 1103 TestObject* impl = V8TestObject::toNative(holder); |
1104 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, jsValue); | 1104 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal
ue, v8Value); |
1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1106 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1106 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1107 } | 1107 } |
1108 | 1108 |
1109 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) | 1109 static void reflectedTreatNullAsNullStringCustomURLAttrAttributeSetterCallback(v
8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn
fo<void>& info) |
1110 { | 1110 { |
1111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1112 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1112 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1113 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeSe
tter(jsValue, info); | 1113 TestObjectV8Internal::reflectedTreatNullAsNullStringCustomURLAttrAttributeSe
tter(v8Value, info); |
1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1115 } | 1115 } |
1116 | 1116 |
1117 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) | 1117 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) |
1118 { | 1118 { |
1119 v8::Handle<v8::Object> holder = info.Holder(); | 1119 v8::Handle<v8::Object> holder = info.Holder(); |
1120 TestObject* impl = V8TestObject::toNative(holder); | 1120 TestObject* impl = V8TestObject::toNative(holder); |
1121 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); | 1121 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::customContentU
RLAttrAttr), info.GetIsolate()); |
1122 } | 1122 } |
1123 | 1123 |
1124 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v
8::Value>& info) | 1124 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v
8::Value>& info) |
1125 { | 1125 { |
1126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1127 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeGetter(info); | 1127 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeGetter(info); |
1128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1129 } | 1129 } |
1130 | 1130 |
1131 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<vo
id>& info) | 1131 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
1132 { | 1132 { |
1133 v8::Handle<v8::Object> holder = info.Holder(); | 1133 v8::Handle<v8::Object> holder = info.Holder(); |
1134 TestObject* impl = V8TestObject::toNative(holder); | 1134 TestObject* impl = V8TestObject::toNative(holder); |
1135 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, jsValue); | 1135 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe
ck>, cppValue, v8Value); |
1136 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1136 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1137 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); | 1137 impl->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue); |
1138 } | 1138 } |
1139 | 1139 |
1140 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 1140 static void reflectedTreatNullAsNullStringTreatUndefinedAsNullStringCustomURLAtt
rAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
1141 { | 1141 { |
1142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1143 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1143 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1144 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeSetter(jsValue, info); | 1144 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri
ngCustomURLAttrAttributeSetter(v8Value, info); |
1145 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1145 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1146 } | 1146 } |
1147 | 1147 |
1148 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1148 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
1149 { | 1149 { |
1150 v8::Handle<v8::Object> holder = info.Holder(); | 1150 v8::Handle<v8::Object> holder = info.Holder(); |
1151 TestObject* impl = V8TestObject::toNative(holder); | 1151 TestObject* impl = V8TestObject::toNative(holder); |
1152 String jsValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattribute
Attr); | 1152 String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattribute
Attr); |
1153 if (jsValue.isEmpty()) { | 1153 if (v8Value.isEmpty()) { |
1154 ; | 1154 ; |
1155 } else if (equalIgnoringCase(jsValue, "unique")) { | 1155 } else if (equalIgnoringCase(v8Value, "unique")) { |
1156 jsValue = "unique"; | 1156 v8Value = "unique"; |
1157 } else { | 1157 } else { |
1158 jsValue = ""; | 1158 v8Value = ""; |
1159 } | 1159 } |
1160 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1160 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1161 } | 1161 } |
1162 | 1162 |
1163 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1163 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1164 { | 1164 { |
1165 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1165 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1166 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); | 1166 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); |
1167 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1167 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1168 } | 1168 } |
1169 | 1169 |
1170 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 1170 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
1171 { | 1171 { |
1172 v8::Handle<v8::Object> holder = info.Holder(); | 1172 v8::Handle<v8::Object> holder = info.Holder(); |
1173 TestObject* impl = V8TestObject::toNative(holder); | 1173 TestObject* impl = V8TestObject::toNative(holder); |
1174 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1174 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1175 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1175 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1176 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); | 1176 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); |
1177 } | 1177 } |
1178 | 1178 |
1179 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1179 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1180 { | 1180 { |
1181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1182 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1182 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1183 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info
); | 1183 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info
); |
1184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1185 } | 1185 } |
1186 | 1186 |
1187 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1187 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1188 { | 1188 { |
1189 v8::Handle<v8::Object> holder = info.Holder(); | 1189 v8::Handle<v8::Object> holder = info.Holder(); |
1190 TestObject* impl = V8TestObject::toNative(holder); | 1190 TestObject* impl = V8TestObject::toNative(holder); |
1191 String jsValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAtt
r); | 1191 String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAtt
r); |
1192 if (jsValue.isEmpty()) { | 1192 if (v8Value.isEmpty()) { |
1193 ; | 1193 ; |
1194 } else if (equalIgnoringCase(jsValue, "Per")) { | 1194 } else if (equalIgnoringCase(v8Value, "Per")) { |
1195 jsValue = "Per"; | 1195 v8Value = "Per"; |
1196 } else if (equalIgnoringCase(jsValue, "Paal")) { | 1196 } else if (equalIgnoringCase(v8Value, "Paal")) { |
1197 jsValue = "Paal"; | 1197 v8Value = "Paal"; |
1198 } else if (equalIgnoringCase(jsValue, "Espen")) { | 1198 } else if (equalIgnoringCase(v8Value, "Espen")) { |
1199 jsValue = "Espen"; | 1199 v8Value = "Espen"; |
1200 } else { | 1200 } else { |
1201 jsValue = ""; | 1201 v8Value = ""; |
1202 } | 1202 } |
1203 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1203 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1204 } | 1204 } |
1205 | 1205 |
1206 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1206 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1207 { | 1207 { |
1208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1209 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); | 1209 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); |
1210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1211 } | 1211 } |
1212 | 1212 |
1213 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1213 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1214 { | 1214 { |
1215 v8::Handle<v8::Object> holder = info.Holder(); | 1215 v8::Handle<v8::Object> holder = info.Holder(); |
1216 TestObject* impl = V8TestObject::toNative(holder); | 1216 TestObject* impl = V8TestObject::toNative(holder); |
1217 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1217 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1218 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1218 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1219 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); | 1219 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); |
1220 } | 1220 } |
1221 | 1221 |
1222 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1222 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1223 { | 1223 { |
1224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1225 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1225 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1226 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info); | 1226 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); |
1227 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1227 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1228 } | 1228 } |
1229 | 1229 |
1230 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 1230 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
1231 { | 1231 { |
1232 v8::Handle<v8::Object> holder = info.Holder(); | 1232 v8::Handle<v8::Object> holder = info.Holder(); |
1233 TestObject* impl = V8TestObject::toNative(holder); | 1233 TestObject* impl = V8TestObject::toNative(holder); |
1234 String jsValue = impl->fastGetAttribute(HTMLNames::OtherAttr); | 1234 String v8Value = impl->fastGetAttribute(HTMLNames::OtherAttr); |
1235 if (jsValue.isEmpty()) { | 1235 if (v8Value.isEmpty()) { |
1236 ; | 1236 ; |
1237 } else if (equalIgnoringCase(jsValue, "Value1")) { | 1237 } else if (equalIgnoringCase(v8Value, "Value1")) { |
1238 jsValue = "Value1"; | 1238 v8Value = "Value1"; |
1239 } else if (equalIgnoringCase(jsValue, "Value2")) { | 1239 } else if (equalIgnoringCase(v8Value, "Value2")) { |
1240 jsValue = "Value2"; | 1240 v8Value = "Value2"; |
1241 } else { | 1241 } else { |
1242 jsValue = ""; | 1242 v8Value = ""; |
1243 } | 1243 } |
1244 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1244 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1245 } | 1245 } |
1246 | 1246 |
1247 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1247 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1248 { | 1248 { |
1249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1250 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); | 1250 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
1251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1252 } | 1252 } |
1253 | 1253 |
1254 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsVa
lue, const v8::PropertyCallbackInfo<void>& info) | 1254 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
1255 { | 1255 { |
1256 v8::Handle<v8::Object> holder = info.Holder(); | 1256 v8::Handle<v8::Object> holder = info.Holder(); |
1257 TestObject* impl = V8TestObject::toNative(holder); | 1257 TestObject* impl = V8TestObject::toNative(holder); |
1258 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1258 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1259 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1259 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1260 impl->setAttribute(HTMLNames::OtherAttr, cppValue); | 1260 impl->setAttribute(HTMLNames::OtherAttr, cppValue); |
1261 } | 1261 } |
1262 | 1262 |
1263 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1263 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1264 { | 1264 { |
1265 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1265 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1266 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1266 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1267 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, in
fo); | 1267 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, in
fo); |
1268 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1268 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1269 } | 1269 } |
1270 | 1270 |
1271 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 1271 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
1272 { | 1272 { |
1273 v8::Handle<v8::Object> holder = info.Holder(); | 1273 v8::Handle<v8::Object> holder = info.Holder(); |
1274 TestObject* impl = V8TestObject::toNative(holder); | 1274 TestObject* impl = V8TestObject::toNative(holder); |
1275 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithmissingdefault
attributeAttr); | 1275 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithmissingdefault
attributeAttr); |
1276 if (jsValue.isEmpty()) { | 1276 if (v8Value.isEmpty()) { |
1277 jsValue = "rsa"; | 1277 v8Value = "rsa"; |
1278 } else if (equalIgnoringCase(jsValue, "rsa")) { | 1278 } else if (equalIgnoringCase(v8Value, "rsa")) { |
1279 jsValue = "rsa"; | 1279 v8Value = "rsa"; |
1280 } else if (equalIgnoringCase(jsValue, "dsa")) { | 1280 } else if (equalIgnoringCase(v8Value, "dsa")) { |
1281 jsValue = "dsa"; | 1281 v8Value = "dsa"; |
1282 } else { | 1282 } else { |
1283 jsValue = ""; | 1283 v8Value = ""; |
1284 } | 1284 } |
1285 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1285 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1286 } | 1286 } |
1287 | 1287 |
1288 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1288 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1289 { | 1289 { |
1290 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1290 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1291 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); | 1291 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info
); |
1292 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1292 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1293 } | 1293 } |
1294 | 1294 |
1295 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1295 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1296 { | 1296 { |
1297 v8::Handle<v8::Object> holder = info.Holder(); | 1297 v8::Handle<v8::Object> holder = info.Holder(); |
1298 TestObject* impl = V8TestObject::toNative(holder); | 1298 TestObject* impl = V8TestObject::toNative(holder); |
1299 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1299 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1300 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1300 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1301 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); | 1301 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal
ue); |
1302 } | 1302 } |
1303 | 1303 |
1304 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 1304 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
1305 { | 1305 { |
1306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1307 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1307 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1308 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsVa
lue, info); | 1308 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Va
lue, info); |
1309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1310 } | 1310 } |
1311 | 1311 |
1312 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) | 1312 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P
ropertyCallbackInfo<v8::Value>& info) |
1313 { | 1313 { |
1314 v8::Handle<v8::Object> holder = info.Holder(); | 1314 v8::Handle<v8::Object> holder = info.Holder(); |
1315 TestObject* impl = V8TestObject::toNative(holder); | 1315 TestObject* impl = V8TestObject::toNative(holder); |
1316 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissing
defaultattributeAttr); | 1316 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissing
defaultattributeAttr); |
1317 if (jsValue.isEmpty()) { | 1317 if (v8Value.isEmpty()) { |
1318 jsValue = "auto"; | 1318 v8Value = "auto"; |
1319 } else if (equalIgnoringCase(jsValue, "ltr")) { | 1319 } else if (equalIgnoringCase(v8Value, "ltr")) { |
1320 jsValue = "ltr"; | 1320 v8Value = "ltr"; |
1321 } else if (equalIgnoringCase(jsValue, "rtl")) { | 1321 } else if (equalIgnoringCase(v8Value, "rtl")) { |
1322 jsValue = "rtl"; | 1322 v8Value = "rtl"; |
1323 } else if (equalIgnoringCase(jsValue, "auto")) { | 1323 } else if (equalIgnoringCase(v8Value, "auto")) { |
1324 jsValue = "auto"; | 1324 v8Value = "auto"; |
1325 } else { | 1325 } else { |
1326 jsValue = "ltr"; | 1326 v8Value = "ltr"; |
1327 } | 1327 } |
1328 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1328 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1329 } | 1329 } |
1330 | 1330 |
1331 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1331 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8:
:Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1332 { | 1332 { |
1333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1334 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); | 1334 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett
er(info); |
1335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1336 } | 1336 } |
1337 | 1337 |
1338 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1338 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1339 { | 1339 { |
1340 v8::Handle<v8::Object> holder = info.Holder(); | 1340 v8::Handle<v8::Object> holder = info.Holder(); |
1341 TestObject* impl = V8TestObject::toNative(holder); | 1341 TestObject* impl = V8TestObject::toNative(holder); |
1342 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1342 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1343 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1343 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1344 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); | 1344 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr,
cppValue); |
1345 } | 1345 } |
1346 | 1346 |
1347 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo
<void>& info) | 1347 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8:
:Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo
<void>& info) |
1348 { | 1348 { |
1349 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1349 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1350 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1350 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1351 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(jsValue, info); | 1351 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett
er(v8Value, info); |
1352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1353 } | 1353 } |
1354 | 1354 |
1355 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) | 1355 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8
::PropertyCallbackInfo<v8::Value>& info) |
1356 { | 1356 { |
1357 v8::Handle<v8::Object> holder = info.Holder(); | 1357 v8::Handle<v8::Object> holder = info.Holder(); |
1358 TestObject* impl = V8TestObject::toNative(holder); | 1358 TestObject* impl = V8TestObject::toNative(holder); |
1359 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidandmiss
ingdefaultattributeAttr); | 1359 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithinvalidandmiss
ingdefaultattributeAttr); |
1360 if (jsValue.isEmpty()) { | 1360 if (v8Value.isEmpty()) { |
1361 jsValue = "left"; | 1361 v8Value = "left"; |
1362 } else if (equalIgnoringCase(jsValue, "left")) { | 1362 } else if (equalIgnoringCase(v8Value, "left")) { |
1363 jsValue = "left"; | 1363 v8Value = "left"; |
1364 } else if (equalIgnoringCase(jsValue, "right")) { | 1364 } else if (equalIgnoringCase(v8Value, "right")) { |
1365 jsValue = "right"; | 1365 v8Value = "right"; |
1366 } else { | 1366 } else { |
1367 jsValue = "left"; | 1367 v8Value = "left"; |
1368 } | 1368 } |
1369 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1369 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1370 } | 1370 } |
1371 | 1371 |
1372 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1372 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback(
v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1373 { | 1373 { |
1374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1375 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG
etter(info); | 1375 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG
etter(info); |
1376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1377 } | 1377 } |
1378 | 1378 |
1379 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca
l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1379 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca
l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1380 { | 1380 { |
1381 v8::Handle<v8::Object> holder = info.Holder(); | 1381 v8::Handle<v8::Object> holder = info.Holder(); |
1382 TestObject* impl = V8TestObject::toNative(holder); | 1382 TestObject* impl = V8TestObject::toNative(holder); |
1383 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1383 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1384 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1384 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1385 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt
tr, cppValue); | 1385 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt
tr, cppValue); |
1386 } | 1386 } |
1387 | 1387 |
1388 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI
nfo<void>& info) | 1388 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback(
v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info) |
1389 { | 1389 { |
1390 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1390 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1391 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 1391 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
1392 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS
etter(jsValue, info); | 1392 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS
etter(v8Value, info); |
1393 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1393 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1394 } | 1394 } |
1395 | 1395 |
1396 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 1396 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
1397 { | 1397 { |
1398 v8::Handle<v8::Object> holder = info.Holder(); | 1398 v8::Handle<v8::Object> holder = info.Holder(); |
1399 TestObject* impl = V8TestObject::toNative(holder); | 1399 TestObject* impl = V8TestObject::toNative(holder); |
1400 String jsValue = impl->fastGetAttribute(HTMLNames::corssettingattributeAttr)
; | 1400 String v8Value = impl->fastGetAttribute(HTMLNames::corssettingattributeAttr)
; |
1401 if (jsValue.isNull()) { | 1401 if (v8Value.isNull()) { |
1402 ; | 1402 ; |
1403 } else if (jsValue.isEmpty()) { | 1403 } else if (v8Value.isEmpty()) { |
1404 jsValue = "anonymous"; | 1404 v8Value = "anonymous"; |
1405 } else if (equalIgnoringCase(jsValue, "anonymous")) { | 1405 } else if (equalIgnoringCase(v8Value, "anonymous")) { |
1406 jsValue = "anonymous"; | 1406 v8Value = "anonymous"; |
1407 } else if (equalIgnoringCase(jsValue, "use-credentials")) { | 1407 } else if (equalIgnoringCase(v8Value, "use-credentials")) { |
1408 jsValue = "use-credentials"; | 1408 v8Value = "use-credentials"; |
1409 } else { | 1409 } else { |
1410 jsValue = "anonymous"; | 1410 v8Value = "anonymous"; |
1411 } | 1411 } |
1412 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1412 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1413 } | 1413 } |
1414 | 1414 |
1415 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 1415 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
1416 { | 1416 { |
1417 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1417 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1418 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); | 1418 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); |
1419 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1419 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1420 } | 1420 } |
1421 | 1421 |
1422 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1422 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
1423 { | 1423 { |
1424 v8::Handle<v8::Object> holder = info.Holder(); | 1424 v8::Handle<v8::Object> holder = info.Holder(); |
1425 TestObject* impl = V8TestObject::toNative(holder); | 1425 TestObject* impl = V8TestObject::toNative(holder); |
1426 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithemptymissingin
validattributeAttr); | 1426 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithemptymissingin
validattributeAttr); |
1427 if (jsValue.isNull()) { | 1427 if (v8Value.isNull()) { |
1428 jsValue = "missing"; | 1428 v8Value = "missing"; |
1429 } else if (jsValue.isEmpty()) { | 1429 } else if (v8Value.isEmpty()) { |
1430 jsValue = "empty"; | 1430 v8Value = "empty"; |
1431 } else if (equalIgnoringCase(jsValue, "empty")) { | 1431 } else if (equalIgnoringCase(v8Value, "empty")) { |
1432 jsValue = "empty"; | 1432 v8Value = "empty"; |
1433 } else if (equalIgnoringCase(jsValue, "missing")) { | 1433 } else if (equalIgnoringCase(v8Value, "missing")) { |
1434 jsValue = "missing"; | 1434 v8Value = "missing"; |
1435 } else if (equalIgnoringCase(jsValue, "invalid")) { | 1435 } else if (equalIgnoringCase(v8Value, "invalid")) { |
1436 jsValue = "invalid"; | 1436 v8Value = "invalid"; |
1437 } else if (equalIgnoringCase(jsValue, "a-normal")) { | 1437 } else if (equalIgnoringCase(v8Value, "a-normal")) { |
1438 jsValue = "a-normal"; | 1438 v8Value = "a-normal"; |
1439 } else { | 1439 } else { |
1440 jsValue = "invalid"; | 1440 v8Value = "invalid"; |
1441 } | 1441 } |
1442 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1442 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1443 } | 1443 } |
1444 | 1444 |
1445 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1445 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1446 { | 1446 { |
1447 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1447 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1448 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); | 1448 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter
(info); |
1449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1450 } | 1450 } |
1451 | 1451 |
1452 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 1452 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
1453 { | 1453 { |
1454 v8::Handle<v8::Object> holder = info.Holder(); | 1454 v8::Handle<v8::Object> holder = info.Holder(); |
1455 TestObject* impl = V8TestObject::toNative(holder); | 1455 TestObject* impl = V8TestObject::toNative(holder); |
1456 v8SetReturnValueFast(info, WTF::getPtr(impl->typedArrayAttr()), impl); | 1456 v8SetReturnValueFast(info, WTF::getPtr(impl->typedArrayAttr()), impl); |
1457 } | 1457 } |
1458 | 1458 |
1459 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 1459 static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
1460 { | 1460 { |
1461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1462 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); | 1462 TestObjectV8Internal::typedArrayAttrAttributeGetter(info); |
1463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1464 } | 1464 } |
1465 | 1465 |
1466 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 1466 static void typedArrayAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
1467 { | 1467 { |
1468 v8::Handle<v8::Object> holder = info.Holder(); | 1468 v8::Handle<v8::Object> holder = info.Holder(); |
1469 TestObject* impl = V8TestObject::toNative(holder); | 1469 TestObject* impl = V8TestObject::toNative(holder); |
1470 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0); | 1470 V8TRYCATCH_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float
32Array::toNative(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0); |
1471 impl->setTypedArrayAttr(WTF::getPtr(cppValue)); | 1471 impl->setTypedArrayAttr(WTF::getPtr(cppValue)); |
1472 } | 1472 } |
1473 | 1473 |
1474 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1474 static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1475 { | 1475 { |
1476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1477 TestObjectV8Internal::typedArrayAttrAttributeSetter(jsValue, info); | 1477 TestObjectV8Internal::typedArrayAttrAttributeSetter(v8Value, info); |
1478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1479 } | 1479 } |
1480 | 1480 |
1481 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1481 static void attrWithGetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
1482 { | 1482 { |
1483 v8::Handle<v8::Object> holder = info.Holder(); | 1483 v8::Handle<v8::Object> holder = info.Holder(); |
1484 TestObject* impl = V8TestObject::toNative(holder); | 1484 TestObject* impl = V8TestObject::toNative(holder); |
1485 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestObject", holder, info.GetIsolate()); | 1485 ExceptionState exceptionState(ExceptionState::GetterContext, "attrWithGetter
Exception", "TestObject", holder, info.GetIsolate()); |
1486 int jsValue = impl->attrWithGetterException(exceptionState); | 1486 int v8Value = impl->attrWithGetterException(exceptionState); |
1487 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1487 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1488 return; | 1488 return; |
1489 v8SetReturnValueInt(info, jsValue); | 1489 v8SetReturnValueInt(info, v8Value); |
1490 } | 1490 } |
1491 | 1491 |
1492 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1492 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
1493 { | 1493 { |
1494 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1494 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1495 TestObjectV8Internal::attrWithGetterExceptionAttributeGetter(info); | 1495 TestObjectV8Internal::attrWithGetterExceptionAttributeGetter(info); |
1496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1497 } | 1497 } |
1498 | 1498 |
1499 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1499 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1500 { | 1500 { |
1501 v8::Handle<v8::Object> holder = info.Holder(); | 1501 v8::Handle<v8::Object> holder = info.Holder(); |
1502 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestObject", holder, info.GetIsolate()); | 1502 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter
Exception", "TestObject", holder, info.GetIsolate()); |
1503 TestObject* impl = V8TestObject::toNative(holder); | 1503 TestObject* impl = V8TestObject::toNative(holder); |
1504 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1504 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
1505 impl->setAttrWithGetterException(cppValue); | 1505 impl->setAttrWithGetterException(cppValue); |
1506 } | 1506 } |
1507 | 1507 |
1508 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1508 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1509 { | 1509 { |
1510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1511 TestObjectV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); | 1511 TestObjectV8Internal::attrWithGetterExceptionAttributeSetter(v8Value, info); |
1512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1513 } | 1513 } |
1514 | 1514 |
1515 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 1515 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
1516 { | 1516 { |
1517 v8::Handle<v8::Object> holder = info.Holder(); | 1517 v8::Handle<v8::Object> holder = info.Holder(); |
1518 TestObject* impl = V8TestObject::toNative(holder); | 1518 TestObject* impl = V8TestObject::toNative(holder); |
1519 v8SetReturnValueInt(info, impl->attrWithSetterException()); | 1519 v8SetReturnValueInt(info, impl->attrWithSetterException()); |
1520 } | 1520 } |
1521 | 1521 |
1522 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 1522 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
1523 { | 1523 { |
1524 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1524 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1525 TestObjectV8Internal::attrWithSetterExceptionAttributeGetter(info); | 1525 TestObjectV8Internal::attrWithSetterExceptionAttributeGetter(info); |
1526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1527 } | 1527 } |
1528 | 1528 |
1529 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1529 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1530 { | 1530 { |
1531 v8::Handle<v8::Object> holder = info.Holder(); | 1531 v8::Handle<v8::Object> holder = info.Holder(); |
1532 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestObject", holder, info.GetIsolate()); | 1532 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter
Exception", "TestObject", holder, info.GetIsolate()); |
1533 TestObject* impl = V8TestObject::toNative(holder); | 1533 TestObject* impl = V8TestObject::toNative(holder); |
1534 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1534 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
1535 impl->setAttrWithSetterException(cppValue, exceptionState); | 1535 impl->setAttrWithSetterException(cppValue, exceptionState); |
1536 exceptionState.throwIfNeeded(); | 1536 exceptionState.throwIfNeeded(); |
1537 } | 1537 } |
1538 | 1538 |
1539 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1539 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1540 { | 1540 { |
1541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1542 TestObjectV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); | 1542 TestObjectV8Internal::attrWithSetterExceptionAttributeSetter(v8Value, info); |
1543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1544 } | 1544 } |
1545 | 1545 |
1546 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1546 static void stringAttrWithGetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1547 { | 1547 { |
1548 v8::Handle<v8::Object> holder = info.Holder(); | 1548 v8::Handle<v8::Object> holder = info.Holder(); |
1549 TestObject* impl = V8TestObject::toNative(holder); | 1549 TestObject* impl = V8TestObject::toNative(holder); |
1550 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestObject", holder, info.GetIsolate()); | 1550 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttrWith
GetterException", "TestObject", holder, info.GetIsolate()); |
1551 String jsValue = impl->stringAttrWithGetterException(exceptionState); | 1551 String v8Value = impl->stringAttrWithGetterException(exceptionState); |
1552 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1552 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1553 return; | 1553 return; |
1554 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 1554 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
1555 } | 1555 } |
1556 | 1556 |
1557 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1557 static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1558 { | 1558 { |
1559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1560 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); | 1560 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeGetter(info); |
1561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1562 } | 1562 } |
1563 | 1563 |
1564 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1564 static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
1565 { | 1565 { |
1566 v8::Handle<v8::Object> holder = info.Holder(); | 1566 v8::Handle<v8::Object> holder = info.Holder(); |
1567 TestObject* impl = V8TestObject::toNative(holder); | 1567 TestObject* impl = V8TestObject::toNative(holder); |
1568 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1568 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1569 impl->setStringAttrWithGetterException(cppValue); | 1569 impl->setStringAttrWithGetterException(cppValue); |
1570 } | 1570 } |
1571 | 1571 |
1572 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1572 static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
1573 { | 1573 { |
1574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1575 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(jsValue,
info); | 1575 TestObjectV8Internal::stringAttrWithGetterExceptionAttributeSetter(v8Value,
info); |
1576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1577 } | 1577 } |
1578 | 1578 |
1579 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1579 static void stringAttrWithSetterExceptionAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1580 { | 1580 { |
1581 v8::Handle<v8::Object> holder = info.Holder(); | 1581 v8::Handle<v8::Object> holder = info.Holder(); |
1582 TestObject* impl = V8TestObject::toNative(holder); | 1582 TestObject* impl = V8TestObject::toNative(holder); |
1583 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); | 1583 v8SetReturnValueString(info, impl->stringAttrWithSetterException(), info.Get
Isolate()); |
1584 } | 1584 } |
1585 | 1585 |
1586 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1586 static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1587 { | 1587 { |
1588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1589 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); | 1589 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeGetter(info); |
1590 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1590 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1591 } | 1591 } |
1592 | 1592 |
1593 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1593 static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
1594 { | 1594 { |
1595 v8::Handle<v8::Object> holder = info.Holder(); | 1595 v8::Handle<v8::Object> holder = info.Holder(); |
1596 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestObject", holder, info.GetIsolate()); | 1596 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttrWith
SetterException", "TestObject", holder, info.GetIsolate()); |
1597 TestObject* impl = V8TestObject::toNative(holder); | 1597 TestObject* impl = V8TestObject::toNative(holder); |
1598 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 1598 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
1599 impl->setStringAttrWithSetterException(cppValue, exceptionState); | 1599 impl->setStringAttrWithSetterException(cppValue, exceptionState); |
1600 exceptionState.throwIfNeeded(); | 1600 exceptionState.throwIfNeeded(); |
1601 } | 1601 } |
1602 | 1602 |
1603 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1603 static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
1604 { | 1604 { |
1605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1606 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeSetter(jsValue,
info); | 1606 TestObjectV8Internal::stringAttrWithSetterExceptionAttributeSetter(v8Value,
info); |
1607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1608 } | 1608 } |
1609 | 1609 |
1610 static void customAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 1610 static void customAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
1611 { | 1611 { |
1612 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1612 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1613 V8TestObject::customAttrAttributeGetterCustom(info); | 1613 V8TestObject::customAttrAttributeGetterCustom(info); |
1614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1615 } | 1615 } |
1616 | 1616 |
1617 static void customAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1617 static void customAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1618 { | 1618 { |
1619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1620 V8TestObject::customAttrAttributeSetterCustom(jsValue, info); | 1620 V8TestObject::customAttrAttributeSetterCustom(v8Value, info); |
1621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1622 } | 1622 } |
1623 | 1623 |
1624 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1624 static void withExecutionContextAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1625 { | 1625 { |
1626 v8::Handle<v8::Object> holder = info.Holder(); | 1626 v8::Handle<v8::Object> holder = info.Holder(); |
1627 TestObject* impl = V8TestObject::toNative(holder); | 1627 TestObject* impl = V8TestObject::toNative(holder); |
1628 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1628 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
1629 v8SetReturnValueFast(info, WTF::getPtr(impl->withExecutionContextAttribute(s
criptContext)), impl); | 1629 v8SetReturnValueFast(info, WTF::getPtr(impl->withExecutionContextAttribute(s
criptContext)), impl); |
1630 } | 1630 } |
1631 | 1631 |
1632 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1632 static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1633 { | 1633 { |
1634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1635 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); | 1635 TestObjectV8Internal::withExecutionContextAttributeAttributeGetter(info); |
1636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1637 } | 1637 } |
1638 | 1638 |
1639 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1639 static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
1640 { | 1640 { |
1641 v8::Handle<v8::Object> holder = info.Holder(); | 1641 v8::Handle<v8::Object> holder = info.Holder(); |
1642 TestObject* impl = V8TestObject::toNative(holder); | 1642 TestObject* impl = V8TestObject::toNative(holder); |
1643 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1643 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
1644 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 1644 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
1645 impl->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue))
; | 1645 impl->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue))
; |
1646 } | 1646 } |
1647 | 1647 |
1648 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1648 static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
1649 { | 1649 { |
1650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1651 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(jsValue,
info); | 1651 TestObjectV8Internal::withExecutionContextAttributeAttributeSetter(v8Value,
info); |
1652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1653 } | 1653 } |
1654 | 1654 |
1655 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1655 static void withActiveWindowAndFirstWindowAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
1656 { | 1656 { |
1657 v8::Handle<v8::Object> holder = info.Holder(); | 1657 v8::Handle<v8::Object> holder = info.Holder(); |
1658 TestObject* impl = V8TestObject::toNative(holder); | 1658 TestObject* impl = V8TestObject::toNative(holder); |
1659 v8SetReturnValueFast(info, WTF::getPtr(impl->withActiveWindowAndFirstWindowA
ttribute()), impl); | 1659 v8SetReturnValueFast(info, WTF::getPtr(impl->withActiveWindowAndFirstWindowA
ttribute()), impl); |
1660 } | 1660 } |
1661 | 1661 |
1662 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1662 static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1663 { | 1663 { |
1664 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1664 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1665 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); | 1665 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter
(info); |
1666 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1666 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1667 } | 1667 } |
1668 | 1668 |
1669 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1669 static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1670 { | 1670 { |
1671 v8::Handle<v8::Object> holder = info.Holder(); | 1671 v8::Handle<v8::Object> holder = info.Holder(); |
1672 TestObject* impl = V8TestObject::toNative(holder); | 1672 TestObject* impl = V8TestObject::toNative(holder); |
1673 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1673 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
1674 impl->setWithActiveWindowAndFirstWindowAttribute(callingDOMWindow(info.GetIs
olate()), enteredDOMWindow(info.GetIsolate()), WTF::getPtr(cppValue)); | 1674 impl->setWithActiveWindowAndFirstWindowAttribute(callingDOMWindow(info.GetIs
olate()), enteredDOMWindow(info.GetIsolate()), WTF::getPtr(cppValue)); |
1675 } | 1675 } |
1676 | 1676 |
1677 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) | 1677 static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v
oid>& info) |
1678 { | 1678 { |
1679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1680 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter
(jsValue, info); | 1680 TestObjectV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter
(v8Value, info); |
1681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1681 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1682 } | 1682 } |
1683 | 1683 |
1684 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1684 static void withScriptStateAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
1685 { | 1685 { |
1686 v8::Handle<v8::Object> holder = info.Holder(); | 1686 v8::Handle<v8::Object> holder = info.Holder(); |
1687 TestObject* impl = V8TestObject::toNative(holder); | 1687 TestObject* impl = V8TestObject::toNative(holder); |
1688 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", holder, info.GetIsolate()); | 1688 ExceptionState exceptionState(ExceptionState::GetterContext, "withScriptStat
eAttributeRaises", "TestObject", holder, info.GetIsolate()); |
1689 RefPtr<TestObject> jsValue = impl->withScriptStateAttributeRaises(exceptionS
tate); | 1689 RefPtr<TestObject> v8Value = impl->withScriptStateAttributeRaises(exceptionS
tate); |
1690 if (UNLIKELY(exceptionState.throwIfNeeded())) | 1690 if (UNLIKELY(exceptionState.throwIfNeeded())) |
1691 return; | 1691 return; |
1692 v8SetReturnValueFast(info, WTF::getPtr(jsValue.release()), impl); | 1692 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl); |
1693 } | 1693 } |
1694 | 1694 |
1695 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1695 static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1696 { | 1696 { |
1697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1698 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); | 1698 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeGetter(info); |
1699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1700 } | 1700 } |
1701 | 1701 |
1702 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) | 1702 static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
1703 { | 1703 { |
1704 v8::Handle<v8::Object> holder = info.Holder(); | 1704 v8::Handle<v8::Object> holder = info.Holder(); |
1705 TestObject* impl = V8TestObject::toNative(holder); | 1705 TestObject* impl = V8TestObject::toNative(holder); |
1706 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 1706 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
1707 impl->setWithScriptStateAttributeRaises(WTF::getPtr(cppValue)); | 1707 impl->setWithScriptStateAttributeRaises(WTF::getPtr(cppValue)); |
1708 } | 1708 } |
1709 | 1709 |
1710 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) | 1710 static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
1711 { | 1711 { |
1712 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1712 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1713 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeSetter(jsValue,
info); | 1713 TestObjectV8Internal::withScriptStateAttributeRaisesAttributeSetter(v8Value,
info); |
1714 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1714 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1715 } | 1715 } |
1716 | 1716 |
1717 static void enforcedRangeByteAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1717 static void enforcedRangeByteAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
1718 { | 1718 { |
1719 v8::Handle<v8::Object> holder = info.Holder(); | 1719 v8::Handle<v8::Object> holder = info.Holder(); |
1720 TestObject* impl = V8TestObject::toNative(holder); | 1720 TestObject* impl = V8TestObject::toNative(holder); |
1721 v8SetReturnValueInt(info, impl->enforcedRangeByteAttr()); | 1721 v8SetReturnValueInt(info, impl->enforcedRangeByteAttr()); |
1722 } | 1722 } |
1723 | 1723 |
1724 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1724 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1725 { | 1725 { |
1726 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1726 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1727 TestObjectV8Internal::enforcedRangeByteAttrAttributeGetter(info); | 1727 TestObjectV8Internal::enforcedRangeByteAttrAttributeGetter(info); |
1728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1729 } | 1729 } |
1730 | 1730 |
1731 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 1731 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
1732 { | 1732 { |
1733 v8::Handle<v8::Object> holder = info.Holder(); | 1733 v8::Handle<v8::Object> holder = info.Holder(); |
1734 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB
yteAttr", "TestObject", holder, info.GetIsolate()); | 1734 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB
yteAttr", "TestObject", holder, info.GetIsolate()); |
1735 TestObject* impl = V8TestObject::toNative(holder); | 1735 TestObject* impl = V8TestObject::toNative(holder); |
1736 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, excep
tionState), exceptionState); | 1736 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(v8Value, EnforceRange, excep
tionState), exceptionState); |
1737 impl->setEnforcedRangeByteAttr(cppValue); | 1737 impl->setEnforcedRangeByteAttr(cppValue); |
1738 } | 1738 } |
1739 | 1739 |
1740 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1740 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1741 { | 1741 { |
1742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1743 TestObjectV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); | 1743 TestObjectV8Internal::enforcedRangeByteAttrAttributeSetter(v8Value, info); |
1744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1745 } | 1745 } |
1746 | 1746 |
1747 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1747 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1748 { | 1748 { |
1749 v8::Handle<v8::Object> holder = info.Holder(); | 1749 v8::Handle<v8::Object> holder = info.Holder(); |
1750 TestObject* impl = V8TestObject::toNative(holder); | 1750 TestObject* impl = V8TestObject::toNative(holder); |
1751 v8SetReturnValueUnsigned(info, impl->enforcedRangeOctetAttr()); | 1751 v8SetReturnValueUnsigned(info, impl->enforcedRangeOctetAttr()); |
1752 } | 1752 } |
1753 | 1753 |
1754 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1754 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1755 { | 1755 { |
1756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1757 TestObjectV8Internal::enforcedRangeOctetAttrAttributeGetter(info); | 1757 TestObjectV8Internal::enforcedRangeOctetAttrAttributeGetter(info); |
1758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1759 } | 1759 } |
1760 | 1760 |
1761 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1761 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1762 { | 1762 { |
1763 v8::Handle<v8::Object> holder = info.Holder(); | 1763 v8::Handle<v8::Object> holder = info.Holder(); |
1764 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO
ctetAttr", "TestObject", holder, info.GetIsolate()); | 1764 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO
ctetAttr", "TestObject", holder, info.GetIsolate()); |
1765 TestObject* impl = V8TestObject::toNative(holder); | 1765 TestObject* impl = V8TestObject::toNative(holder); |
1766 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange,
exceptionState), exceptionState); | 1766 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(v8Value, EnforceRange,
exceptionState), exceptionState); |
1767 impl->setEnforcedRangeOctetAttr(cppValue); | 1767 impl->setEnforcedRangeOctetAttr(cppValue); |
1768 } | 1768 } |
1769 | 1769 |
1770 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1770 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1771 { | 1771 { |
1772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1773 TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); | 1773 TestObjectV8Internal::enforcedRangeOctetAttrAttributeSetter(v8Value, info); |
1774 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1774 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1775 } | 1775 } |
1776 | 1776 |
1777 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 1777 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
1778 { | 1778 { |
1779 v8::Handle<v8::Object> holder = info.Holder(); | 1779 v8::Handle<v8::Object> holder = info.Holder(); |
1780 TestObject* impl = V8TestObject::toNative(holder); | 1780 TestObject* impl = V8TestObject::toNative(holder); |
1781 v8SetReturnValueInt(info, impl->enforcedRangeShortAttr()); | 1781 v8SetReturnValueInt(info, impl->enforcedRangeShortAttr()); |
1782 } | 1782 } |
1783 | 1783 |
1784 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1784 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1785 { | 1785 { |
1786 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1786 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1787 TestObjectV8Internal::enforcedRangeShortAttrAttributeGetter(info); | 1787 TestObjectV8Internal::enforcedRangeShortAttrAttributeGetter(info); |
1788 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1788 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1789 } | 1789 } |
1790 | 1790 |
1791 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 1791 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1792 { | 1792 { |
1793 v8::Handle<v8::Object> holder = info.Holder(); | 1793 v8::Handle<v8::Object> holder = info.Holder(); |
1794 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS
hortAttr", "TestObject", holder, info.GetIsolate()); | 1794 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS
hortAttr", "TestObject", holder, info.GetIsolate()); |
1795 TestObject* impl = V8TestObject::toNative(holder); | 1795 TestObject* impl = V8TestObject::toNative(holder); |
1796 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exce
ptionState), exceptionState); | 1796 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(v8Value, EnforceRange, exce
ptionState), exceptionState); |
1797 impl->setEnforcedRangeShortAttr(cppValue); | 1797 impl->setEnforcedRangeShortAttr(cppValue); |
1798 } | 1798 } |
1799 | 1799 |
1800 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1800 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1801 { | 1801 { |
1802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1803 TestObjectV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); | 1803 TestObjectV8Internal::enforcedRangeShortAttrAttributeSetter(v8Value, info); |
1804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1805 } | 1805 } |
1806 | 1806 |
1807 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 1807 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
1808 { | 1808 { |
1809 v8::Handle<v8::Object> holder = info.Holder(); | 1809 v8::Handle<v8::Object> holder = info.Holder(); |
1810 TestObject* impl = V8TestObject::toNative(holder); | 1810 TestObject* impl = V8TestObject::toNative(holder); |
1811 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedShortAttr()); | 1811 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedShortAttr()); |
1812 } | 1812 } |
1813 | 1813 |
1814 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1814 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1815 { | 1815 { |
1816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1817 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); | 1817 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); |
1818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1819 } | 1819 } |
1820 | 1820 |
1821 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j
sValue, const v8::PropertyCallbackInfo<void>& info) | 1821 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<void>& info) |
1822 { | 1822 { |
1823 v8::Handle<v8::Object> holder = info.Holder(); | 1823 v8::Handle<v8::Object> holder = info.Holder(); |
1824 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedShortAttr", "TestObject", holder, info.GetIsolate()); | 1824 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedShortAttr", "TestObject", holder, info.GetIsolate()); |
1825 TestObject* impl = V8TestObject::toNative(holder); | 1825 TestObject* impl = V8TestObject::toNative(holder); |
1826 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange
, exceptionState), exceptionState); | 1826 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, EnforceRange
, exceptionState), exceptionState); |
1827 impl->setEnforcedRangeUnsignedShortAttr(cppValue); | 1827 impl->setEnforcedRangeUnsignedShortAttr(cppValue); |
1828 } | 1828 } |
1829 | 1829 |
1830 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) | 1830 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8::
String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
1831 { | 1831 { |
1832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1833 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue,
info); | 1833 TestObjectV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(v8Value,
info); |
1834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1835 } | 1835 } |
1836 | 1836 |
1837 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 1837 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
1838 { | 1838 { |
1839 v8::Handle<v8::Object> holder = info.Holder(); | 1839 v8::Handle<v8::Object> holder = info.Holder(); |
1840 TestObject* impl = V8TestObject::toNative(holder); | 1840 TestObject* impl = V8TestObject::toNative(holder); |
1841 v8SetReturnValueInt(info, impl->enforcedRangeLongAttr()); | 1841 v8SetReturnValueInt(info, impl->enforcedRangeLongAttr()); |
1842 } | 1842 } |
1843 | 1843 |
1844 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 1844 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
1845 { | 1845 { |
1846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1847 TestObjectV8Internal::enforcedRangeLongAttrAttributeGetter(info); | 1847 TestObjectV8Internal::enforcedRangeLongAttrAttributeGetter(info); |
1848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1849 } | 1849 } |
1850 | 1850 |
1851 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 1851 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
1852 { | 1852 { |
1853 v8::Handle<v8::Object> holder = info.Holder(); | 1853 v8::Handle<v8::Object> holder = info.Holder(); |
1854 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongAttr", "TestObject", holder, info.GetIsolate()); | 1854 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongAttr", "TestObject", holder, info.GetIsolate()); |
1855 TestObject* impl = V8TestObject::toNative(holder); | 1855 TestObject* impl = V8TestObject::toNative(holder); |
1856 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exce
ptionState), exceptionState); | 1856 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, EnforceRange, exce
ptionState), exceptionState); |
1857 impl->setEnforcedRangeLongAttr(cppValue); | 1857 impl->setEnforcedRangeLongAttr(cppValue); |
1858 } | 1858 } |
1859 | 1859 |
1860 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1860 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1861 { | 1861 { |
1862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1863 TestObjectV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); | 1863 TestObjectV8Internal::enforcedRangeLongAttrAttributeSetter(v8Value, info); |
1864 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1864 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1865 } | 1865 } |
1866 | 1866 |
1867 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 1867 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
1868 { | 1868 { |
1869 v8::Handle<v8::Object> holder = info.Holder(); | 1869 v8::Handle<v8::Object> holder = info.Holder(); |
1870 TestObject* impl = V8TestObject::toNative(holder); | 1870 TestObject* impl = V8TestObject::toNative(holder); |
1871 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedLongAttr()); | 1871 v8SetReturnValueUnsigned(info, impl->enforcedRangeUnsignedLongAttr()); |
1872 } | 1872 } |
1873 | 1873 |
1874 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1874 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1875 { | 1875 { |
1876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1877 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); | 1877 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); |
1878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1879 } | 1879 } |
1880 | 1880 |
1881 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 1881 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
1882 { | 1882 { |
1883 v8::Handle<v8::Object> holder = info.Holder(); | 1883 v8::Handle<v8::Object> holder = info.Holder(); |
1884 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongAttr", "TestObject", holder, info.GetIsolate()); | 1884 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongAttr", "TestObject", holder, info.GetIsolate()); |
1885 TestObject* impl = V8TestObject::toNative(holder); | 1885 TestObject* impl = V8TestObject::toNative(holder); |
1886 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange
, exceptionState), exceptionState); | 1886 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, EnforceRange
, exceptionState), exceptionState); |
1887 impl->setEnforcedRangeUnsignedLongAttr(cppValue); | 1887 impl->setEnforcedRangeUnsignedLongAttr(cppValue); |
1888 } | 1888 } |
1889 | 1889 |
1890 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 1890 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
1891 { | 1891 { |
1892 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1892 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1893 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue,
info); | 1893 TestObjectV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(v8Value,
info); |
1894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1895 } | 1895 } |
1896 | 1896 |
1897 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 1897 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
1898 { | 1898 { |
1899 v8::Handle<v8::Object> holder = info.Holder(); | 1899 v8::Handle<v8::Object> holder = info.Holder(); |
1900 TestObject* impl = V8TestObject::toNative(holder); | 1900 TestObject* impl = V8TestObject::toNative(holder); |
1901 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeLongLongAttr()
)); | 1901 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeLongLongAttr()
)); |
1902 } | 1902 } |
1903 | 1903 |
1904 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1904 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1905 { | 1905 { |
1906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1907 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); | 1907 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); |
1908 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1908 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1909 } | 1909 } |
1910 | 1910 |
1911 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 1911 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
1912 { | 1912 { |
1913 v8::Handle<v8::Object> holder = info.Holder(); | 1913 v8::Handle<v8::Object> holder = info.Holder(); |
1914 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongLongAttr", "TestObject", holder, info.GetIsolate()); | 1914 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL
ongLongAttr", "TestObject", holder, info.GetIsolate()); |
1915 TestObject* impl = V8TestObject::toNative(holder); | 1915 TestObject* impl = V8TestObject::toNative(holder); |
1916 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange
, exceptionState), exceptionState); | 1916 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(v8Value, EnforceRange
, exceptionState), exceptionState); |
1917 impl->setEnforcedRangeLongLongAttr(cppValue); | 1917 impl->setEnforcedRangeLongLongAttr(cppValue); |
1918 } | 1918 } |
1919 | 1919 |
1920 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1920 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1921 { | 1921 { |
1922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1923 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info
); | 1923 TestObjectV8Internal::enforcedRangeLongLongAttrAttributeSetter(v8Value, info
); |
1924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1925 } | 1925 } |
1926 | 1926 |
1927 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) | 1927 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
1928 { | 1928 { |
1929 v8::Handle<v8::Object> holder = info.Holder(); | 1929 v8::Handle<v8::Object> holder = info.Holder(); |
1930 TestObject* impl = V8TestObject::toNative(holder); | 1930 TestObject* impl = V8TestObject::toNative(holder); |
1931 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeUnsignedLongLo
ngAttr())); | 1931 v8SetReturnValue(info, static_cast<double>(impl->enforcedRangeUnsignedLongLo
ngAttr())); |
1932 } | 1932 } |
1933 | 1933 |
1934 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1934 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
1935 { | 1935 { |
1936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1937 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info)
; | 1937 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info)
; |
1938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1939 } | 1939 } |
1940 | 1940 |
1941 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value
> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1941 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value
> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1942 { | 1942 { |
1943 v8::Handle<v8::Object> holder = info.Holder(); | 1943 v8::Handle<v8::Object> holder = info.Holder(); |
1944 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongLongAttr", "TestObject", holder, info.GetIsolate()); | 1944 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU
nsignedLongLongAttr", "TestObject", holder, info.GetIsolate()); |
1945 TestObject* impl = V8TestObject::toNative(holder); | 1945 TestObject* impl = V8TestObject::toNative(holder); |
1946 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, En
forceRange, exceptionState), exceptionState); | 1946 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, En
forceRange, exceptionState), exceptionState); |
1947 impl->setEnforcedRangeUnsignedLongLongAttr(cppValue); | 1947 impl->setEnforcedRangeUnsignedLongLongAttr(cppValue); |
1948 } | 1948 } |
1949 | 1949 |
1950 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 1950 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v
8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
1951 { | 1951 { |
1952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1953 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsVal
ue, info); | 1953 TestObjectV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(v8Val
ue, info); |
1954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1955 } | 1955 } |
1956 | 1956 |
1957 #if ENABLE(Condition1) | 1957 #if ENABLE(Condition1) |
1958 static void conditionalAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1958 static void conditionalAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1959 { | 1959 { |
1960 v8::Handle<v8::Object> holder = info.Holder(); | 1960 v8::Handle<v8::Object> holder = info.Holder(); |
1961 TestObject* impl = V8TestObject::toNative(holder); | 1961 TestObject* impl = V8TestObject::toNative(holder); |
1962 v8SetReturnValueInt(info, impl->conditionalAttr1()); | 1962 v8SetReturnValueInt(info, impl->conditionalAttr1()); |
1963 } | 1963 } |
1964 #endif // ENABLE(Condition1) | 1964 #endif // ENABLE(Condition1) |
1965 | 1965 |
1966 #if ENABLE(Condition1) | 1966 #if ENABLE(Condition1) |
1967 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 1967 static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
1968 { | 1968 { |
1969 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1969 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
1970 TestObjectV8Internal::conditionalAttr1AttributeGetter(info); | 1970 TestObjectV8Internal::conditionalAttr1AttributeGetter(info); |
1971 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1971 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1972 } | 1972 } |
1973 #endif // ENABLE(Condition1) | 1973 #endif // ENABLE(Condition1) |
1974 | 1974 |
1975 #if ENABLE(Condition1) | 1975 #if ENABLE(Condition1) |
1976 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 1976 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
1977 { | 1977 { |
1978 v8::Handle<v8::Object> holder = info.Holder(); | 1978 v8::Handle<v8::Object> holder = info.Holder(); |
1979 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r1", "TestObject", holder, info.GetIsolate()); | 1979 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r1", "TestObject", holder, info.GetIsolate()); |
1980 TestObject* impl = V8TestObject::toNative(holder); | 1980 TestObject* impl = V8TestObject::toNative(holder); |
1981 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 1981 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
1982 impl->setConditionalAttr1(cppValue); | 1982 impl->setConditionalAttr1(cppValue); |
1983 } | 1983 } |
1984 #endif // ENABLE(Condition1) | 1984 #endif // ENABLE(Condition1) |
1985 | 1985 |
1986 #if ENABLE(Condition1) | 1986 #if ENABLE(Condition1) |
1987 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 1987 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1988 { | 1988 { |
1989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 1989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
1990 TestObjectV8Internal::conditionalAttr1AttributeSetter(jsValue, info); | 1990 TestObjectV8Internal::conditionalAttr1AttributeSetter(v8Value, info); |
1991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 1991 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
1992 } | 1992 } |
1993 #endif // ENABLE(Condition1) | 1993 #endif // ENABLE(Condition1) |
1994 | 1994 |
1995 #if ENABLE(Condition1) && ENABLE(Condition2) | 1995 #if ENABLE(Condition1) && ENABLE(Condition2) |
1996 static void conditionalAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 1996 static void conditionalAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
1997 { | 1997 { |
1998 v8::Handle<v8::Object> holder = info.Holder(); | 1998 v8::Handle<v8::Object> holder = info.Holder(); |
1999 TestObject* impl = V8TestObject::toNative(holder); | 1999 TestObject* impl = V8TestObject::toNative(holder); |
2000 v8SetReturnValueInt(info, impl->conditionalAttr2()); | 2000 v8SetReturnValueInt(info, impl->conditionalAttr2()); |
2001 } | 2001 } |
2002 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2002 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
2003 | 2003 |
2004 #if ENABLE(Condition1) && ENABLE(Condition2) | 2004 #if ENABLE(Condition1) && ENABLE(Condition2) |
2005 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2005 static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2006 { | 2006 { |
2007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2008 TestObjectV8Internal::conditionalAttr2AttributeGetter(info); | 2008 TestObjectV8Internal::conditionalAttr2AttributeGetter(info); |
2009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2010 } | 2010 } |
2011 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2011 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
2012 | 2012 |
2013 #if ENABLE(Condition1) && ENABLE(Condition2) | 2013 #if ENABLE(Condition1) && ENABLE(Condition2) |
2014 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2014 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
2015 { | 2015 { |
2016 v8::Handle<v8::Object> holder = info.Holder(); | 2016 v8::Handle<v8::Object> holder = info.Holder(); |
2017 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r2", "TestObject", holder, info.GetIsolate()); | 2017 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r2", "TestObject", holder, info.GetIsolate()); |
2018 TestObject* impl = V8TestObject::toNative(holder); | 2018 TestObject* impl = V8TestObject::toNative(holder); |
2019 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2019 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2020 impl->setConditionalAttr2(cppValue); | 2020 impl->setConditionalAttr2(cppValue); |
2021 } | 2021 } |
2022 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2022 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
2023 | 2023 |
2024 #if ENABLE(Condition1) && ENABLE(Condition2) | 2024 #if ENABLE(Condition1) && ENABLE(Condition2) |
2025 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2025 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2026 { | 2026 { |
2027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2028 TestObjectV8Internal::conditionalAttr2AttributeSetter(jsValue, info); | 2028 TestObjectV8Internal::conditionalAttr2AttributeSetter(v8Value, info); |
2029 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2029 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2030 } | 2030 } |
2031 #endif // ENABLE(Condition1) && ENABLE(Condition2) | 2031 #endif // ENABLE(Condition1) && ENABLE(Condition2) |
2032 | 2032 |
2033 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2033 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2034 static void conditionalAttr3AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2034 static void conditionalAttr3AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
2035 { | 2035 { |
2036 v8::Handle<v8::Object> holder = info.Holder(); | 2036 v8::Handle<v8::Object> holder = info.Holder(); |
2037 TestObject* impl = V8TestObject::toNative(holder); | 2037 TestObject* impl = V8TestObject::toNative(holder); |
2038 v8SetReturnValueInt(info, impl->conditionalAttr3()); | 2038 v8SetReturnValueInt(info, impl->conditionalAttr3()); |
2039 } | 2039 } |
2040 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2040 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2041 | 2041 |
2042 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2042 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2043 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2043 static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2044 { | 2044 { |
2045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2046 TestObjectV8Internal::conditionalAttr3AttributeGetter(info); | 2046 TestObjectV8Internal::conditionalAttr3AttributeGetter(info); |
2047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2048 } | 2048 } |
2049 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2049 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2050 | 2050 |
2051 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2051 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2052 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2052 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
2053 { | 2053 { |
2054 v8::Handle<v8::Object> holder = info.Holder(); | 2054 v8::Handle<v8::Object> holder = info.Holder(); |
2055 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r3", "TestObject", holder, info.GetIsolate()); | 2055 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt
r3", "TestObject", holder, info.GetIsolate()); |
2056 TestObject* impl = V8TestObject::toNative(holder); | 2056 TestObject* impl = V8TestObject::toNative(holder); |
2057 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2057 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2058 impl->setConditionalAttr3(cppValue); | 2058 impl->setConditionalAttr3(cppValue); |
2059 } | 2059 } |
2060 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2060 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2061 | 2061 |
2062 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2062 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2063 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2063 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2064 { | 2064 { |
2065 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2065 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2066 TestObjectV8Internal::conditionalAttr3AttributeSetter(jsValue, info); | 2066 TestObjectV8Internal::conditionalAttr3AttributeSetter(v8Value, info); |
2067 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2067 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2068 } | 2068 } |
2069 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) | 2069 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) |
2070 | 2070 |
2071 static void cachedAttribute1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2071 static void cachedAttribute1AttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
2072 { | 2072 { |
2073 v8::Handle<v8::Object> holder = info.Holder(); | 2073 v8::Handle<v8::Object> holder = info.Holder(); |
2074 TestObject* impl = V8TestObject::toNative(holder); | 2074 TestObject* impl = V8TestObject::toNative(holder); |
2075 v8SetReturnValue(info, impl->cachedAttribute1().v8Value()); | 2075 v8SetReturnValue(info, impl->cachedAttribute1().v8Value()); |
2076 } | 2076 } |
(...skipping 18 matching lines...) Expand all Loading... |
2095 TestObjectV8Internal::cachedAttribute2AttributeGetter(info); | 2095 TestObjectV8Internal::cachedAttribute2AttributeGetter(info); |
2096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2097 } | 2097 } |
2098 | 2098 |
2099 static void cachedDirtyableAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2099 static void cachedDirtyableAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
2100 { | 2100 { |
2101 v8::Handle<v8::Object> holder = info.Holder(); | 2101 v8::Handle<v8::Object> holder = info.Holder(); |
2102 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttribute"); | 2102 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttribute"); |
2103 TestObject* impl = V8TestObject::toNative(holder); | 2103 TestObject* impl = V8TestObject::toNative(holder); |
2104 if (!impl->isValueDirty()) { | 2104 if (!impl->isValueDirty()) { |
2105 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | 2105 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
2106 if (!jsValue.IsEmpty()) { | 2106 if (!v8Value.IsEmpty()) { |
2107 v8SetReturnValue(info, jsValue); | 2107 v8SetReturnValue(info, v8Value); |
2108 return; | 2108 return; |
2109 } | 2109 } |
2110 } | 2110 } |
2111 ScriptValue jsValue = impl->cachedDirtyableAttribute(); | 2111 ScriptValue v8Value = impl->cachedDirtyableAttribute(); |
2112 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, jsVal
ue.v8Value()); | 2112 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue.v8Value()); |
2113 v8SetReturnValue(info, jsValue.v8Value()); | 2113 v8SetReturnValue(info, v8Value.v8Value()); |
2114 } | 2114 } |
2115 | 2115 |
2116 static void cachedDirtyableAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2116 static void cachedDirtyableAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2117 { | 2117 { |
2118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2119 TestObjectV8Internal::cachedDirtyableAttributeAttributeGetter(info); | 2119 TestObjectV8Internal::cachedDirtyableAttributeAttributeGetter(info); |
2120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2121 } | 2121 } |
2122 | 2122 |
2123 static void cachedDirtyableAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 2123 static void cachedDirtyableAttributeRaisesAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
2124 { | 2124 { |
2125 v8::Handle<v8::Object> holder = info.Holder(); | 2125 v8::Handle<v8::Object> holder = info.Holder(); |
2126 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttributeRaises"); | 2126 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac
hedDirtyableAttributeRaises"); |
2127 TestObject* impl = V8TestObject::toNative(holder); | 2127 TestObject* impl = V8TestObject::toNative(holder); |
2128 if (!impl->isValueDirty()) { | 2128 if (!impl->isValueDirty()) { |
2129 v8::Handle<v8::Value> jsValue = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); | 2129 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs
olate(), holder, propertyName); |
2130 if (!jsValue.IsEmpty()) { | 2130 if (!v8Value.IsEmpty()) { |
2131 v8SetReturnValue(info, jsValue); | 2131 v8SetReturnValue(info, v8Value); |
2132 return; | 2132 return; |
2133 } | 2133 } |
2134 } | 2134 } |
2135 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl
eAttributeRaises", "TestObject", holder, info.GetIsolate()); | 2135 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedDirtyabl
eAttributeRaises", "TestObject", holder, info.GetIsolate()); |
2136 ScriptValue jsValue = impl->cachedDirtyableAttributeRaises(exceptionState); | 2136 ScriptValue v8Value = impl->cachedDirtyableAttributeRaises(exceptionState); |
2137 if (UNLIKELY(exceptionState.throwIfNeeded())) | 2137 if (UNLIKELY(exceptionState.throwIfNeeded())) |
2138 return; | 2138 return; |
2139 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, jsVal
ue.v8Value()); | 2139 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val
ue.v8Value()); |
2140 v8SetReturnValue(info, jsValue.v8Value()); | 2140 v8SetReturnValue(info, v8Value.v8Value()); |
2141 } | 2141 } |
2142 | 2142 |
2143 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2143 static void cachedDirtyableAttributeRaisesAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2144 { | 2144 { |
2145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2145 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2146 TestObjectV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); | 2146 TestObjectV8Internal::cachedDirtyableAttributeRaisesAttributeGetter(info); |
2147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2147 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2148 } | 2148 } |
2149 | 2149 |
2150 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) | 2150 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value
>& info) |
2151 { | 2151 { |
2152 v8::Handle<v8::Object> holder = info.Holder(); | 2152 v8::Handle<v8::Object> holder = info.Holder(); |
2153 TestObject* impl = V8TestObject::toNative(holder); | 2153 TestObject* impl = V8TestObject::toNative(holder); |
2154 v8SetReturnValue(info, impl->anyAttribute().v8Value()); | 2154 v8SetReturnValue(info, impl->anyAttribute().v8Value()); |
2155 } | 2155 } |
2156 | 2156 |
2157 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) | 2157 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8:
:PropertyCallbackInfo<v8::Value>& info) |
2158 { | 2158 { |
2159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2160 TestObjectV8Internal::anyAttributeAttributeGetter(info); | 2160 TestObjectV8Internal::anyAttributeAttributeGetter(info); |
2161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2162 } | 2162 } |
2163 | 2163 |
2164 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::
PropertyCallbackInfo<void>& info) | 2164 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::
PropertyCallbackInfo<void>& info) |
2165 { | 2165 { |
2166 v8::Handle<v8::Object> holder = info.Holder(); | 2166 v8::Handle<v8::Object> holder = info.Holder(); |
2167 TestObject* impl = V8TestObject::toNative(holder); | 2167 TestObject* impl = V8TestObject::toNative(holder); |
2168 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); | 2168 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); |
2169 impl->setAnyAttribute(cppValue); | 2169 impl->setAnyAttribute(cppValue); |
2170 } | 2170 } |
2171 | 2171 |
2172 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2172 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2173 { | 2173 { |
2174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2175 TestObjectV8Internal::anyAttributeAttributeSetter(jsValue, info); | 2175 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info); |
2176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2177 } | 2177 } |
2178 | 2178 |
2179 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2179 static void callbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2180 { | 2180 { |
2181 v8::Handle<v8::Object> holder = info.Holder(); | 2181 v8::Handle<v8::Object> holder = info.Holder(); |
2182 TestObject* impl = V8TestObject::toNative(holder); | 2182 TestObject* impl = V8TestObject::toNative(holder); |
2183 v8SetReturnValue(info, impl->callbackFunctionAttribute().v8Value()); | 2183 v8SetReturnValue(info, impl->callbackFunctionAttribute().v8Value()); |
2184 } | 2184 } |
2185 | 2185 |
2186 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2186 static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2187 { | 2187 { |
2188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2189 TestObjectV8Internal::callbackFunctionAttributeAttributeGetter(info); | 2189 TestObjectV8Internal::callbackFunctionAttributeAttributeGetter(info); |
2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2191 } | 2191 } |
2192 | 2192 |
2193 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2193 static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
2194 { | 2194 { |
2195 v8::Handle<v8::Object> holder = info.Holder(); | 2195 v8::Handle<v8::Object> holder = info.Holder(); |
2196 TestObject* impl = V8TestObject::toNative(holder); | 2196 TestObject* impl = V8TestObject::toNative(holder); |
2197 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate(
))); | 2197 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate(
))); |
2198 impl->setCallbackFunctionAttribute(cppValue); | 2198 impl->setCallbackFunctionAttribute(cppValue); |
2199 } | 2199 } |
2200 | 2200 |
2201 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2201 static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2202 { | 2202 { |
2203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2204 TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(jsValue, info
); | 2204 TestObjectV8Internal::callbackFunctionAttributeAttributeSetter(v8Value, info
); |
2205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2206 } | 2206 } |
2207 | 2207 |
2208 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2208 static void enabledAtRuntimeAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
2209 { | 2209 { |
2210 v8::Handle<v8::Object> holder = info.Holder(); | 2210 v8::Handle<v8::Object> holder = info.Holder(); |
2211 TestObject* impl = V8TestObject::toNative(holder); | 2211 TestObject* impl = V8TestObject::toNative(holder); |
2212 v8SetReturnValueInt(info, impl->enabledAtRuntimeAttr()); | 2212 v8SetReturnValueInt(info, impl->enabledAtRuntimeAttr()); |
2213 } | 2213 } |
2214 | 2214 |
2215 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2215 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2216 { | 2216 { |
2217 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2217 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2218 TestObjectV8Internal::enabledAtRuntimeAttrAttributeGetter(info); | 2218 TestObjectV8Internal::enabledAtRuntimeAttrAttributeGetter(info); |
2219 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2219 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2220 } | 2220 } |
2221 | 2221 |
2222 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 2222 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
2223 { | 2223 { |
2224 v8::Handle<v8::Object> holder = info.Holder(); | 2224 v8::Handle<v8::Object> holder = info.Holder(); |
2225 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti
meAttr", "TestObject", holder, info.GetIsolate()); | 2225 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti
meAttr", "TestObject", holder, info.GetIsolate()); |
2226 TestObject* impl = V8TestObject::toNative(holder); | 2226 TestObject* impl = V8TestObject::toNative(holder); |
2227 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2227 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2228 impl->setEnabledAtRuntimeAttr(cppValue); | 2228 impl->setEnabledAtRuntimeAttr(cppValue); |
2229 } | 2229 } |
2230 | 2230 |
2231 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2231 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2232 { | 2232 { |
2233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2234 TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); | 2234 TestObjectV8Internal::enabledAtRuntimeAttrAttributeSetter(v8Value, info); |
2235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2236 } | 2236 } |
2237 | 2237 |
2238 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2238 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2239 { | 2239 { |
2240 v8::Handle<v8::Object> holder = info.Holder(); | 2240 v8::Handle<v8::Object> holder = info.Holder(); |
2241 TestObject* impl = V8TestObject::toNative(holder); | 2241 TestObject* impl = V8TestObject::toNative(holder); |
2242 v8SetReturnValueInt(info, impl->enabledPerContextAttr()); | 2242 v8SetReturnValueInt(info, impl->enabledPerContextAttr()); |
2243 } | 2243 } |
2244 | 2244 |
2245 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2245 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2246 { | 2246 { |
2247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2248 TestObjectV8Internal::enabledPerContextAttrAttributeGetter(info); | 2248 TestObjectV8Internal::enabledPerContextAttrAttributeGetter(info); |
2249 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2249 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2250 } | 2250 } |
2251 | 2251 |
2252 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 2252 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
2253 { | 2253 { |
2254 v8::Handle<v8::Object> holder = info.Holder(); | 2254 v8::Handle<v8::Object> holder = info.Holder(); |
2255 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont
extAttr", "TestObject", holder, info.GetIsolate()); | 2255 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont
extAttr", "TestObject", holder, info.GetIsolate()); |
2256 TestObject* impl = V8TestObject::toNative(holder); | 2256 TestObject* impl = V8TestObject::toNative(holder); |
2257 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2257 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2258 impl->setEnabledPerContextAttr(cppValue); | 2258 impl->setEnabledPerContextAttr(cppValue); |
2259 } | 2259 } |
2260 | 2260 |
2261 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2261 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2262 { | 2262 { |
2263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2264 TestObjectV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); | 2264 TestObjectV8Internal::enabledPerContextAttrAttributeSetter(v8Value, info); |
2265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2266 } | 2266 } |
2267 | 2267 |
2268 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) | 2268 static void floatArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>&
info) |
2269 { | 2269 { |
2270 v8::Handle<v8::Object> holder = info.Holder(); | 2270 v8::Handle<v8::Object> holder = info.Holder(); |
2271 TestObject* impl = V8TestObject::toNative(holder); | 2271 TestObject* impl = V8TestObject::toNative(holder); |
2272 v8SetReturnValue(info, v8Array(impl->floatArray(), info.GetIsolate())); | 2272 v8SetReturnValue(info, v8Array(impl->floatArray(), info.GetIsolate())); |
2273 } | 2273 } |
2274 | 2274 |
2275 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 2275 static void floatArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
2276 { | 2276 { |
2277 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2277 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2278 TestObjectV8Internal::floatArrayAttributeGetter(info); | 2278 TestObjectV8Internal::floatArrayAttributeGetter(info); |
2279 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2279 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2280 } | 2280 } |
2281 | 2281 |
2282 static void floatArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 2282 static void floatArrayAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
2283 { | 2283 { |
2284 v8::Handle<v8::Object> holder = info.Holder(); | 2284 v8::Handle<v8::Object> holder = info.Holder(); |
2285 TestObject* impl = V8TestObject::toNative(holder); | 2285 TestObject* impl = V8TestObject::toNative(holder); |
2286 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, in
fo.GetIsolate())); | 2286 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(v8Value, 0, in
fo.GetIsolate())); |
2287 impl->setFloatArray(cppValue); | 2287 impl->setFloatArray(cppValue); |
2288 } | 2288 } |
2289 | 2289 |
2290 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2290 static void floatArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2291 { | 2291 { |
2292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2293 TestObjectV8Internal::floatArrayAttributeSetter(jsValue, info); | 2293 TestObjectV8Internal::floatArrayAttributeSetter(v8Value, info); |
2294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2295 } | 2295 } |
2296 | 2296 |
2297 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 2297 static void doubleArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
2298 { | 2298 { |
2299 v8::Handle<v8::Object> holder = info.Holder(); | 2299 v8::Handle<v8::Object> holder = info.Holder(); |
2300 TestObject* impl = V8TestObject::toNative(holder); | 2300 TestObject* impl = V8TestObject::toNative(holder); |
2301 v8SetReturnValue(info, v8Array(impl->doubleArray(), info.GetIsolate())); | 2301 v8SetReturnValue(info, v8Array(impl->doubleArray(), info.GetIsolate())); |
2302 } | 2302 } |
2303 | 2303 |
2304 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 2304 static void doubleArrayAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
2305 { | 2305 { |
2306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2307 TestObjectV8Internal::doubleArrayAttributeGetter(info); | 2307 TestObjectV8Internal::doubleArrayAttributeGetter(info); |
2308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2309 } | 2309 } |
2310 | 2310 |
2311 static void doubleArrayAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 2311 static void doubleArrayAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
2312 { | 2312 { |
2313 v8::Handle<v8::Object> holder = info.Holder(); | 2313 v8::Handle<v8::Object> holder = info.Holder(); |
2314 TestObject* impl = V8TestObject::toNative(holder); | 2314 TestObject* impl = V8TestObject::toNative(holder); |
2315 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0,
info.GetIsolate())); | 2315 V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(v8Value, 0,
info.GetIsolate())); |
2316 impl->setDoubleArray(cppValue); | 2316 impl->setDoubleArray(cppValue); |
2317 } | 2317 } |
2318 | 2318 |
2319 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2319 static void doubleArrayAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2320 { | 2320 { |
2321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2322 TestObjectV8Internal::doubleArrayAttributeSetter(jsValue, info); | 2322 TestObjectV8Internal::doubleArrayAttributeSetter(v8Value, info); |
2323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2324 } | 2324 } |
2325 | 2325 |
2326 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) | 2326 static void messagePortArrayAttributeGetter(const v8::PropertyCallbackInfo<v8::V
alue>& info) |
2327 { | 2327 { |
2328 v8::Handle<v8::Object> holder = info.Holder(); | 2328 v8::Handle<v8::Object> holder = info.Holder(); |
2329 TestObject* impl = V8TestObject::toNative(holder); | 2329 TestObject* impl = V8TestObject::toNative(holder); |
2330 v8SetReturnValue(info, v8Array(impl->messagePortArray(), info.GetIsolate()))
; | 2330 v8SetReturnValue(info, v8Array(impl->messagePortArray(), info.GetIsolate()))
; |
2331 } | 2331 } |
2332 | 2332 |
2333 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 2333 static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
2334 { | 2334 { |
2335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2336 TestObjectV8Internal::messagePortArrayAttributeGetter(info); | 2336 TestObjectV8Internal::messagePortArrayAttributeGetter(info); |
2337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2338 } | 2338 } |
2339 | 2339 |
2340 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2340 static void messagePortArrayAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
2341 { | 2341 { |
2342 v8::Handle<v8::Object> holder = info.Holder(); | 2342 v8::Handle<v8::Object> holder = info.Holder(); |
2343 TestObject* impl = V8TestObject::toNative(holder); | 2343 TestObject* impl = V8TestObject::toNative(holder); |
2344 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray
<MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate()))); | 2344 V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray
<MessagePort, V8MessagePort>(v8Value, 0, info.GetIsolate()))); |
2345 impl->setMessagePortArray(cppValue); | 2345 impl->setMessagePortArray(cppValue); |
2346 } | 2346 } |
2347 | 2347 |
2348 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2348 static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2349 { | 2349 { |
2350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2351 TestObjectV8Internal::messagePortArrayAttributeSetter(jsValue, info); | 2351 TestObjectV8Internal::messagePortArrayAttributeSetter(v8Value, info); |
2352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2353 } | 2353 } |
2354 | 2354 |
2355 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 2355 static void contentDocumentAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
2356 { | 2356 { |
2357 v8::Handle<v8::Object> holder = info.Holder(); | 2357 v8::Handle<v8::Object> holder = info.Holder(); |
2358 TestObject* impl = V8TestObject::toNative(holder); | 2358 TestObject* impl = V8TestObject::toNative(holder); |
2359 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", holder, info.GetIsolate()); | 2359 ExceptionState exceptionState(ExceptionState::GetterContext, "contentDocumen
t", "TestObject", holder, info.GetIsolate()); |
2360 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->conte
ntDocument(), exceptionState)) { | 2360 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->conte
ntDocument(), exceptionState)) { |
2361 v8SetReturnValueNull(info); | 2361 v8SetReturnValueNull(info); |
(...skipping 17 matching lines...) Expand all Loading... |
2379 v8SetReturnValueInt(info, impl->blueberry()); | 2379 v8SetReturnValueInt(info, impl->blueberry()); |
2380 } | 2380 } |
2381 | 2381 |
2382 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 2382 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
2383 { | 2383 { |
2384 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2384 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2385 TestObjectV8Internal::strawberryAttributeGetter(info); | 2385 TestObjectV8Internal::strawberryAttributeGetter(info); |
2386 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2386 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2387 } | 2387 } |
2388 | 2388 |
2389 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr
opertyCallbackInfo<void>& info) | 2389 static void strawberryAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr
opertyCallbackInfo<void>& info) |
2390 { | 2390 { |
2391 v8::Handle<v8::Object> holder = info.Holder(); | 2391 v8::Handle<v8::Object> holder = info.Holder(); |
2392 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "
TestObject", holder, info.GetIsolate()); | 2392 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", "
TestObject", holder, info.GetIsolate()); |
2393 TestObject* impl = V8TestObject::toNative(holder); | 2393 TestObject* impl = V8TestObject::toNative(holder); |
2394 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2394 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2395 impl->setBlueberry(cppValue); | 2395 impl->setBlueberry(cppValue); |
2396 } | 2396 } |
2397 | 2397 |
2398 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2398 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2399 { | 2399 { |
2400 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2400 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2401 TestObjectV8Internal::strawberryAttributeSetter(jsValue, info); | 2401 TestObjectV8Internal::strawberryAttributeSetter(v8Value, info); |
2402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2403 } | 2403 } |
2404 | 2404 |
2405 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) | 2405 static void strictFloatAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>
& info) |
2406 { | 2406 { |
2407 v8::Handle<v8::Object> holder = info.Holder(); | 2407 v8::Handle<v8::Object> holder = info.Holder(); |
2408 TestObject* impl = V8TestObject::toNative(holder); | 2408 TestObject* impl = V8TestObject::toNative(holder); |
2409 v8SetReturnValue(info, impl->strictFloat()); | 2409 v8SetReturnValue(info, impl->strictFloat()); |
2410 } | 2410 } |
2411 | 2411 |
2412 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) | 2412 static void strictFloatAttributeGetterCallback(v8::Local<v8::String>, const v8::
PropertyCallbackInfo<v8::Value>& info) |
2413 { | 2413 { |
2414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2415 TestObjectV8Internal::strictFloatAttributeGetter(info); | 2415 TestObjectV8Internal::strictFloatAttributeGetter(info); |
2416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2417 } | 2417 } |
2418 | 2418 |
2419 static void strictFloatAttributeSetter(v8::Local<v8::Value> jsValue, const v8::P
ropertyCallbackInfo<void>& info) | 2419 static void strictFloatAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P
ropertyCallbackInfo<void>& info) |
2420 { | 2420 { |
2421 v8::Handle<v8::Object> holder = info.Holder(); | 2421 v8::Handle<v8::Object> holder = info.Holder(); |
2422 TestObject* impl = V8TestObject::toNative(holder); | 2422 TestObject* impl = V8TestObject::toNative(holder); |
2423 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()))
; | 2423 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue()))
; |
2424 impl->setStrictFloat(cppValue); | 2424 impl->setStrictFloat(cppValue); |
2425 } | 2425 } |
2426 | 2426 |
2427 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2427 static void strictFloatAttributeSetterCallback(v8::Local<v8::String>, v8::Local<
v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2428 { | 2428 { |
2429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2430 TestObjectV8Internal::strictFloatAttributeSetter(jsValue, info); | 2430 TestObjectV8Internal::strictFloatAttributeSetter(v8Value, info); |
2431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2432 } | 2432 } |
2433 | 2433 |
2434 static void replaceableAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 2434 static void replaceableAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
2435 { | 2435 { |
2436 v8::Handle<v8::Object> holder = info.Holder(); | 2436 v8::Handle<v8::Object> holder = info.Holder(); |
2437 TestObject* impl = V8TestObject::toNative(holder); | 2437 TestObject* impl = V8TestObject::toNative(holder); |
2438 v8SetReturnValueInt(info, impl->replaceableAttribute()); | 2438 v8SetReturnValueInt(info, impl->replaceableAttribute()); |
2439 } | 2439 } |
2440 | 2440 |
2441 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 2441 static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
2442 { | 2442 { |
2443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2444 TestObjectV8Internal::replaceableAttributeAttributeGetter(info); | 2444 TestObjectV8Internal::replaceableAttributeAttributeGetter(info); |
2445 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2445 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2446 } | 2446 } |
2447 | 2447 |
2448 static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2448 static void nullableDoubleAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
2449 { | 2449 { |
2450 v8::Handle<v8::Object> holder = info.Holder(); | 2450 v8::Handle<v8::Object> holder = info.Holder(); |
2451 TestObject* impl = V8TestObject::toNative(holder); | 2451 TestObject* impl = V8TestObject::toNative(holder); |
2452 bool isNull = false; | 2452 bool isNull = false; |
2453 double jsValue = impl->nullableDoubleAttribute(isNull); | 2453 double v8Value = impl->nullableDoubleAttribute(isNull); |
2454 if (isNull) { | 2454 if (isNull) { |
2455 v8SetReturnValueNull(info); | 2455 v8SetReturnValueNull(info); |
2456 return; | 2456 return; |
2457 } | 2457 } |
2458 v8SetReturnValue(info, jsValue); | 2458 v8SetReturnValue(info, v8Value); |
2459 } | 2459 } |
2460 | 2460 |
2461 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2461 static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
2462 { | 2462 { |
2463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2464 TestObjectV8Internal::nullableDoubleAttributeAttributeGetter(info); | 2464 TestObjectV8Internal::nullableDoubleAttributeAttributeGetter(info); |
2465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2466 } | 2466 } |
2467 | 2467 |
2468 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 2468 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
2469 { | 2469 { |
2470 v8::Handle<v8::Object> holder = info.Holder(); | 2470 v8::Handle<v8::Object> holder = info.Holder(); |
2471 TestObject* impl = V8TestObject::toNative(holder); | 2471 TestObject* impl = V8TestObject::toNative(holder); |
2472 bool isNull = false; | 2472 bool isNull = false; |
2473 int jsValue = impl->nullableLongAttribute(isNull); | 2473 int v8Value = impl->nullableLongAttribute(isNull); |
2474 if (isNull) { | 2474 if (isNull) { |
2475 v8SetReturnValueNull(info); | 2475 v8SetReturnValueNull(info); |
2476 return; | 2476 return; |
2477 } | 2477 } |
2478 v8SetReturnValueInt(info, jsValue); | 2478 v8SetReturnValueInt(info, v8Value); |
2479 } | 2479 } |
2480 | 2480 |
2481 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 2481 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
2482 { | 2482 { |
2483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2484 TestObjectV8Internal::nullableLongAttributeAttributeGetter(info); | 2484 TestObjectV8Internal::nullableLongAttributeAttributeGetter(info); |
2485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2486 } | 2486 } |
2487 | 2487 |
2488 static void nullableBooleanAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) | 2488 static void nullableBooleanAttributeAttributeGetter(const v8::PropertyCallbackIn
fo<v8::Value>& info) |
2489 { | 2489 { |
2490 v8::Handle<v8::Object> holder = info.Holder(); | 2490 v8::Handle<v8::Object> holder = info.Holder(); |
2491 TestObject* impl = V8TestObject::toNative(holder); | 2491 TestObject* impl = V8TestObject::toNative(holder); |
2492 bool isNull = false; | 2492 bool isNull = false; |
2493 bool jsValue = impl->nullableBooleanAttribute(isNull); | 2493 bool v8Value = impl->nullableBooleanAttribute(isNull); |
2494 if (isNull) { | 2494 if (isNull) { |
2495 v8SetReturnValueNull(info); | 2495 v8SetReturnValueNull(info); |
2496 return; | 2496 return; |
2497 } | 2497 } |
2498 v8SetReturnValueBool(info, jsValue); | 2498 v8SetReturnValueBool(info, v8Value); |
2499 } | 2499 } |
2500 | 2500 |
2501 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2501 static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String
>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2502 { | 2502 { |
2503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2504 TestObjectV8Internal::nullableBooleanAttributeAttributeGetter(info); | 2504 TestObjectV8Internal::nullableBooleanAttributeAttributeGetter(info); |
2505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2506 } | 2506 } |
2507 | 2507 |
2508 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 2508 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
2509 { | 2509 { |
2510 v8::Handle<v8::Object> holder = info.Holder(); | 2510 v8::Handle<v8::Object> holder = info.Holder(); |
2511 TestObject* impl = V8TestObject::toNative(holder); | 2511 TestObject* impl = V8TestObject::toNative(holder); |
2512 bool isNull = false; | 2512 bool isNull = false; |
2513 String jsValue = impl->nullableStringAttribute(isNull); | 2513 String v8Value = impl->nullableStringAttribute(isNull); |
2514 if (isNull) { | 2514 if (isNull) { |
2515 v8SetReturnValueNull(info); | 2515 v8SetReturnValueNull(info); |
2516 return; | 2516 return; |
2517 } | 2517 } |
2518 v8SetReturnValueString(info, jsValue, info.GetIsolate()); | 2518 v8SetReturnValueString(info, v8Value, info.GetIsolate()); |
2519 } | 2519 } |
2520 | 2520 |
2521 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 2521 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
2522 { | 2522 { |
2523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2524 TestObjectV8Internal::nullableStringAttributeAttributeGetter(info); | 2524 TestObjectV8Internal::nullableStringAttributeAttributeGetter(info); |
2525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2526 } | 2526 } |
2527 | 2527 |
2528 static void nullableLongSettableAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2528 static void nullableLongSettableAttributeAttributeGetter(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
2529 { | 2529 { |
2530 v8::Handle<v8::Object> holder = info.Holder(); | 2530 v8::Handle<v8::Object> holder = info.Holder(); |
2531 TestObject* impl = V8TestObject::toNative(holder); | 2531 TestObject* impl = V8TestObject::toNative(holder); |
2532 bool isNull = false; | 2532 bool isNull = false; |
2533 int jsValue = impl->nullableLongSettableAttribute(isNull); | 2533 int v8Value = impl->nullableLongSettableAttribute(isNull); |
2534 if (isNull) { | 2534 if (isNull) { |
2535 v8SetReturnValueNull(info); | 2535 v8SetReturnValueNull(info); |
2536 return; | 2536 return; |
2537 } | 2537 } |
2538 v8SetReturnValueInt(info, jsValue); | 2538 v8SetReturnValueInt(info, v8Value); |
2539 } | 2539 } |
2540 | 2540 |
2541 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2541 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2542 { | 2542 { |
2543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2544 TestObjectV8Internal::nullableLongSettableAttributeAttributeGetter(info); | 2544 TestObjectV8Internal::nullableLongSettableAttributeAttributeGetter(info); |
2545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2546 } | 2546 } |
2547 | 2547 |
2548 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2548 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
2549 { | 2549 { |
2550 v8::Handle<v8::Object> holder = info.Holder(); | 2550 v8::Handle<v8::Object> holder = info.Holder(); |
2551 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe
ttableAttribute", "TestObject", holder, info.GetIsolate()); | 2551 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe
ttableAttribute", "TestObject", holder, info.GetIsolate()); |
2552 TestObject* impl = V8TestObject::toNative(holder); | 2552 TestObject* impl = V8TestObject::toNative(holder); |
2553 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2553 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2554 impl->setNullableLongSettableAttribute(cppValue); | 2554 impl->setNullableLongSettableAttribute(cppValue); |
2555 } | 2555 } |
2556 | 2556 |
2557 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 2557 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
2558 { | 2558 { |
2559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2560 TestObjectV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue,
info); | 2560 TestObjectV8Internal::nullableLongSettableAttributeAttributeSetter(v8Value,
info); |
2561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2562 } | 2562 } |
2563 | 2563 |
2564 static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2564 static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2565 { | 2565 { |
2566 v8::Handle<v8::Object> holder = info.Holder(); | 2566 v8::Handle<v8::Object> holder = info.Holder(); |
2567 TestObject* impl = V8TestObject::toNative(holder); | 2567 TestObject* impl = V8TestObject::toNative(holder); |
2568 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); | 2568 RefPtr<TestObject> result(impl->perWorldReadOnlyAttribute()); |
2569 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) | 2569 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.Get
ReturnValue(), result.get())) |
2570 return; | 2570 return; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2610 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldAttribute()), impl); | 2610 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldAttribute()), impl); |
2611 } | 2611 } |
2612 | 2612 |
2613 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) | 2613 static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String>, cons
t v8::PropertyCallbackInfo<v8::Value>& info) |
2614 { | 2614 { |
2615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2616 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); | 2616 TestObjectV8Internal::perWorldAttributeAttributeGetter(info); |
2617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2618 } | 2618 } |
2619 | 2619 |
2620 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 2620 static void perWorldAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
2621 { | 2621 { |
2622 v8::Handle<v8::Object> holder = info.Holder(); | 2622 v8::Handle<v8::Object> holder = info.Holder(); |
2623 TestObject* impl = V8TestObject::toNative(holder); | 2623 TestObject* impl = V8TestObject::toNative(holder); |
2624 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 2624 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
2625 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); | 2625 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
2626 } | 2626 } |
2627 | 2627 |
2628 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2628 static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2629 { | 2629 { |
2630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2631 TestObjectV8Internal::perWorldAttributeAttributeSetter(jsValue, info); | 2631 TestObjectV8Internal::perWorldAttributeAttributeSetter(v8Value, info); |
2632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2633 } | 2633 } |
2634 | 2634 |
2635 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) | 2635 static void perWorldAttributeAttributeGetterForMainWorld(const v8::PropertyCallb
ackInfo<v8::Value>& info) |
2636 { | 2636 { |
2637 v8::Handle<v8::Object> holder = info.Holder(); | 2637 v8::Handle<v8::Object> holder = info.Holder(); |
2638 TestObject* impl = V8TestObject::toNative(holder); | 2638 TestObject* impl = V8TestObject::toNative(holder); |
2639 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldAttribute())); | 2639 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldAttribute())); |
2640 } | 2640 } |
2641 | 2641 |
2642 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2642 static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::S
tring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2643 { | 2643 { |
2644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2645 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); | 2645 TestObjectV8Internal::perWorldAttributeAttributeGetterForMainWorld(info); |
2646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2647 } | 2647 } |
2648 | 2648 |
2649 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> js
Value, const v8::PropertyCallbackInfo<void>& info) | 2649 static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8
Value, const v8::PropertyCallbackInfo<void>& info) |
2650 { | 2650 { |
2651 v8::Handle<v8::Object> holder = info.Holder(); | 2651 v8::Handle<v8::Object> holder = info.Holder(); |
2652 TestObject* impl = V8TestObject::toNative(holder); | 2652 TestObject* impl = V8TestObject::toNative(holder); |
2653 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), jsValue)); | 2653 V8TRYCATCH_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(i
nfo.GetIsolate(), v8Value)); |
2654 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); | 2654 impl->setPerWorldAttribute(WTF::getPtr(cppValue)); |
2655 } | 2655 } |
2656 | 2656 |
2657 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
) | 2657 static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::S
tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info
) |
2658 { | 2658 { |
2659 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2659 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2660 TestObjectV8Internal::perWorldAttributeAttributeSetterForMainWorld(jsValue,
info); | 2660 TestObjectV8Internal::perWorldAttributeAttributeSetterForMainWorld(v8Value,
info); |
2661 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2661 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2662 } | 2662 } |
2663 | 2663 |
2664 static void activityLoggedAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 2664 static void activityLoggedAttr1AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
2665 { | 2665 { |
2666 v8::Handle<v8::Object> holder = info.Holder(); | 2666 v8::Handle<v8::Object> holder = info.Holder(); |
2667 TestObject* impl = V8TestObject::toNative(holder); | 2667 TestObject* impl = V8TestObject::toNative(holder); |
2668 v8SetReturnValueInt(info, impl->activityLoggedAttr1()); | 2668 v8SetReturnValueInt(info, impl->activityLoggedAttr1()); |
2669 } | 2669 } |
2670 | 2670 |
2671 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2671 static void activityLoggedAttr1AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
2672 { | 2672 { |
2673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2674 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2674 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2675 if (contextData && contextData->activityLogger()) | 2675 if (contextData && contextData->activityLogger()) |
2676 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); | 2676 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0,
0, "Getter"); |
2677 TestObjectV8Internal::activityLoggedAttr1AttributeGetter(info); | 2677 TestObjectV8Internal::activityLoggedAttr1AttributeGetter(info); |
2678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2679 } | 2679 } |
2680 | 2680 |
2681 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 2681 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
2682 { | 2682 { |
2683 v8::Handle<v8::Object> holder = info.Holder(); | 2683 v8::Handle<v8::Object> holder = info.Holder(); |
2684 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr1", "TestObject", holder, info.GetIsolate()); | 2684 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr1", "TestObject", holder, info.GetIsolate()); |
2685 TestObject* impl = V8TestObject::toNative(holder); | 2685 TestObject* impl = V8TestObject::toNative(holder); |
2686 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2686 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2687 impl->setActivityLoggedAttr1(cppValue); | 2687 impl->setActivityLoggedAttr1(cppValue); |
2688 } | 2688 } |
2689 | 2689 |
2690 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2690 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2691 { | 2691 { |
2692 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2692 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2693 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2693 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2694 if (contextData && contextData->activityLogger()) { | 2694 if (contextData && contextData->activityLogger()) { |
2695 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2695 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2696 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); | 2696 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1,
&loggerArg[0], "Setter"); |
2697 } | 2697 } |
2698 TestObjectV8Internal::activityLoggedAttr1AttributeSetter(jsValue, info); | 2698 TestObjectV8Internal::activityLoggedAttr1AttributeSetter(v8Value, info); |
2699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2700 } | 2700 } |
2701 | 2701 |
2702 static void activityLoggedAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) | 2702 static void activityLoggedAttr2AttributeGetter(const v8::PropertyCallbackInfo<v8
::Value>& info) |
2703 { | 2703 { |
2704 v8::Handle<v8::Object> holder = info.Holder(); | 2704 v8::Handle<v8::Object> holder = info.Holder(); |
2705 TestObject* impl = V8TestObject::toNative(holder); | 2705 TestObject* impl = V8TestObject::toNative(holder); |
2706 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); | 2706 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
2707 } | 2707 } |
2708 | 2708 |
2709 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 2709 static void activityLoggedAttr2AttributeGetterCallback(v8::Local<v8::String>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
2710 { | 2710 { |
2711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2712 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2712 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2713 if (contextData && contextData->activityLogger()) | 2713 if (contextData && contextData->activityLogger()) |
2714 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2714 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
2715 TestObjectV8Internal::activityLoggedAttr2AttributeGetter(info); | 2715 TestObjectV8Internal::activityLoggedAttr2AttributeGetter(info); |
2716 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2716 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2717 } | 2717 } |
2718 | 2718 |
2719 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con
st v8::PropertyCallbackInfo<void>& info) | 2719 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> v8Value, con
st v8::PropertyCallbackInfo<void>& info) |
2720 { | 2720 { |
2721 v8::Handle<v8::Object> holder = info.Holder(); | 2721 v8::Handle<v8::Object> holder = info.Holder(); |
2722 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, info.GetIsolate()); | 2722 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, info.GetIsolate()); |
2723 TestObject* impl = V8TestObject::toNative(holder); | 2723 TestObject* impl = V8TestObject::toNative(holder); |
2724 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2724 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2725 impl->setActivityLoggedAttr2(cppValue); | 2725 impl->setActivityLoggedAttr2(cppValue); |
2726 } | 2726 } |
2727 | 2727 |
2728 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2728 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2729 { | 2729 { |
2730 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2730 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2731 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2731 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2732 if (contextData && contextData->activityLogger()) { | 2732 if (contextData && contextData->activityLogger()) { |
2733 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2733 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2734 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2734 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
2735 } | 2735 } |
2736 TestObjectV8Internal::activityLoggedAttr2AttributeSetter(jsValue, info); | 2736 TestObjectV8Internal::activityLoggedAttr2AttributeSetter(v8Value, info); |
2737 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2737 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2738 } | 2738 } |
2739 | 2739 |
2740 static void activityLoggedAttr2AttributeGetterForMainWorld(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 2740 static void activityLoggedAttr2AttributeGetterForMainWorld(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
2741 { | 2741 { |
2742 v8::Handle<v8::Object> holder = info.Holder(); | 2742 v8::Handle<v8::Object> holder = info.Holder(); |
2743 TestObject* impl = V8TestObject::toNative(holder); | 2743 TestObject* impl = V8TestObject::toNative(holder); |
2744 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); | 2744 v8SetReturnValueInt(info, impl->activityLoggedAttr2()); |
2745 } | 2745 } |
2746 | 2746 |
2747 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2747 static void activityLoggedAttr2AttributeGetterCallbackForMainWorld(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2748 { | 2748 { |
2749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2750 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2750 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2751 if (contextData && contextData->activityLogger()) | 2751 if (contextData && contextData->activityLogger()) |
2752 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); | 2752 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0,
0, "Getter"); |
2753 TestObjectV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); | 2753 TestObjectV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); |
2754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2755 } | 2755 } |
2756 | 2756 |
2757 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) | 2757 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) |
2758 { | 2758 { |
2759 v8::Handle<v8::Object> holder = info.Holder(); | 2759 v8::Handle<v8::Object> holder = info.Holder(); |
2760 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, info.GetIsolate()); | 2760 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
Attr2", "TestObject", holder, info.GetIsolate()); |
2761 TestObject* impl = V8TestObject::toNative(holder); | 2761 TestObject* impl = V8TestObject::toNative(holder); |
2762 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2762 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2763 impl->setActivityLoggedAttr2(cppValue); | 2763 impl->setActivityLoggedAttr2(cppValue); |
2764 } | 2764 } |
2765 | 2765 |
2766 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) | 2766 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
2767 { | 2767 { |
2768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2769 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2769 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2770 if (contextData && contextData->activityLogger()) { | 2770 if (contextData && contextData->activityLogger()) { |
2771 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2771 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2772 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); | 2772 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1,
&loggerArg[0], "Setter"); |
2773 } | 2773 } |
2774 TestObjectV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(jsValue
, info); | 2774 TestObjectV8Internal::activityLoggedAttr2AttributeSetterForMainWorld(v8Value
, info); |
2775 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2775 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2776 } | 2776 } |
2777 | 2777 |
2778 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) | 2778 static void activityLoggedInIsolatedWorldsAttrAttributeGetter(const v8::Property
CallbackInfo<v8::Value>& info) |
2779 { | 2779 { |
2780 v8::Handle<v8::Object> holder = info.Holder(); | 2780 v8::Handle<v8::Object> holder = info.Holder(); |
2781 TestObject* impl = V8TestObject::toNative(holder); | 2781 TestObject* impl = V8TestObject::toNative(holder); |
2782 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); | 2782 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
2783 } | 2783 } |
2784 | 2784 |
2785 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2785 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallback(v8::Local<
v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2786 { | 2786 { |
2787 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2787 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2788 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2788 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2789 if (contextData && contextData->activityLogger()) | 2789 if (contextData && contextData->activityLogger()) |
2790 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); | 2790 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 0, 0, "Getter"); |
2791 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info
); | 2791 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info
); |
2792 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2792 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2793 } | 2793 } |
2794 | 2794 |
2795 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu
e> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2795 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu
e> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2796 { | 2796 { |
2797 v8::Handle<v8::Object> holder = info.Holder(); | 2797 v8::Handle<v8::Object> holder = info.Holder(); |
2798 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, info.GetIsolate()); | 2798 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, info.GetIsolate()); |
2799 TestObject* impl = V8TestObject::toNative(holder); | 2799 TestObject* impl = V8TestObject::toNative(holder); |
2800 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2800 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2801 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); | 2801 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
2802 } | 2802 } |
2803 | 2803 |
2804 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 2804 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local<
v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) |
2805 { | 2805 { |
2806 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2806 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2807 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2807 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2808 if (contextData && contextData->activityLogger()) { | 2808 if (contextData && contextData->activityLogger()) { |
2809 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2809 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2810 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); | 2810 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttr", 1, &loggerArg[0], "Setter"); |
2811 } | 2811 } |
2812 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(jsVa
lue, info); | 2812 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetter(v8Va
lue, info); |
2813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2814 } | 2814 } |
2815 | 2815 |
2816 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(const
v8::PropertyCallbackInfo<v8::Value>& info) | 2816 static void activityLoggedInIsolatedWorldsAttrAttributeGetterForMainWorld(const
v8::PropertyCallbackInfo<v8::Value>& info) |
2817 { | 2817 { |
2818 v8::Handle<v8::Object> holder = info.Holder(); | 2818 v8::Handle<v8::Object> holder = info.Holder(); |
2819 TestObject* impl = V8TestObject::toNative(holder); | 2819 TestObject* impl = V8TestObject::toNative(holder); |
2820 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); | 2820 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttr()); |
2821 } | 2821 } |
2822 | 2822 |
2823 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2823 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl
d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2824 { | 2824 { |
2825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2826 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMa
inWorld(info); | 2826 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMa
inWorld(info); |
2827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2828 } | 2828 } |
2829 | 2829 |
2830 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2830 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2831 { | 2831 { |
2832 v8::Handle<v8::Object> holder = info.Holder(); | 2832 v8::Handle<v8::Object> holder = info.Holder(); |
2833 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, info.GetIsolate()); | 2833 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttr", "TestObject", holder, info.GetIsolate()); |
2834 TestObject* impl = V8TestObject::toNative(holder); | 2834 TestObject* impl = V8TestObject::toNative(holder); |
2835 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2835 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2836 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); | 2836 impl->setActivityLoggedInIsolatedWorldsAttr(cppValue); |
2837 } | 2837 } |
2838 | 2838 |
2839 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac
kInfo<void>& info) | 2839 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl
d(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac
kInfo<void>& info) |
2840 { | 2840 { |
2841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2842 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMa
inWorld(jsValue, info); | 2842 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMa
inWorld(v8Value, info); |
2843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2844 } | 2844 } |
2845 | 2845 |
2846 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2846 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2847 { | 2847 { |
2848 v8::Handle<v8::Object> holder = info.Holder(); | 2848 v8::Handle<v8::Object> holder = info.Holder(); |
2849 TestObject* impl = V8TestObject::toNative(holder); | 2849 TestObject* impl = V8TestObject::toNative(holder); |
2850 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter1()); | 2850 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter1()); |
2851 } | 2851 } |
2852 | 2852 |
2853 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2853 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2854 { | 2854 { |
2855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2856 TestObjectV8Internal::activityLoggedAttrSetter1AttributeGetter(info); | 2856 TestObjectV8Internal::activityLoggedAttrSetter1AttributeGetter(info); |
2857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2858 } | 2858 } |
2859 | 2859 |
2860 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2860 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
2861 { | 2861 { |
2862 v8::Handle<v8::Object> holder = info.Holder(); | 2862 v8::Handle<v8::Object> holder = info.Holder(); |
2863 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter1", "TestObject", holder, info.GetIsolate()); | 2863 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter1", "TestObject", holder, info.GetIsolate()); |
2864 TestObject* impl = V8TestObject::toNative(holder); | 2864 TestObject* impl = V8TestObject::toNative(holder); |
2865 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2865 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2866 impl->setActivityLoggedAttrSetter1(cppValue); | 2866 impl->setActivityLoggedAttrSetter1(cppValue); |
2867 } | 2867 } |
2868 | 2868 |
2869 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2869 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2870 { | 2870 { |
2871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2872 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2872 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2873 if (contextData && contextData->activityLogger()) { | 2873 if (contextData && contextData->activityLogger()) { |
2874 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2874 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2875 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); | 2875 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1
", 1, &loggerArg[0], "Setter"); |
2876 } | 2876 } |
2877 TestObjectV8Internal::activityLoggedAttrSetter1AttributeSetter(jsValue, info
); | 2877 TestObjectV8Internal::activityLoggedAttrSetter1AttributeSetter(v8Value, info
); |
2878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2879 } | 2879 } |
2880 | 2880 |
2881 static void activityLoggedAttrSetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 2881 static void activityLoggedAttrSetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
2882 { | 2882 { |
2883 v8::Handle<v8::Object> holder = info.Holder(); | 2883 v8::Handle<v8::Object> holder = info.Holder(); |
2884 TestObject* impl = V8TestObject::toNative(holder); | 2884 TestObject* impl = V8TestObject::toNative(holder); |
2885 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); | 2885 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
2886 } | 2886 } |
2887 | 2887 |
2888 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2888 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2889 { | 2889 { |
2890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2891 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter(info); | 2891 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetter(info); |
2892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2893 } | 2893 } |
2894 | 2894 |
2895 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 2895 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
2896 { | 2896 { |
2897 v8::Handle<v8::Object> holder = info.Holder(); | 2897 v8::Handle<v8::Object> holder = info.Holder(); |
2898 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, info.GetIsolate()); | 2898 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, info.GetIsolate()); |
2899 TestObject* impl = V8TestObject::toNative(holder); | 2899 TestObject* impl = V8TestObject::toNative(holder); |
2900 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2900 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2901 impl->setActivityLoggedAttrSetter2(cppValue); | 2901 impl->setActivityLoggedAttrSetter2(cppValue); |
2902 } | 2902 } |
2903 | 2903 |
2904 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2904 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2905 { | 2905 { |
2906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2906 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2907 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2907 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2908 if (contextData && contextData->activityLogger()) { | 2908 if (contextData && contextData->activityLogger()) { |
2909 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2909 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2910 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2910 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
2911 } | 2911 } |
2912 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetter(jsValue, info
); | 2912 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetter(v8Value, info
); |
2913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2914 } | 2914 } |
2915 | 2915 |
2916 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 2916 static void activityLoggedAttrSetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
2917 { | 2917 { |
2918 v8::Handle<v8::Object> holder = info.Holder(); | 2918 v8::Handle<v8::Object> holder = info.Holder(); |
2919 TestObject* impl = V8TestObject::toNative(holder); | 2919 TestObject* impl = V8TestObject::toNative(holder); |
2920 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); | 2920 v8SetReturnValueInt(info, impl->activityLoggedAttrSetter2()); |
2921 } | 2921 } |
2922 | 2922 |
2923 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2923 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2924 { | 2924 { |
2925 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2925 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2926 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(i
nfo); | 2926 TestObjectV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(i
nfo); |
2927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2928 } | 2928 } |
2929 | 2929 |
2930 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2930 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2931 { | 2931 { |
2932 v8::Handle<v8::Object> holder = info.Holder(); | 2932 v8::Handle<v8::Object> holder = info.Holder(); |
2933 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, info.GetIsolate()); | 2933 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrSetter2", "TestObject", holder, info.GetIsolate()); |
2934 TestObject* impl = V8TestObject::toNative(holder); | 2934 TestObject* impl = V8TestObject::toNative(holder); |
2935 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2935 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2936 impl->setActivityLoggedAttrSetter2(cppValue); | 2936 impl->setActivityLoggedAttrSetter2(cppValue); |
2937 } | 2937 } |
2938 | 2938 |
2939 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 2939 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
2940 { | 2940 { |
2941 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2941 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2942 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2942 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2943 if (contextData && contextData->activityLogger()) { | 2943 if (contextData && contextData->activityLogger()) { |
2944 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2944 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2945 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); | 2945 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2
", 1, &loggerArg[0], "Setter"); |
2946 } | 2946 } |
2947 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(j
sValue, info); | 2947 TestObjectV8Internal::activityLoggedAttrSetter2AttributeSetterForMainWorld(v
8Value, info); |
2948 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2948 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2949 } | 2949 } |
2950 | 2950 |
2951 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 2951 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
2952 { | 2952 { |
2953 v8::Handle<v8::Object> holder = info.Holder(); | 2953 v8::Handle<v8::Object> holder = info.Holder(); |
2954 TestObject* impl = V8TestObject::toNative(holder); | 2954 TestObject* impl = V8TestObject::toNative(holder); |
2955 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); | 2955 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
2956 } | 2956 } |
2957 | 2957 |
2958 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2958 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2959 { | 2959 { |
2960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2961 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
r(info); | 2961 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
r(info); |
2962 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2962 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2963 } | 2963 } |
2964 | 2964 |
2965 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 2965 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
2966 { | 2966 { |
2967 v8::Handle<v8::Object> holder = info.Holder(); | 2967 v8::Handle<v8::Object> holder = info.Holder(); |
2968 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, info.GetIsolate()); | 2968 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, info.GetIsolate()); |
2969 TestObject* impl = V8TestObject::toNative(holder); | 2969 TestObject* impl = V8TestObject::toNative(holder); |
2970 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 2970 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
2971 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); | 2971 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
2972 } | 2972 } |
2973 | 2973 |
2974 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 2974 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
2975 { | 2975 { |
2976 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 2976 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
2977 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 2977 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
2978 if (contextData && contextData->activityLogger()) { | 2978 if (contextData && contextData->activityLogger()) { |
2979 v8::Handle<v8::Value> loggerArg[] = { jsValue }; | 2979 v8::Handle<v8::Value> loggerArg[] = { v8Value }; |
2980 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); | 2980 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrSetter", 1, &loggerArg[0], "Setter"); |
2981 } | 2981 } |
2982 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
r(jsValue, info); | 2982 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
r(v8Value, info); |
2983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2984 } | 2984 } |
2985 | 2985 |
2986 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) | 2986 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
2987 { | 2987 { |
2988 v8::Handle<v8::Object> holder = info.Holder(); | 2988 v8::Handle<v8::Object> holder = info.Holder(); |
2989 TestObject* impl = V8TestObject::toNative(holder); | 2989 TestObject* impl = V8TestObject::toNative(holder); |
2990 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); | 2990 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrSetter()); |
2991 } | 2991 } |
2992 | 2992 |
2993 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 2993 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
2994 { | 2994 { |
2995 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 2995 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
2996 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
rForMainWorld(info); | 2996 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGette
rForMainWorld(info); |
2997 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 2997 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
2998 } | 2998 } |
2999 | 2999 |
3000 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3000 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld(
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3001 { | 3001 { |
3002 v8::Handle<v8::Object> holder = info.Holder(); | 3002 v8::Handle<v8::Object> holder = info.Holder(); |
3003 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, info.GetIsolate()); | 3003 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrSetter", "TestObject", holder, info.GetIsolate()); |
3004 TestObject* impl = V8TestObject::toNative(holder); | 3004 TestObject* impl = V8TestObject::toNative(holder); |
3005 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3005 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3006 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); | 3006 impl->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); |
3007 } | 3007 } |
3008 | 3008 |
3009 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) | 3009 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyC
allbackInfo<void>& info) |
3010 { | 3010 { |
3011 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3011 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3012 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
rForMainWorld(jsValue, info); | 3012 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSette
rForMainWorld(v8Value, info); |
3013 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3013 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3014 } | 3014 } |
3015 | 3015 |
3016 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 3016 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
3017 { | 3017 { |
3018 v8::Handle<v8::Object> holder = info.Holder(); | 3018 v8::Handle<v8::Object> holder = info.Holder(); |
3019 TestObject* impl = V8TestObject::toNative(holder); | 3019 TestObject* impl = V8TestObject::toNative(holder); |
3020 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter1()); | 3020 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter1()); |
3021 } | 3021 } |
3022 | 3022 |
3023 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3023 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3024 { | 3024 { |
3025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3026 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3026 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
3027 if (contextData && contextData->activityLogger()) | 3027 if (contextData && contextData->activityLogger()) |
3028 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); | 3028 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1
", 0, 0, "Getter"); |
3029 TestObjectV8Internal::activityLoggedAttrGetter1AttributeGetter(info); | 3029 TestObjectV8Internal::activityLoggedAttrGetter1AttributeGetter(info); |
3030 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3030 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3031 } | 3031 } |
3032 | 3032 |
3033 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 3033 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
3034 { | 3034 { |
3035 v8::Handle<v8::Object> holder = info.Holder(); | 3035 v8::Handle<v8::Object> holder = info.Holder(); |
3036 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter1", "TestObject", holder, info.GetIsolate()); | 3036 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter1", "TestObject", holder, info.GetIsolate()); |
3037 TestObject* impl = V8TestObject::toNative(holder); | 3037 TestObject* impl = V8TestObject::toNative(holder); |
3038 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3038 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3039 impl->setActivityLoggedAttrGetter1(cppValue); | 3039 impl->setActivityLoggedAttrGetter1(cppValue); |
3040 } | 3040 } |
3041 | 3041 |
3042 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3042 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3043 { | 3043 { |
3044 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3044 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3045 TestObjectV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info
); | 3045 TestObjectV8Internal::activityLoggedAttrGetter1AttributeSetter(v8Value, info
); |
3046 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3046 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3047 } | 3047 } |
3048 | 3048 |
3049 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 3049 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
3050 { | 3050 { |
3051 v8::Handle<v8::Object> holder = info.Holder(); | 3051 v8::Handle<v8::Object> holder = info.Holder(); |
3052 TestObject* impl = V8TestObject::toNative(holder); | 3052 TestObject* impl = V8TestObject::toNative(holder); |
3053 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); | 3053 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
3054 } | 3054 } |
3055 | 3055 |
3056 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3056 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3057 { | 3057 { |
3058 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3058 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3059 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3059 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
3060 if (contextData && contextData->activityLogger()) | 3060 if (contextData && contextData->activityLogger()) |
3061 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 3061 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
3062 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter(info); | 3062 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetter(info); |
3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3064 } | 3064 } |
3065 | 3065 |
3066 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 3066 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) |
3067 { | 3067 { |
3068 v8::Handle<v8::Object> holder = info.Holder(); | 3068 v8::Handle<v8::Object> holder = info.Holder(); |
3069 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, info.GetIsolate()); | 3069 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, info.GetIsolate()); |
3070 TestObject* impl = V8TestObject::toNative(holder); | 3070 TestObject* impl = V8TestObject::toNative(holder); |
3071 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3071 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3072 impl->setActivityLoggedAttrGetter2(cppValue); | 3072 impl->setActivityLoggedAttrGetter2(cppValue); |
3073 } | 3073 } |
3074 | 3074 |
3075 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3075 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3076 { | 3076 { |
3077 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3077 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3078 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info
); | 3078 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetter(v8Value, info
); |
3079 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3079 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3080 } | 3080 } |
3081 | 3081 |
3082 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 3082 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
3083 { | 3083 { |
3084 v8::Handle<v8::Object> holder = info.Holder(); | 3084 v8::Handle<v8::Object> holder = info.Holder(); |
3085 TestObject* impl = V8TestObject::toNative(holder); | 3085 TestObject* impl = V8TestObject::toNative(holder); |
3086 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); | 3086 v8SetReturnValueInt(info, impl->activityLoggedAttrGetter2()); |
3087 } | 3087 } |
3088 | 3088 |
3089 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3089 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3090 { | 3090 { |
3091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3092 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3092 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
3093 if (contextData && contextData->activityLogger()) | 3093 if (contextData && contextData->activityLogger()) |
3094 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); | 3094 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2
", 0, 0, "Getter"); |
3095 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(i
nfo); | 3095 TestObjectV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(i
nfo); |
3096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3097 } | 3097 } |
3098 | 3098 |
3099 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3099 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V
alue> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3100 { | 3100 { |
3101 v8::Handle<v8::Object> holder = info.Holder(); | 3101 v8::Handle<v8::Object> holder = info.Holder(); |
3102 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, info.GetIsolate()); | 3102 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
AttrGetter2", "TestObject", holder, info.GetIsolate()); |
3103 TestObject* impl = V8TestObject::toNative(holder); | 3103 TestObject* impl = V8TestObject::toNative(holder); |
3104 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3104 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3105 impl->setActivityLoggedAttrGetter2(cppValue); | 3105 impl->setActivityLoggedAttrGetter2(cppValue); |
3106 } | 3106 } |
3107 | 3107 |
3108 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) | 3108 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc
al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi
d>& info) |
3109 { | 3109 { |
3110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3111 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(j
sValue, info); | 3111 TestObjectV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(v
8Value, info); |
3112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3112 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3113 } | 3113 } |
3114 | 3114 |
3115 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 3115 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
3116 { | 3116 { |
3117 v8::Handle<v8::Object> holder = info.Holder(); | 3117 v8::Handle<v8::Object> holder = info.Holder(); |
3118 TestObject* impl = V8TestObject::toNative(holder); | 3118 TestObject* impl = V8TestObject::toNative(holder); |
3119 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); | 3119 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
3120 } | 3120 } |
3121 | 3121 |
3122 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3122 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8::
Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3123 { | 3123 { |
3124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3125 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); | 3125 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge
tCurrentContext()); |
3126 if (contextData && contextData->activityLogger()) | 3126 if (contextData && contextData->activityLogger()) |
3127 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); | 3127 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW
orldsAttrGetter", 0, 0, "Getter"); |
3128 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
r(info); | 3128 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
r(info); |
3129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3130 } | 3130 } |
3131 | 3131 |
3132 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3132 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8
::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3133 { | 3133 { |
3134 v8::Handle<v8::Object> holder = info.Holder(); | 3134 v8::Handle<v8::Object> holder = info.Holder(); |
3135 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, info.GetIsolate()); | 3135 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, info.GetIsolate()); |
3136 TestObject* impl = V8TestObject::toNative(holder); | 3136 TestObject* impl = V8TestObject::toNative(holder); |
3137 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3137 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3138 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); | 3138 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
3139 } | 3139 } |
3140 | 3140 |
3141 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<
void>& info) | 3141 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8::
Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<
void>& info) |
3142 { | 3142 { |
3143 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3143 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3144 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
r(jsValue, info); | 3144 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
r(v8Value, info); |
3145 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3145 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3146 } | 3146 } |
3147 | 3147 |
3148 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) | 3148 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld(
const v8::PropertyCallbackInfo<v8::Value>& info) |
3149 { | 3149 { |
3150 v8::Handle<v8::Object> holder = info.Holder(); | 3150 v8::Handle<v8::Object> holder = info.Holder(); |
3151 TestObject* impl = V8TestObject::toNative(holder); | 3151 TestObject* impl = V8TestObject::toNative(holder); |
3152 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); | 3152 v8SetReturnValueInt(info, impl->activityLoggedInIsolatedWorldsAttrGetter()); |
3153 } | 3153 } |
3154 | 3154 |
3155 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3155 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa
inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3156 { | 3156 { |
3157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3158 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
rForMainWorld(info); | 3158 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGette
rForMainWorld(info); |
3159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3160 } | 3160 } |
3161 | 3161 |
3162 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3162 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld(
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3163 { | 3163 { |
3164 v8::Handle<v8::Object> holder = info.Holder(); | 3164 v8::Handle<v8::Object> holder = info.Holder(); |
3165 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, info.GetIsolate()); | 3165 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged
InIsolatedWorldsAttrGetter", "TestObject", holder, info.GetIsolate()); |
3166 TestObject* impl = V8TestObject::toNative(holder); | 3166 TestObject* impl = V8TestObject::toNative(holder); |
3167 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3167 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3168 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); | 3168 impl->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); |
3169 } | 3169 } |
3170 | 3170 |
3171 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC
allbackInfo<void>& info) | 3171 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa
inWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyC
allbackInfo<void>& info) |
3172 { | 3172 { |
3173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3174 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
rForMainWorld(jsValue, info); | 3174 TestObjectV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSette
rForMainWorld(v8Value, info); |
3175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3176 } | 3176 } |
3177 | 3177 |
3178 static void deprecatedStaticReadOnlyAttrAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) | 3178 static void deprecatedStaticReadOnlyAttrAttributeGetter(const v8::PropertyCallba
ckInfo<v8::Value>& info) |
3179 { | 3179 { |
3180 v8SetReturnValueInt(info, TestObject::deprecatedStaticReadOnlyAttr()); | 3180 v8SetReturnValueInt(info, TestObject::deprecatedStaticReadOnlyAttr()); |
3181 } | 3181 } |
3182 | 3182 |
3183 static void deprecatedStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) | 3183 static void deprecatedStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8::St
ring>, const v8::PropertyCallbackInfo<v8::Value>& info) |
3184 { | 3184 { |
3185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3186 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticReadonlyAttribute); | 3186 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticReadonlyAttribute); |
3187 TestObjectV8Internal::deprecatedStaticReadOnlyAttrAttributeGetter(info); | 3187 TestObjectV8Internal::deprecatedStaticReadOnlyAttrAttributeGetter(info); |
3188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3189 } | 3189 } |
3190 | 3190 |
3191 static void deprecatedStaticAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 3191 static void deprecatedStaticAttrAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
3192 { | 3192 { |
3193 v8SetReturnValueInt(info, TestObject::deprecatedStaticAttr()); | 3193 v8SetReturnValueInt(info, TestObject::deprecatedStaticAttr()); |
3194 } | 3194 } |
3195 | 3195 |
3196 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 3196 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
3197 { | 3197 { |
3198 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3198 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3199 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); | 3199 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); |
3200 TestObjectV8Internal::deprecatedStaticAttrAttributeGetter(info); | 3200 TestObjectV8Internal::deprecatedStaticAttrAttributeGetter(info); |
3201 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3201 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3202 } | 3202 } |
3203 | 3203 |
3204 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 3204 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
3205 { | 3205 { |
3206 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat
icAttr", "TestObject", holder, info.GetIsolate()); | 3206 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat
icAttr", "TestObject", holder, info.GetIsolate()); |
3207 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3207 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3208 TestObject::setDeprecatedStaticAttr(cppValue); | 3208 TestObject::setDeprecatedStaticAttr(cppValue); |
3209 } | 3209 } |
3210 | 3210 |
3211 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3211 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3212 { | 3212 { |
3213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3214 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); | 3214 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::StaticAttribute); |
3215 TestObjectV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); | 3215 TestObjectV8Internal::deprecatedStaticAttrAttributeSetter(v8Value, info); |
3216 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3216 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3217 } | 3217 } |
3218 | 3218 |
3219 static void deprecatedReadonlyAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 3219 static void deprecatedReadonlyAttrAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
3220 { | 3220 { |
3221 v8::Handle<v8::Object> holder = info.Holder(); | 3221 v8::Handle<v8::Object> holder = info.Holder(); |
3222 TestObject* impl = V8TestObject::toNative(holder); | 3222 TestObject* impl = V8TestObject::toNative(holder); |
3223 v8SetReturnValueInt(info, impl->deprecatedReadonlyAttr()); | 3223 v8SetReturnValueInt(info, impl->deprecatedReadonlyAttr()); |
3224 } | 3224 } |
3225 | 3225 |
(...skipping 13 matching lines...) Expand all Loading... |
3239 } | 3239 } |
3240 | 3240 |
3241 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 3241 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
3242 { | 3242 { |
3243 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3243 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3244 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); | 3244 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
3245 TestObjectV8Internal::deprecatedAttrAttributeGetter(info); | 3245 TestObjectV8Internal::deprecatedAttrAttributeGetter(info); |
3246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3247 } | 3247 } |
3248 | 3248 |
3249 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 3249 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
3250 { | 3250 { |
3251 v8::Handle<v8::Object> holder = info.Holder(); | 3251 v8::Handle<v8::Object> holder = info.Holder(); |
3252 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr
", "TestObject", holder, info.GetIsolate()); | 3252 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr
", "TestObject", holder, info.GetIsolate()); |
3253 TestObject* impl = V8TestObject::toNative(holder); | 3253 TestObject* impl = V8TestObject::toNative(holder); |
3254 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e
xceptionState); | 3254 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e
xceptionState); |
3255 impl->setDeprecatedAttr(cppValue); | 3255 impl->setDeprecatedAttr(cppValue); |
3256 } | 3256 } |
3257 | 3257 |
3258 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3258 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3259 { | 3259 { |
3260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3261 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); | 3261 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::Attribute); |
3262 TestObjectV8Internal::deprecatedAttrAttributeSetter(jsValue, info); | 3262 TestObjectV8Internal::deprecatedAttrAttributeSetter(v8Value, info); |
3263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3264 } | 3264 } |
3265 | 3265 |
3266 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) | 3266 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i
nfo) |
3267 { | 3267 { |
3268 v8::Handle<v8::Object> holder = info.Holder(); | 3268 v8::Handle<v8::Object> holder = info.Holder(); |
3269 TestObject* impl = V8TestObject::toNative(holder); | 3269 TestObject* impl = V8TestObject::toNative(holder); |
3270 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); | 3270 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); |
3271 } | 3271 } |
3272 | 3272 |
3273 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 3273 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
3274 { | 3274 { |
3275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3276 TestObjectV8Internal::locationAttributeGetter(info); | 3276 TestObjectV8Internal::locationAttributeGetter(info); |
3277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3278 } | 3278 } |
3279 | 3279 |
3280 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop
ertyCallbackInfo<void>& info) | 3280 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop
ertyCallbackInfo<void>& info) |
3281 { | 3281 { |
3282 v8::Handle<v8::Object> holder = info.Holder(); | 3282 v8::Handle<v8::Object> holder = info.Holder(); |
3283 TestObject* proxyImpl = V8TestObject::toNative(holder); | 3283 TestObject* proxyImpl = V8TestObject::toNative(holder); |
3284 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); | 3284 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location()); |
3285 if (!impl) | 3285 if (!impl) |
3286 return; | 3286 return; |
3287 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3287 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
3288 impl->setHref(cppValue); | 3288 impl->setHref(cppValue); |
3289 } | 3289 } |
3290 | 3290 |
3291 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3291 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3292 { | 3292 { |
3293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3294 TestObjectV8Internal::locationAttributeSetter(jsValue, info); | 3294 TestObjectV8Internal::locationAttributeSetter(v8Value, info); |
3295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3296 } | 3296 } |
3297 | 3297 |
3298 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 3298 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
3299 { | 3299 { |
3300 v8::Handle<v8::Object> holder = info.Holder(); | 3300 v8::Handle<v8::Object> holder = info.Holder(); |
3301 TestObject* impl = V8TestObject::toNative(holder); | 3301 TestObject* impl = V8TestObject::toNative(holder); |
3302 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; | 3302 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl)
; |
3303 } | 3303 } |
3304 | 3304 |
3305 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 3305 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
3306 { | 3306 { |
3307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3308 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); | 3308 TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
3309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3310 } | 3310 } |
3311 | 3311 |
3312 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 3312 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
3313 { | 3313 { |
3314 v8::Handle<v8::Object> holder = info.Holder(); | 3314 v8::Handle<v8::Object> holder = info.Holder(); |
3315 TestObject* proxyImpl = V8TestObject::toNative(holder); | 3315 TestObject* proxyImpl = V8TestObject::toNative(holder); |
3316 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); | 3316 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException()); |
3317 if (!impl) | 3317 if (!impl) |
3318 return; | 3318 return; |
3319 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 3319 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value); |
3320 impl->setHrefThrows(cppValue); | 3320 impl->setHrefThrows(cppValue); |
3321 } | 3321 } |
3322 | 3322 |
3323 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3323 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3324 { | 3324 { |
3325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 3325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
3326 TestObjectV8Internal::locationWithExceptionAttributeSetter(jsValue, info); | 3326 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); |
3327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3328 } | 3328 } |
3329 | 3329 |
3330 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) | 3330 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::Propert
yCallbackInfo<v8::Value>& info) |
3331 { | 3331 { |
3332 v8::Handle<v8::Value> data = info.Data(); | 3332 v8::Handle<v8::Value> data = info.Data(); |
3333 ASSERT(data->IsExternal()); | 3333 ASSERT(data->IsExternal()); |
3334 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 3334 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
3335 if (!perContextData) | 3335 if (!perContextData) |
3336 return; | 3336 return; |
3337 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 3337 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
3338 } | 3338 } |
3339 | 3339 |
3340 static void TestSubObjMeasuredConstructorGetterCallback(v8::Local<v8::String> pr
operty, const v8::PropertyCallbackInfo<v8::Value>& info) | 3340 static void TestSubObjMeasuredConstructorGetterCallback(v8::Local<v8::String> pr
operty, const v8::PropertyCallbackInfo<v8::Value>& info) |
3341 { | 3341 { |
3342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3343 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); | 3343 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te
stFeature); |
3344 TestObjectV8Internal::TestObjectConstructorGetter(property, info); | 3344 TestObjectV8Internal::TestObjectConstructorGetter(property, info); |
3345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3346 } | 3346 } |
3347 | 3347 |
3348 static void deprecatedConstructorConstructorGetterCallback(v8::Local<v8::String>
property, const v8::PropertyCallbackInfo<v8::Value>& info) | 3348 static void deprecatedConstructorConstructorGetterCallback(v8::Local<v8::String>
property, const v8::PropertyCallbackInfo<v8::Value>& info) |
3349 { | 3349 { |
3350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 3350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
3351 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ConstructorAttribute); | 3351 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::ConstructorAttribute); |
3352 TestObjectV8Internal::TestObjectConstructorGetter(property, info); | 3352 TestObjectV8Internal::TestObjectConstructorGetter(property, info); |
3353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 3353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
3354 } | 3354 } |
3355 | 3355 |
3356 static void TestObjectReplaceableAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3356 static void TestObjectReplaceableAttributeSetter(v8::Local<v8::String> name, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3357 { | 3357 { |
3358 info.This()->ForceSet(name, jsValue); | 3358 info.This()->ForceSet(name, v8Value); |
3359 } | 3359 } |
3360 | 3360 |
3361 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3361 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> n
ame, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
3362 { | 3362 { |
3363 TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, jsValue, in
fo); | 3363 TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, v8Value, in
fo); |
3364 } | 3364 } |
3365 | 3365 |
3366 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 3366 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
3367 { | 3367 { |
3368 TestObject* impl = V8TestObject::toNative(info.Holder()); | 3368 TestObject* impl = V8TestObject::toNative(info.Holder()); |
3369 impl->voidMethod(); | 3369 impl->voidMethod(); |
3370 } | 3370 } |
3371 | 3371 |
3372 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 3372 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
3373 { | 3373 { |
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5664 if (!result.IsEmpty()) | 5664 if (!result.IsEmpty()) |
5665 return result; | 5665 return result; |
5666 | 5666 |
5667 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 5667 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
5668 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); | 5668 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons
tructorMode); |
5669 configureV8TestObjectTemplate(result, isolate); | 5669 configureV8TestObjectTemplate(result, isolate); |
5670 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; | 5670 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result)
; |
5671 return result; | 5671 return result; |
5672 } | 5672 } |
5673 | 5673 |
5674 bool V8TestObject::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isola
te) | 5674 bool V8TestObject::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isola
te) |
5675 { | 5675 { |
5676 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e); | 5676 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
5677 } | 5677 } |
5678 | 5678 |
5679 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8:
:Value> jsValue, v8::Isolate* isolate) | 5679 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8:
:Value> v8Value, v8::Isolate* isolate) |
5680 { | 5680 { |
5681 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, jsValue); | 5681 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
5682 } | 5682 } |
5683 | 5683 |
5684 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle
<v8::Value> value) | 5684 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle
<v8::Value> value) |
5685 { | 5685 { |
5686 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 5686 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
5687 } | 5687 } |
5688 | 5688 |
5689 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> ins
tanceTemplate, TestObject* impl, v8::Isolate* isolate) | 5689 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> ins
tanceTemplate, TestObject* impl, v8::Isolate* isolate) |
5690 { | 5690 { |
5691 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); | 5691 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5735 fromInternalPointer(object)->deref(); | 5735 fromInternalPointer(object)->deref(); |
5736 } | 5736 } |
5737 | 5737 |
5738 template<> | 5738 template<> |
5739 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 5739 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
5740 { | 5740 { |
5741 return toV8(impl, creationContext, isolate); | 5741 return toV8(impl, creationContext, isolate); |
5742 } | 5742 } |
5743 | 5743 |
5744 } // namespace WebCore | 5744 } // namespace WebCore |
OLD | NEW |