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

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

Issue 121113004: Improve handling of failed integer type conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update expected outputs Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info) 237 static void byteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
238 { 238 {
239 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 239 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
240 TestObjV8Internal::byteAttrAttributeGetter(info); 240 TestObjV8Internal::byteAttrAttributeGetter(info);
241 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 241 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
242 } 242 }
243 243
244 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info) 244 static void byteAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info)
245 { 245 {
246 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttr", "Te stObject", info.Holder(), info.GetIsolate());
jsbell 2014/01/02 18:03:23 Is there going to be any perf impact from this ext
sof 2014/01/02 19:30:31 The setter here being passed a simple number not b
246 TestObj* imp = V8TestObject::toNative(info.Holder()); 247 TestObj* imp = V8TestObject::toNative(info.Holder());
247 V8TRYCATCH_VOID(int, cppValue, toInt8(jsValue)); 248 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), ex ceptionState);
248 imp->setByteAttr(cppValue); 249 imp->setByteAttr(cppValue);
249 } 250 }
250 251
251 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 252 static void byteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
252 { 253 {
253 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 254 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
254 TestObjV8Internal::byteAttrAttributeSetter(jsValue, info); 255 TestObjV8Internal::byteAttrAttributeSetter(jsValue, info);
255 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 256 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
256 } 257 }
257 258
258 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 259 static void octetAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
259 { 260 {
260 TestObj* imp = V8TestObject::toNative(info.Holder()); 261 TestObj* imp = V8TestObject::toNative(info.Holder());
261 v8SetReturnValueUnsigned(info, imp->octetAttr()); 262 v8SetReturnValueUnsigned(info, imp->octetAttr());
262 } 263 }
263 264
264 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info) 265 static void octetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info)
265 { 266 {
266 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 267 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
267 TestObjV8Internal::octetAttrAttributeGetter(info); 268 TestObjV8Internal::octetAttrAttributeGetter(info);
268 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 269 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
269 } 270 }
270 271
271 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info) 272 static void octetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info)
272 { 273 {
274 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttr", "T estObject", info.Holder(), info.GetIsolate());
273 TestObj* imp = V8TestObject::toNative(info.Holder()); 275 TestObj* imp = V8TestObject::toNative(info.Holder());
274 V8TRYCATCH_VOID(unsigned, cppValue, toUInt8(jsValue)); 276 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionStat e), exceptionState);
275 imp->setOctetAttr(cppValue); 277 imp->setOctetAttr(cppValue);
276 } 278 }
277 279
278 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 280 static void octetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
279 { 281 {
280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 282 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
281 TestObjV8Internal::octetAttrAttributeSetter(jsValue, info); 283 TestObjV8Internal::octetAttrAttributeSetter(jsValue, info);
282 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 284 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
283 } 285 }
284 286
285 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 287 static void shortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
286 { 288 {
287 TestObj* imp = V8TestObject::toNative(info.Holder()); 289 TestObj* imp = V8TestObject::toNative(info.Holder());
288 v8SetReturnValueInt(info, imp->shortAttr()); 290 v8SetReturnValueInt(info, imp->shortAttr());
289 } 291 }
290 292
291 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info) 293 static void shortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pr opertyCallbackInfo<v8::Value>& info)
292 { 294 {
293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
294 TestObjV8Internal::shortAttrAttributeGetter(info); 296 TestObjV8Internal::shortAttrAttributeGetter(info);
295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
296 } 298 }
297 299
298 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info) 300 static void shortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pro pertyCallbackInfo<void>& info)
299 { 301 {
302 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttr", "T estObject", info.Holder(), info.GetIsolate());
300 TestObj* imp = V8TestObject::toNative(info.Holder()); 303 TestObj* imp = V8TestObject::toNative(info.Holder());
301 V8TRYCATCH_VOID(int, cppValue, toInt16(jsValue)); 304 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), e xceptionState);
302 imp->setShortAttr(cppValue); 305 imp->setShortAttr(cppValue);
303 } 306 }
304 307
305 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 308 static void shortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
306 { 309 {
307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 310 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
308 TestObjV8Internal::shortAttrAttributeSetter(jsValue, info); 311 TestObjV8Internal::shortAttrAttributeSetter(jsValue, info);
309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 312 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
310 } 313 }
311 314
312 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:: Value>& info) 315 static void unsignedShortAttrAttributeGetter(const v8::PropertyCallbackInfo<v8:: Value>& info)
313 { 316 {
314 TestObj* imp = V8TestObject::toNative(info.Holder()); 317 TestObj* imp = V8TestObject::toNative(info.Holder());
315 v8SetReturnValueUnsigned(info, imp->unsignedShortAttr()); 318 v8SetReturnValueUnsigned(info, imp->unsignedShortAttr());
316 } 319 }
317 320
318 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info) 321 static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info)
319 { 322 {
320 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 323 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
321 TestObjV8Internal::unsignedShortAttrAttributeGetter(info); 324 TestObjV8Internal::unsignedShortAttrAttributeGetter(info);
322 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 325 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
323 } 326 }
324 327
325 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 328 static void unsignedShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
326 { 329 {
330 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA ttr", "TestObject", info.Holder(), info.GetIsolate());
327 TestObj* imp = V8TestObject::toNative(info.Holder()); 331 TestObj* imp = V8TestObject::toNative(info.Holder());
328 V8TRYCATCH_VOID(unsigned, cppValue, toUInt16(jsValue)); 332 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionSta te), exceptionState);
329 imp->setUnsignedShortAttr(cppValue); 333 imp->setUnsignedShortAttr(cppValue);
330 } 334 }
331 335
332 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 336 static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
333 { 337 {
334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 338 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
335 TestObjV8Internal::unsignedShortAttrAttributeSetter(jsValue, info); 339 TestObjV8Internal::unsignedShortAttrAttributeSetter(jsValue, info);
336 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 340 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
337 } 341 }
338 342
339 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo) 343 static void longAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo)
340 { 344 {
341 TestObj* imp = V8TestObject::toNative(info.Holder()); 345 TestObj* imp = V8TestObject::toNative(info.Holder());
342 v8SetReturnValueInt(info, imp->longAttr()); 346 v8SetReturnValueInt(info, imp->longAttr());
343 } 347 }
344 348
345 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info) 349 static void longAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
346 { 350 {
347 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
348 TestObjV8Internal::longAttrAttributeGetter(info); 352 TestObjV8Internal::longAttrAttributeGetter(info);
349 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
350 } 354 }
351 355
352 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info) 356 static void longAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Prop ertyCallbackInfo<void>& info)
353 { 357 {
358 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttr", "Te stObject", info.Holder(), info.GetIsolate());
354 TestObj* imp = V8TestObject::toNative(info.Holder()); 359 TestObj* imp = V8TestObject::toNative(info.Holder());
355 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 360 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
356 imp->setLongAttr(cppValue); 361 imp->setLongAttr(cppValue);
357 } 362 }
358 363
359 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 364 static void longAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
360 { 365 {
361 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 366 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
362 TestObjV8Internal::longAttrAttributeSetter(jsValue, info); 367 TestObjV8Internal::longAttrAttributeSetter(jsValue, info);
363 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 368 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
364 } 369 }
365 370
366 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info) 371 static void longLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
367 { 372 {
368 TestObj* imp = V8TestObject::toNative(info.Holder()); 373 TestObj* imp = V8TestObject::toNative(info.Holder());
369 v8SetReturnValue(info, static_cast<double>(imp->longLongAttr())); 374 v8SetReturnValue(info, static_cast<double>(imp->longLongAttr()));
370 } 375 }
371 376
372 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info) 377 static void longLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
373 { 378 {
374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 379 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
375 TestObjV8Internal::longLongAttrAttributeGetter(info); 380 TestObjV8Internal::longLongAttrAttributeGetter(info);
376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 381 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
377 } 382 }
378 383
379 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info) 384 static void longLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8:: PropertyCallbackInfo<void>& info)
380 { 385 {
386 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttr", "TestObject", info.Holder(), info.GetIsolate());
381 TestObj* imp = V8TestObject::toNative(info.Holder()); 387 TestObj* imp = V8TestObject::toNative(info.Holder());
382 V8TRYCATCH_VOID(long long, cppValue, toInt64(jsValue)); 388 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionSta te), exceptionState);
383 imp->setLongLongAttr(cppValue); 389 imp->setLongLongAttr(cppValue);
384 } 390 }
385 391
386 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 392 static void longLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
387 { 393 {
388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 394 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
389 TestObjV8Internal::longLongAttrAttributeSetter(jsValue, info); 395 TestObjV8Internal::longLongAttrAttributeSetter(jsValue, info);
390 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 396 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
391 } 397 }
392 398
393 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 399 static void unsignedLongLongAttrAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
394 { 400 {
395 TestObj* imp = V8TestObject::toNative(info.Holder()); 401 TestObj* imp = V8TestObject::toNative(info.Holder());
396 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr())); 402 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr()));
397 } 403 }
398 404
399 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 405 static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
400 { 406 {
401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
402 TestObjV8Internal::unsignedLongLongAttrAttributeGetter(info); 408 TestObjV8Internal::unsignedLongLongAttrAttributeGetter(info);
403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
404 } 410 }
405 411
406 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 412 static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
407 { 413 {
414 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo ngAttr", "TestObject", info.Holder(), info.GetIsolate());
408 TestObj* imp = V8TestObject::toNative(info.Holder()); 415 TestObj* imp = V8TestObject::toNative(info.Holder());
409 V8TRYCATCH_VOID(unsigned long long, cppValue, toUInt64(jsValue)); 416 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, ex ceptionState), exceptionState);
410 imp->setUnsignedLongLongAttr(cppValue); 417 imp->setUnsignedLongLongAttr(cppValue);
411 } 418 }
412 419
413 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 420 static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
414 { 421 {
415 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 422 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
416 TestObjV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info); 423 TestObjV8Internal::unsignedLongLongAttrAttributeSetter(jsValue, info);
417 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 424 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
418 } 425 }
419 426
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 627
621 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 628 static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
622 { 629 {
623 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
624 TestObjV8Internal::reflectedIntegralAttrAttributeGetter(info); 631 TestObjV8Internal::reflectedIntegralAttrAttributeGetter(info);
625 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
626 } 633 }
627 634
628 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 635 static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
629 { 636 {
637 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedInteg ralAttr", "TestObject", info.Holder(), info.GetIsolate());
630 TestObj* imp = V8TestObject::toNative(info.Holder()); 638 TestObj* imp = V8TestObject::toNative(info.Holder());
631 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 639 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
632 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 640 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
633 imp->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue); 641 imp->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue);
634 } 642 }
635 643
636 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 644 static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
637 { 645 {
638 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 646 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
639 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 647 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
640 TestObjV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info); 648 TestObjV8Internal::reflectedIntegralAttrAttributeSetter(jsValue, info);
641 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 649 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
642 } 650 }
643 651
644 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info) 652 static void reflectedUnsignedIntegralAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
645 { 653 {
646 TestObj* imp = V8TestObject::toNative(info.Holder()); 654 TestObj* imp = V8TestObject::toNative(info.Holder());
647 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNam es::reflectedunsignedintegralattrAttr))); 655 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNam es::reflectedunsignedintegralattrAttr)));
648 } 656 }
649 657
650 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 658 static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
651 { 659 {
652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 660 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
653 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info); 661 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(info);
654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 662 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
655 } 663 }
656 664
657 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 665 static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
658 { 666 {
667 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedUnsig nedIntegralAttr", "TestObject", info.Holder(), info.GetIsolate());
659 TestObj* imp = V8TestObject::toNative(info.Holder()); 668 TestObj* imp = V8TestObject::toNative(info.Holder());
660 V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue)); 669 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionSta te), exceptionState);
661 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 670 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
662 imp->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAt tr, cppValue); 671 imp->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAt tr, cppValue);
663 } 672 }
664 673
665 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 674 static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
666 { 675 {
667 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 676 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
668 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 677 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
669 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue, inf o); 678 TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(jsValue, inf o);
670 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 774
766 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info) 775 static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
767 { 776 {
768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 777 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
769 TestObjV8Internal::reflectedCustomIntegralAttrAttributeGetter(info); 778 TestObjV8Internal::reflectedCustomIntegralAttrAttributeGetter(info);
770 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 779 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
771 } 780 }
772 781
773 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info) 782 static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info)
774 { 783 {
784 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectedCusto mIntegralAttr", "TestObject", info.Holder(), info.GetIsolate());
775 TestObj* imp = V8TestObject::toNative(info.Holder()); 785 TestObj* imp = V8TestObject::toNative(info.Holder());
776 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 786 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
777 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 787 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
778 imp->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValue ); 788 imp->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValue );
779 } 789 }
780 790
781 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 791 static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
782 { 792 {
783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 793 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
784 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 794 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
785 TestObjV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, info) ; 795 TestObjV8Internal::reflectedCustomIntegralAttrAttributeSetter(jsValue, info) ;
786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 922
913 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 923 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
914 { 924 {
915 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 925 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
916 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(info); 926 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(info);
917 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
918 } 928 }
919 929
920 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 930 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
921 { 931 {
932 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter Exception", "TestObject", info.Holder(), info.GetIsolate());
922 TestObj* imp = V8TestObject::toNative(info.Holder()); 933 TestObj* imp = V8TestObject::toNative(info.Holder());
923 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 934 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
924 imp->setAttrWithGetterException(cppValue); 935 imp->setAttrWithGetterException(cppValue);
925 } 936 }
926 937
927 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 938 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
928 { 939 {
929 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 940 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
930 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); 941 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info);
931 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 942 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
932 } 943 }
933 944
934 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 945 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
935 { 946 {
936 TestObj* imp = V8TestObject::toNative(info.Holder()); 947 TestObj* imp = V8TestObject::toNative(info.Holder());
937 v8SetReturnValueInt(info, imp->attrWithSetterException()); 948 v8SetReturnValueInt(info, imp->attrWithSetterException());
938 } 949 }
939 950
940 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 951 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
941 { 952 {
942 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 953 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
943 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(info); 954 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(info);
944 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 955 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
945 } 956 }
946 957
947 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 958 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
948 { 959 {
949 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter Exception", "TestObject", info.Holder(), info.GetIsolate()); 960 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter Exception", "TestObject", info.Holder(), info.GetIsolate());
950 TestObj* imp = V8TestObject::toNative(info.Holder()); 961 TestObj* imp = V8TestObject::toNative(info.Holder());
951 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 962 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
952 imp->setAttrWithSetterException(cppValue, exceptionState); 963 imp->setAttrWithSetterException(cppValue, exceptionState);
953 exceptionState.throwIfNeeded(); 964 exceptionState.throwIfNeeded();
954 } 965 }
955 966
956 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 967 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
957 { 968 {
958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 969 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
959 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); 970 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info);
960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 971 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
961 } 972 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 1057
1047 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info) 1058 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info)
1048 { 1059 {
1049 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1050 TestObjV8Internal::withScriptStateAttributeAttributeGetter(info); 1061 TestObjV8Internal::withScriptStateAttributeAttributeGetter(info);
1051 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1052 } 1063 }
1053 1064
1054 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::Value> jsValue , const v8::PropertyCallbackInfo<void>& info) 1065 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::Value> jsValue , const v8::PropertyCallbackInfo<void>& info)
1055 { 1066 {
1067 ExceptionState exceptionState(ExceptionState::SetterContext, "withScriptStat eAttribute", "TestObject", info.Holder(), info.GetIsolate());
1056 TestObj* imp = V8TestObject::toNative(info.Holder()); 1068 TestObj* imp = V8TestObject::toNative(info.Holder());
1057 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1069 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1058 ScriptState* currentState = ScriptState::current(); 1070 ScriptState* currentState = ScriptState::current();
1059 if (!currentState) 1071 if (!currentState)
1060 return; 1072 return;
1061 ScriptState& state = *currentState; 1073 ScriptState& state = *currentState;
1062 imp->setWithScriptStateAttribute(&state, cppValue); 1074 imp->setWithScriptStateAttribute(&state, cppValue);
1063 if (state.hadException()) 1075 if (state.hadException())
1064 throwError(state.exception(), info.GetIsolate()); 1076 throwError(state.exception(), info.GetIsolate());
1065 } 1077 }
1066 1078
1067 static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String >, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1079 static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String >, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 1350
1339 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1351 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1340 { 1352 {
1341 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1353 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1342 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(info); 1354 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(info);
1343 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1355 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1344 } 1356 }
1345 1357
1346 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1358 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1347 { 1359 {
1360 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB yteAttr", "TestObject", info.Holder(), info.GetIsolate());
1348 TestObj* imp = V8TestObject::toNative(info.Holder()); 1361 TestObj* imp = V8TestObject::toNative(info.Holder());
1349 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt8(jsValue, EnforceRange, ok), info.GetIsolate()); 1362 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, excep tionState), exceptionState);
1350 imp->setEnforcedRangeByteAttr(cppValue); 1363 imp->setEnforcedRangeByteAttr(cppValue);
1351 } 1364 }
1352 1365
1353 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1366 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1354 { 1367 {
1355 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1368 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1356 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); 1369 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info);
1357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1370 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1358 } 1371 }
1359 1372
1360 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 1373 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
1361 { 1374 {
1362 TestObj* imp = V8TestObject::toNative(info.Holder()); 1375 TestObj* imp = V8TestObject::toNative(info.Holder());
1363 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr()); 1376 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr());
1364 } 1377 }
1365 1378
1366 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1379 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1367 { 1380 {
1368 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1381 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1369 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(info); 1382 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(info);
1370 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1383 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1371 } 1384 }
1372 1385
1373 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1386 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1374 { 1387 {
1388 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO ctetAttr", "TestObject", info.Holder(), info.GetIsolate());
1375 TestObj* imp = V8TestObject::toNative(info.Holder()); 1389 TestObj* imp = V8TestObject::toNative(info.Holder());
1376 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceR ange, ok), info.GetIsolate()); 1390 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange, exceptionState), exceptionState);
1377 imp->setEnforcedRangeOctetAttr(cppValue); 1391 imp->setEnforcedRangeOctetAttr(cppValue);
1378 } 1392 }
1379 1393
1380 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1394 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1381 { 1395 {
1382 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1383 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); 1397 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info);
1384 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1398 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1385 } 1399 }
1386 1400
1387 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 1401 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
1388 { 1402 {
1389 TestObj* imp = V8TestObject::toNative(info.Holder()); 1403 TestObj* imp = V8TestObject::toNative(info.Holder());
1390 v8SetReturnValueInt(info, imp->enforcedRangeShortAttr()); 1404 v8SetReturnValueInt(info, imp->enforcedRangeShortAttr());
1391 } 1405 }
1392 1406
1393 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1407 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1394 { 1408 {
1395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1396 TestObjV8Internal::enforcedRangeShortAttrAttributeGetter(info); 1410 TestObjV8Internal::enforcedRangeShortAttrAttributeGetter(info);
1397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1398 } 1412 }
1399 1413
1400 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1414 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1401 { 1415 {
1416 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS hortAttr", "TestObject", info.Holder(), info.GetIsolate());
1402 TestObj* imp = V8TestObject::toNative(info.Holder()); 1417 TestObj* imp = V8TestObject::toNative(info.Holder());
1403 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt16(jsValue, EnforceRange, ok), info.GetIsolate()); 1418 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exce ptionState), exceptionState);
1404 imp->setEnforcedRangeShortAttr(cppValue); 1419 imp->setEnforcedRangeShortAttr(cppValue);
1405 } 1420 }
1406 1421
1407 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1422 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1408 { 1423 {
1409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1424 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1410 TestObjV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); 1425 TestObjV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info);
1411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1426 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1412 } 1427 }
1413 1428
1414 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info) 1429 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
1415 { 1430 {
1416 TestObj* imp = V8TestObject::toNative(info.Holder()); 1431 TestObj* imp = V8TestObject::toNative(info.Holder());
1417 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedShortAttr()); 1432 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedShortAttr());
1418 } 1433 }
1419 1434
1420 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1435 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1421 { 1436 {
1422 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1423 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); 1438 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info);
1424 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1425 } 1440 }
1426 1441
1427 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info) 1442 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info)
1428 { 1443 {
1444 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate());
1429 TestObj* imp = V8TestObject::toNative(info.Holder()); 1445 TestObj* imp = V8TestObject::toNative(info.Holder());
1430 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt16(jsValue, Enforce Range, ok), info.GetIsolate()); 1446 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange , exceptionState), exceptionState);
1431 imp->setEnforcedRangeUnsignedShortAttr(cppValue); 1447 imp->setEnforcedRangeUnsignedShortAttr(cppValue);
1432 } 1448 }
1433 1449
1434 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o) 1450 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o)
1435 { 1451 {
1436 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1452 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1437 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue, in fo); 1453 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue, in fo);
1438 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1454 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1439 } 1455 }
1440 1456
1441 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1457 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1442 { 1458 {
1443 TestObj* imp = V8TestObject::toNative(info.Holder()); 1459 TestObj* imp = V8TestObject::toNative(info.Holder());
1444 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr()); 1460 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr());
1445 } 1461 }
1446 1462
1447 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1463 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1448 { 1464 {
1449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1465 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1450 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(info); 1466 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(info);
1451 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1452 } 1468 }
1453 1469
1454 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1470 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1455 { 1471 {
1472 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL ongAttr", "TestObject", info.Holder(), info.GetIsolate());
1456 TestObj* imp = V8TestObject::toNative(info.Holder()); 1473 TestObj* imp = V8TestObject::toNative(info.Holder());
1457 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt32(jsValue, EnforceRange, ok), info.GetIsolate()); 1474 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exce ptionState), exceptionState);
1458 imp->setEnforcedRangeLongAttr(cppValue); 1475 imp->setEnforcedRangeLongAttr(cppValue);
1459 } 1476 }
1460 1477
1461 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1478 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1462 { 1479 {
1463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1464 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); 1481 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info);
1465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1482 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1466 } 1483 }
1467 1484
1468 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info) 1485 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
1469 { 1486 {
1470 TestObj* imp = V8TestObject::toNative(info.Holder()); 1487 TestObj* imp = V8TestObject::toNative(info.Holder());
1471 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr()); 1488 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr());
1472 } 1489 }
1473 1490
1474 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 1491 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
1475 { 1492 {
1476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1493 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1477 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); 1494 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info);
1478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1495 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1479 } 1496 }
1480 1497
1481 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 1498 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
1482 { 1499 {
1500 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1483 TestObj* imp = V8TestObject::toNative(info.Holder()); 1501 TestObj* imp = V8TestObject::toNative(info.Holder());
1484 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt32(jsValue, Enforce Range, ok), info.GetIsolate()); 1502 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange , exceptionState), exceptionState);
1485 imp->setEnforcedRangeUnsignedLongAttr(cppValue); 1503 imp->setEnforcedRangeUnsignedLongAttr(cppValue);
1486 } 1504 }
1487 1505
1488 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 1506 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
1489 { 1507 {
1490 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1491 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue, inf o); 1509 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue, inf o);
1492 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1493 } 1511 }
1494 1512
1495 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 1513 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
1496 { 1514 {
1497 TestObj* imp = V8TestObject::toNative(info.Holder()); 1515 TestObj* imp = V8TestObject::toNative(info.Holder());
1498 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()) ); 1516 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()) );
1499 } 1517 }
1500 1518
1501 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 1519 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
1502 { 1520 {
1503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1521 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1504 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); 1522 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(info);
1505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1523 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1506 } 1524 }
1507 1525
1508 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 1526 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
1509 { 1527 {
1528 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL ongLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1510 TestObj* imp = V8TestObject::toNative(info.Holder()); 1529 TestObj* imp = V8TestObject::toNative(info.Holder());
1511 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, cppValue, toInt64(jsValue, Enforce Range, ok), info.GetIsolate()); 1530 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange , exceptionState), exceptionState);
1512 imp->setEnforcedRangeLongLongAttr(cppValue); 1531 imp->setEnforcedRangeLongLongAttr(cppValue);
1513 } 1532 }
1514 1533
1515 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1534 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1516 { 1535 {
1517 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1518 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info); 1537 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info);
1519 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1520 } 1539 }
1521 1540
1522 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info) 1541 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info)
1523 { 1542 {
1524 TestObj* imp = V8TestObject::toNative(info.Holder()); 1543 TestObj* imp = V8TestObject::toNative(info.Holder());
1525 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon gAttr())); 1544 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon gAttr()));
1526 } 1545 }
1527 1546
1528 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1547 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1529 { 1548 {
1530 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1549 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1531 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info); 1550 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info);
1532 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1551 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1533 } 1552 }
1534 1553
1535 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value > jsValue, const v8::PropertyCallbackInfo<void>& info) 1554 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value > jsValue, const v8::PropertyCallbackInfo<void>& info)
1536 { 1555 {
1556 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1537 TestObj* imp = V8TestObject::toNative(info.Holder()); 1557 TestObj* imp = V8TestObject::toNative(info.Holder());
1538 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, cppValue, toUInt64(jsValu e, EnforceRange, ok), info.GetIsolate()); 1558 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, En forceRange, exceptionState), exceptionState);
1539 imp->setEnforcedRangeUnsignedLongLongAttr(cppValue); 1559 imp->setEnforcedRangeUnsignedLongLongAttr(cppValue);
1540 } 1560 }
1541 1561
1542 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v 8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1562 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v 8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1543 { 1563 {
1544 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1564 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1545 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsValue, info); 1565 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsValue, info);
1546 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1566 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1547 } 1567 }
1548 1568
(...skipping 10 matching lines...) Expand all
1559 { 1579 {
1560 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1561 TestObjV8Internal::conditionalAttr1AttributeGetter(info); 1581 TestObjV8Internal::conditionalAttr1AttributeGetter(info);
1562 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1563 } 1583 }
1564 #endif // ENABLE(Condition1) 1584 #endif // ENABLE(Condition1)
1565 1585
1566 #if ENABLE(Condition1) 1586 #if ENABLE(Condition1)
1567 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1587 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1568 { 1588 {
1589 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r1", "TestObject", info.Holder(), info.GetIsolate());
1569 TestObj* imp = V8TestObject::toNative(info.Holder()); 1590 TestObj* imp = V8TestObject::toNative(info.Holder());
1570 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1591 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1571 imp->setConditionalAttr1(cppValue); 1592 imp->setConditionalAttr1(cppValue);
1572 } 1593 }
1573 #endif // ENABLE(Condition1) 1594 #endif // ENABLE(Condition1)
1574 1595
1575 #if ENABLE(Condition1) 1596 #if ENABLE(Condition1)
1576 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1597 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1577 { 1598 {
1578 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1579 TestObjV8Internal::conditionalAttr1AttributeSetter(jsValue, info); 1600 TestObjV8Internal::conditionalAttr1AttributeSetter(jsValue, info);
1580 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 13 matching lines...) Expand all
1594 { 1615 {
1595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1596 TestObjV8Internal::conditionalAttr2AttributeGetter(info); 1617 TestObjV8Internal::conditionalAttr2AttributeGetter(info);
1597 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1598 } 1619 }
1599 #endif // ENABLE(Condition1) && ENABLE(Condition2) 1620 #endif // ENABLE(Condition1) && ENABLE(Condition2)
1600 1621
1601 #if ENABLE(Condition1) && ENABLE(Condition2) 1622 #if ENABLE(Condition1) && ENABLE(Condition2)
1602 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1623 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1603 { 1624 {
1625 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r2", "TestObject", info.Holder(), info.GetIsolate());
1604 TestObj* imp = V8TestObject::toNative(info.Holder()); 1626 TestObj* imp = V8TestObject::toNative(info.Holder());
1605 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1627 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1606 imp->setConditionalAttr2(cppValue); 1628 imp->setConditionalAttr2(cppValue);
1607 } 1629 }
1608 #endif // ENABLE(Condition1) && ENABLE(Condition2) 1630 #endif // ENABLE(Condition1) && ENABLE(Condition2)
1609 1631
1610 #if ENABLE(Condition1) && ENABLE(Condition2) 1632 #if ENABLE(Condition1) && ENABLE(Condition2)
1611 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1633 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1612 { 1634 {
1613 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1635 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1614 TestObjV8Internal::conditionalAttr2AttributeSetter(jsValue, info); 1636 TestObjV8Internal::conditionalAttr2AttributeSetter(jsValue, info);
1615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1637 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 13 matching lines...) Expand all
1629 { 1651 {
1630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1631 TestObjV8Internal::conditionalAttr3AttributeGetter(info); 1653 TestObjV8Internal::conditionalAttr3AttributeGetter(info);
1632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1633 } 1655 }
1634 #endif // ENABLE(Condition1) || ENABLE(Condition2) 1656 #endif // ENABLE(Condition1) || ENABLE(Condition2)
1635 1657
1636 #if ENABLE(Condition1) || ENABLE(Condition2) 1658 #if ENABLE(Condition1) || ENABLE(Condition2)
1637 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1659 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1638 { 1660 {
1661 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r3", "TestObject", info.Holder(), info.GetIsolate());
1639 TestObj* imp = V8TestObject::toNative(info.Holder()); 1662 TestObj* imp = V8TestObject::toNative(info.Holder());
1640 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1663 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1641 imp->setConditionalAttr3(cppValue); 1664 imp->setConditionalAttr3(cppValue);
1642 } 1665 }
1643 #endif // ENABLE(Condition1) || ENABLE(Condition2) 1666 #endif // ENABLE(Condition1) || ENABLE(Condition2)
1644 1667
1645 #if ENABLE(Condition1) || ENABLE(Condition2) 1668 #if ENABLE(Condition1) || ENABLE(Condition2)
1646 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1669 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1647 { 1670 {
1648 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1649 TestObjV8Internal::conditionalAttr3AttributeSetter(jsValue, info); 1672 TestObjV8Internal::conditionalAttr3AttributeSetter(jsValue, info);
1650 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 1811
1789 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 1812 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1790 { 1813 {
1791 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1814 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1792 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(info); 1815 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(info);
1793 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1816 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1794 } 1817 }
1795 1818
1796 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 1819 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
1797 { 1820 {
1821 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti meAttr", "TestObject", info.Holder(), info.GetIsolate());
1798 TestObj* imp = V8TestObject::toNative(info.Holder()); 1822 TestObj* imp = V8TestObject::toNative(info.Holder());
1799 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1823 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1800 imp->setEnabledAtRuntimeAttr(cppValue); 1824 imp->setEnabledAtRuntimeAttr(cppValue);
1801 } 1825 }
1802 1826
1803 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1827 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1804 { 1828 {
1805 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1829 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1806 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); 1830 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info);
1807 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1831 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1808 } 1832 }
1809 1833
1810 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1834 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1811 { 1835 {
1812 TestObj* imp = V8TestObject::toNative(info.Holder()); 1836 TestObj* imp = V8TestObject::toNative(info.Holder());
1813 v8SetReturnValueInt(info, imp->enabledPerContextAttr()); 1837 v8SetReturnValueInt(info, imp->enabledPerContextAttr());
1814 } 1838 }
1815 1839
1816 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1840 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1817 { 1841 {
1818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1842 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1819 TestObjV8Internal::enabledPerContextAttrAttributeGetter(info); 1843 TestObjV8Internal::enabledPerContextAttrAttributeGetter(info);
1820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1844 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1821 } 1845 }
1822 1846
1823 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1847 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1824 { 1848 {
1849 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont extAttr", "TestObject", info.Holder(), info.GetIsolate());
1825 TestObj* imp = V8TestObject::toNative(info.Holder()); 1850 TestObj* imp = V8TestObject::toNative(info.Holder());
1826 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1851 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1827 imp->setEnabledPerContextAttr(cppValue); 1852 imp->setEnabledPerContextAttr(cppValue);
1828 } 1853 }
1829 1854
1830 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1855 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1831 { 1856 {
1832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1857 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1833 TestObjV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); 1858 TestObjV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info);
1834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1835 } 1860 }
1836 1861
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 2033
2009 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 2034 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
2010 { 2035 {
2011 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2036 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2012 TestObjV8Internal::strawberryAttributeGetter(info); 2037 TestObjV8Internal::strawberryAttributeGetter(info);
2013 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2038 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2014 } 2039 }
2015 2040
2016 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info) 2041 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info)
2017 { 2042 {
2043 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", " TestObject", info.Holder(), info.GetIsolate());
2018 TestObj* imp = V8TestObject::toNative(info.Holder()); 2044 TestObj* imp = V8TestObject::toNative(info.Holder());
2019 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2045 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2020 imp->setBlueberry(cppValue); 2046 imp->setBlueberry(cppValue);
2021 } 2047 }
2022 2048
2023 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2049 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2024 { 2050 {
2025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2026 TestObjV8Internal::strawberryAttributeSetter(jsValue, info); 2052 TestObjV8Internal::strawberryAttributeSetter(jsValue, info);
2027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2028 } 2054 }
2029 2055
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 2183
2158 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 2184 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2159 { 2185 {
2160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2186 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2161 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(info); 2187 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(info);
2162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2163 } 2189 }
2164 2190
2165 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 2191 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
2166 { 2192 {
2193 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe ttableAttribute", "TestObject", info.Holder(), info.GetIsolate());
2167 TestObj* imp = V8TestObject::toNative(info.Holder()); 2194 TestObj* imp = V8TestObject::toNative(info.Holder());
2168 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2195 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2169 imp->setNullableLongSettableAttribute(cppValue); 2196 imp->setNullableLongSettableAttribute(cppValue);
2170 } 2197 }
2171 2198
2172 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 2199 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
2173 { 2200 {
2174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2175 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue, inf o); 2202 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue, inf o);
2176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2177 } 2204 }
2178 2205
(...skipping 14 matching lines...) Expand all
2193 2220
2194 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info) 2221 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
2195 { 2222 {
2196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2197 TestObjV8Internal::nullableStringValueAttributeGetter(info); 2224 TestObjV8Internal::nullableStringValueAttributeGetter(info);
2198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2199 } 2226 }
2200 2227
2201 static void nullableStringValueAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2228 static void nullableStringValueAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2202 { 2229 {
2230 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableString Value", "TestObject", info.Holder(), info.GetIsolate());
2203 TestObj* imp = V8TestObject::toNative(info.Holder()); 2231 TestObj* imp = V8TestObject::toNative(info.Holder());
2204 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2232 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2205 imp->setNullableStringValue(cppValue); 2233 imp->setNullableStringValue(cppValue);
2206 } 2234 }
2207 2235
2208 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2236 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2209 { 2237 {
2210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2238 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2211 TestObjV8Internal::nullableStringValueAttributeSetter(jsValue, info); 2239 TestObjV8Internal::nullableStringValueAttributeSetter(jsValue, info);
2212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2240 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2213 } 2241 }
2214 2242
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2318 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2346 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2319 if (contextData && contextData->activityLogger()) 2347 if (contextData && contextData->activityLogger())
2320 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0, 0, "Getter"); 2348 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0, 0, "Getter");
2321 TestObjV8Internal::activityLoggedAttr1AttributeGetter(info); 2349 TestObjV8Internal::activityLoggedAttr1AttributeGetter(info);
2322 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2323 } 2351 }
2324 2352
2325 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2353 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2326 { 2354 {
2355 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr1", "TestObject", info.Holder(), info.GetIsolate());
2327 TestObj* imp = V8TestObject::toNative(info.Holder()); 2356 TestObj* imp = V8TestObject::toNative(info.Holder());
2328 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2357 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2329 imp->setActivityLoggedAttr1(cppValue); 2358 imp->setActivityLoggedAttr1(cppValue);
2330 } 2359 }
2331 2360
2332 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2361 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2333 { 2362 {
2334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2335 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2364 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2336 if (contextData && contextData->activityLogger()) { 2365 if (contextData && contextData->activityLogger()) {
2337 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2366 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2338 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1, &loggerArg[0], "Setter"); 2367 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1, &loggerArg[0], "Setter");
(...skipping 13 matching lines...) Expand all
2352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2381 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2353 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2382 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2354 if (contextData && contextData->activityLogger()) 2383 if (contextData && contextData->activityLogger())
2355 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter"); 2384 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
2356 TestObjV8Internal::activityLoggedAttr2AttributeGetter(info); 2385 TestObjV8Internal::activityLoggedAttr2AttributeGetter(info);
2357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2386 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2358 } 2387 }
2359 2388
2360 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2389 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2361 { 2390 {
2391 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr2", "TestObject", info.Holder(), info.GetIsolate());
2362 TestObj* imp = V8TestObject::toNative(info.Holder()); 2392 TestObj* imp = V8TestObject::toNative(info.Holder());
2363 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2393 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2364 imp->setActivityLoggedAttr2(cppValue); 2394 imp->setActivityLoggedAttr2(cppValue);
2365 } 2395 }
2366 2396
2367 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2397 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2368 { 2398 {
2369 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2399 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2370 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2400 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2371 if (contextData && contextData->activityLogger()) { 2401 if (contextData && contextData->activityLogger()) {
2372 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2402 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2373 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter"); 2403 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter");
(...skipping 13 matching lines...) Expand all
2387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2417 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2388 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2418 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2389 if (contextData && contextData->activityLogger()) 2419 if (contextData && contextData->activityLogger())
2390 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter"); 2420 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
2391 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); 2421 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info);
2392 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2393 } 2423 }
2394 2424
2395 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2425 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2396 { 2426 {
2427 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr2", "TestObject", info.Holder(), info.GetIsolate());
2397 TestObj* imp = V8TestObject::toNative(info.Holder()); 2428 TestObj* imp = V8TestObject::toNative(info.Holder());
2398 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2429 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2399 imp->setActivityLoggedAttr2(cppValue); 2430 imp->setActivityLoggedAttr2(cppValue);
2400 } 2431 }
2401 2432
2402 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 2433 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
2403 { 2434 {
2404 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2405 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2436 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2406 if (contextData && contextData->activityLogger()) { 2437 if (contextData && contextData->activityLogger()) {
2407 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2438 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2408 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter"); 2439 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter");
(...skipping 13 matching lines...) Expand all
2422 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2423 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2454 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2424 if (contextData && contextData->activityLogger()) 2455 if (contextData && contextData->activityLogger())
2425 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 0, 0, "Getter"); 2456 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 0, 0, "Getter");
2426 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info); 2457 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info);
2427 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2428 } 2459 }
2429 2460
2430 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info) 2461 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info)
2431 { 2462 {
2463 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate());
2432 TestObj* imp = V8TestObject::toNative(info.Holder()); 2464 TestObj* imp = V8TestObject::toNative(info.Holder());
2433 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2465 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2434 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); 2466 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue);
2435 } 2467 }
2436 2468
2437 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2469 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2438 { 2470 {
2439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2471 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2440 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2472 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2441 if (contextData && contextData->activityLogger()) { 2473 if (contextData && contextData->activityLogger()) {
2442 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2474 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2443 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 1, &loggerArg[0], "Setter"); 2475 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2454 2486
2455 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2487 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2456 { 2488 {
2457 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2489 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2458 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW orld(info); 2490 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW orld(info);
2459 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2491 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2460 } 2492 }
2461 2493
2462 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2494 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2463 { 2495 {
2496 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate());
2464 TestObj* imp = V8TestObject::toNative(info.Holder()); 2497 TestObj* imp = V8TestObject::toNative(info.Holder());
2465 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2498 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2466 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); 2499 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue);
2467 } 2500 }
2468 2501
2469 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac kInfo<void>& info) 2502 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac kInfo<void>& info)
2470 { 2503 {
2471 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2504 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2472 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW orld(jsValue, info); 2505 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW orld(jsValue, info);
2473 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2506 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2474 } 2507 }
2475 2508
2476 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 2509 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2477 { 2510 {
2478 TestObj* imp = V8TestObject::toNative(info.Holder()); 2511 TestObj* imp = V8TestObject::toNative(info.Holder());
2479 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1()); 2512 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1());
2480 } 2513 }
2481 2514
2482 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2515 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2483 { 2516 {
2484 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2517 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2485 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(info); 2518 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(info);
2486 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2519 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2487 } 2520 }
2488 2521
2489 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2522 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2490 { 2523 {
2524 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter1", "TestObject", info.Holder(), info.GetIsolate());
2491 TestObj* imp = V8TestObject::toNative(info.Holder()); 2525 TestObj* imp = V8TestObject::toNative(info.Holder());
2492 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2526 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2493 imp->setActivityLoggedAttrSetter1(cppValue); 2527 imp->setActivityLoggedAttrSetter1(cppValue);
2494 } 2528 }
2495 2529
2496 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2530 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2497 { 2531 {
2498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2532 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2499 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2533 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2500 if (contextData && contextData->activityLogger()) { 2534 if (contextData && contextData->activityLogger()) {
2501 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2535 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2502 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1 ", 1, &loggerArg[0], "Setter"); 2536 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1 ", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2513 2547
2514 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2548 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2515 { 2549 {
2516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2517 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(info); 2551 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(info);
2518 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2552 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2519 } 2553 }
2520 2554
2521 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2555 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2522 { 2556 {
2557 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter2", "TestObject", info.Holder(), info.GetIsolate());
2523 TestObj* imp = V8TestObject::toNative(info.Holder()); 2558 TestObj* imp = V8TestObject::toNative(info.Holder());
2524 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2559 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2525 imp->setActivityLoggedAttrSetter2(cppValue); 2560 imp->setActivityLoggedAttrSetter2(cppValue);
2526 } 2561 }
2527 2562
2528 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2563 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2529 { 2564 {
2530 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2565 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2531 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2566 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2532 if (contextData && contextData->activityLogger()) { 2567 if (contextData && contextData->activityLogger()) {
2533 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2568 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2534 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter"); 2569 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2545 2580
2546 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2581 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2547 { 2582 {
2548 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2549 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(info ); 2584 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(info );
2550 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2585 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2551 } 2586 }
2552 2587
2553 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 2588 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
2554 { 2589 {
2590 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter2", "TestObject", info.Holder(), info.GetIsolate());
2555 TestObj* imp = V8TestObject::toNative(info.Holder()); 2591 TestObj* imp = V8TestObject::toNative(info.Holder());
2556 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2592 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2557 imp->setActivityLoggedAttrSetter2(cppValue); 2593 imp->setActivityLoggedAttrSetter2(cppValue);
2558 } 2594 }
2559 2595
2560 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 2596 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
2561 { 2597 {
2562 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2563 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2599 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2564 if (contextData && contextData->activityLogger()) { 2600 if (contextData && contextData->activityLogger()) {
2565 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2601 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2566 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter"); 2602 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2577 2613
2578 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2614 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2579 { 2615 {
2580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2581 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(i nfo); 2617 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(i nfo);
2582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2583 } 2619 }
2584 2620
2585 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2621 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2586 { 2622 {
2623 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate());
2587 TestObj* imp = V8TestObject::toNative(info.Holder()); 2624 TestObj* imp = V8TestObject::toNative(info.Holder());
2588 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2625 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2589 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); 2626 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue);
2590 } 2627 }
2591 2628
2592 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 2629 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
2593 { 2630 {
2594 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2631 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2595 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2632 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2596 if (contextData && contextData->activityLogger()) { 2633 if (contextData && contextData->activityLogger()) {
2597 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2634 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2598 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrSetter", 1, &loggerArg[0], "Setter"); 2635 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrSetter", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2609 2646
2610 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2647 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2611 { 2648 {
2612 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2613 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo rMainWorld(info); 2650 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo rMainWorld(info);
2614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2651 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2615 } 2652 }
2616 2653
2617 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2654 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2618 { 2655 {
2656 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate());
2619 TestObj* imp = V8TestObject::toNative(info.Holder()); 2657 TestObj* imp = V8TestObject::toNative(info.Holder());
2620 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2658 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2621 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); 2659 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue);
2622 } 2660 }
2623 2661
2624 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info) 2662 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info)
2625 { 2663 {
2626 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2664 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2627 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo rMainWorld(jsValue, info); 2665 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo rMainWorld(jsValue, info);
2628 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2666 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2629 } 2667 }
2630 2668
2631 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 2669 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2632 { 2670 {
2633 TestObj* imp = V8TestObject::toNative(info.Holder()); 2671 TestObj* imp = V8TestObject::toNative(info.Holder());
2634 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1()); 2672 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1());
2635 } 2673 }
2636 2674
2637 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2675 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2638 { 2676 {
2639 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2640 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2678 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2641 if (contextData && contextData->activityLogger()) 2679 if (contextData && contextData->activityLogger())
2642 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1 ", 0, 0, "Getter"); 2680 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1 ", 0, 0, "Getter");
2643 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(info); 2681 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(info);
2644 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2682 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2645 } 2683 }
2646 2684
2647 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2685 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2648 { 2686 {
2687 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter1", "TestObject", info.Holder(), info.GetIsolate());
2649 TestObj* imp = V8TestObject::toNative(info.Holder()); 2688 TestObj* imp = V8TestObject::toNative(info.Holder());
2650 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2689 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2651 imp->setActivityLoggedAttrGetter1(cppValue); 2690 imp->setActivityLoggedAttrGetter1(cppValue);
2652 } 2691 }
2653 2692
2654 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2693 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2655 { 2694 {
2656 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2657 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info); 2696 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info);
2658 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2697 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2659 } 2698 }
2660 2699
2661 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 2700 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2662 { 2701 {
2663 TestObj* imp = V8TestObject::toNative(info.Holder()); 2702 TestObj* imp = V8TestObject::toNative(info.Holder());
2664 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); 2703 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2());
2665 } 2704 }
2666 2705
2667 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2706 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2668 { 2707 {
2669 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2708 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2670 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2709 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2671 if (contextData && contextData->activityLogger()) 2710 if (contextData && contextData->activityLogger())
2672 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter"); 2711 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter");
2673 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(info); 2712 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(info);
2674 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2675 } 2714 }
2676 2715
2677 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2716 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2678 { 2717 {
2718 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter2", "TestObject", info.Holder(), info.GetIsolate());
2679 TestObj* imp = V8TestObject::toNative(info.Holder()); 2719 TestObj* imp = V8TestObject::toNative(info.Holder());
2680 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2720 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2681 imp->setActivityLoggedAttrGetter2(cppValue); 2721 imp->setActivityLoggedAttrGetter2(cppValue);
2682 } 2722 }
2683 2723
2684 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2724 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2685 { 2725 {
2686 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2726 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2687 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info); 2727 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info);
2688 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2689 } 2729 }
2690 2730
2691 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope rtyCallbackInfo<v8::Value>& info) 2731 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope rtyCallbackInfo<v8::Value>& info)
2692 { 2732 {
2693 TestObj* imp = V8TestObject::toNative(info.Holder()); 2733 TestObj* imp = V8TestObject::toNative(info.Holder());
2694 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); 2734 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2());
2695 } 2735 }
2696 2736
2697 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2737 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2698 { 2738 {
2699 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2700 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2740 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2701 if (contextData && contextData->activityLogger()) 2741 if (contextData && contextData->activityLogger())
2702 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter"); 2742 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter");
2703 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(info ); 2743 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(info );
2704 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2705 } 2745 }
2706 2746
2707 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 2747 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
2708 { 2748 {
2749 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter2", "TestObject", info.Holder(), info.GetIsolate());
2709 TestObj* imp = V8TestObject::toNative(info.Holder()); 2750 TestObj* imp = V8TestObject::toNative(info.Holder());
2710 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2751 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2711 imp->setActivityLoggedAttrGetter2(cppValue); 2752 imp->setActivityLoggedAttrGetter2(cppValue);
2712 } 2753 }
2713 2754
2714 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 2755 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
2715 { 2756 {
2716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2757 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2717 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(jsVa lue, info); 2758 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(jsVa lue, info);
2718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2759 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2719 } 2760 }
2720 2761
2721 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info) 2762 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info)
2722 { 2763 {
2723 TestObj* imp = V8TestObject::toNative(info.Holder()); 2764 TestObj* imp = V8TestObject::toNative(info.Holder());
2724 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); 2765 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter());
2725 } 2766 }
2726 2767
2727 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2768 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2728 { 2769 {
2729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2770 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2730 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2771 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2731 if (contextData && contextData->activityLogger()) 2772 if (contextData && contextData->activityLogger())
2732 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrGetter", 0, 0, "Getter"); 2773 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrGetter", 0, 0, "Getter");
2733 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(i nfo); 2774 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(i nfo);
2734 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2775 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2735 } 2776 }
2736 2777
2737 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2778 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2738 { 2779 {
2780 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate());
2739 TestObj* imp = V8TestObject::toNative(info.Holder()); 2781 TestObj* imp = V8TestObject::toNative(info.Holder());
2740 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2782 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2741 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); 2783 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue);
2742 } 2784 }
2743 2785
2744 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 2786 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
2745 { 2787 {
2746 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2788 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2747 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(j sValue, info); 2789 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(j sValue, info);
2748 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2790 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2749 } 2791 }
2750 2792
2751 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld( const v8::PropertyCallbackInfo<v8::Value>& info) 2793 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld( const v8::PropertyCallbackInfo<v8::Value>& info)
2752 { 2794 {
2753 TestObj* imp = V8TestObject::toNative(info.Holder()); 2795 TestObj* imp = V8TestObject::toNative(info.Holder());
2754 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); 2796 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter());
2755 } 2797 }
2756 2798
2757 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2799 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2758 { 2800 {
2759 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2760 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo rMainWorld(info); 2802 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo rMainWorld(info);
2761 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2762 } 2804 }
2763 2805
2764 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2806 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2765 { 2807 {
2808 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate());
2766 TestObj* imp = V8TestObject::toNative(info.Holder()); 2809 TestObj* imp = V8TestObject::toNative(info.Holder());
2767 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2810 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2768 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); 2811 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue);
2769 } 2812 }
2770 2813
2771 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info) 2814 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info)
2772 { 2815 {
2773 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2774 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo rMainWorld(jsValue, info); 2817 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo rMainWorld(jsValue, info);
2775 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2776 } 2819 }
2777 2820
(...skipping 18 matching lines...) Expand all
2796 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 2839 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
2797 { 2840 {
2798 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2799 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute); 2842 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute);
2800 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(info); 2843 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(info);
2801 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2844 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2802 } 2845 }
2803 2846
2804 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 2847 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
2805 { 2848 {
2806 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2849 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat icAttr", "TestObject", info.Holder(), info.GetIsolate());
2850 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2807 TestObj::setDeprecatedStaticAttr(cppValue); 2851 TestObj::setDeprecatedStaticAttr(cppValue);
2808 } 2852 }
2809 2853
2810 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2854 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2811 { 2855 {
2812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2813 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute); 2857 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute);
2814 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); 2858 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info);
2815 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2816 } 2860 }
(...skipping 21 matching lines...) Expand all
2838 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info) 2882 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
2839 { 2883 {
2840 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2841 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute ); 2885 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute );
2842 TestObjV8Internal::deprecatedAttrAttributeGetter(info); 2886 TestObjV8Internal::deprecatedAttrAttributeGetter(info);
2843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2844 } 2888 }
2845 2889
2846 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info) 2890 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info)
2847 { 2891 {
2892 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr ", "TestObject", info.Holder(), info.GetIsolate());
2848 TestObj* imp = V8TestObject::toNative(info.Holder()); 2893 TestObj* imp = V8TestObject::toNative(info.Holder());
2849 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2894 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2850 imp->setDeprecatedAttr(cppValue); 2895 imp->setDeprecatedAttr(cppValue);
2851 } 2896 }
2852 2897
2853 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2898 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2854 { 2899 {
2855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2900 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2856 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute ); 2901 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute );
2857 TestObjV8Internal::deprecatedAttrAttributeSetter(jsValue, info); 2902 TestObjV8Internal::deprecatedAttrAttributeSetter(jsValue, info);
2858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2903 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2859 } 2904 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
2946 2991
2947 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 2992 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
2948 { 2993 {
2949 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 2994 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2950 TestObjV8Internal::voidMethodMethod(info); 2995 TestObjV8Internal::voidMethodMethod(info);
2951 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2996 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2952 } 2997 }
2953 2998
2954 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 2999 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2955 { 3000 {
3001 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodW ithArgs", "TestObject", info.Holder(), info.GetIsolate());
2956 if (UNLIKELY(info.Length() < 3)) { 3002 if (UNLIKELY(info.Length() < 3)) {
2957 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate()); 3003 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
3004 exceptionState.throwIfNeeded();
2958 return; 3005 return;
2959 } 3006 }
2960 TestObj* imp = V8TestObject::toNative(info.Holder()); 3007 TestObj* imp = V8TestObject::toNative(info.Holder());
2961 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3008 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
2962 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3009 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
2963 if (info.Length() <= 2 || !info[2]->IsFunction()) { 3010 if (info.Length() <= 2 || !info[2]->IsFunction()) {
2964 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", "The callback provided as parameter 3 is not a function."), info.G etIsolate()); 3011 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
3012 exceptionState.throwIfNeeded();
2965 return; 3013 return;
2966 } 3014 }
2967 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext()); 3015 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext());
2968 imp->voidMethodWithArgs(longArg, strArg, objArg.release()); 3016 imp->voidMethodWithArgs(longArg, strArg, objArg.release());
2969 } 3017 }
2970 3018
2971 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3019 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
2972 { 3020 {
2973 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2974 TestObjV8Internal::voidMethodWithArgsMethod(info); 3022 TestObjV8Internal::voidMethodWithArgsMethod(info);
2975 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2976 } 3024 }
2977 3025
2978 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3026 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2979 { 3027 {
2980 TestObj* imp = V8TestObject::toNative(info.Holder()); 3028 TestObj* imp = V8TestObject::toNative(info.Holder());
2981 v8SetReturnValueInt(info, imp->longMethod()); 3029 v8SetReturnValueInt(info, imp->longMethod());
2982 } 3030 }
2983 3031
2984 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 3032 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
2985 { 3033 {
2986 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3034 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
2987 TestObjV8Internal::longMethodMethod(info); 3035 TestObjV8Internal::longMethodMethod(info);
2988 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3036 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2989 } 3037 }
2990 3038
2991 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3039 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
2992 { 3040 {
3041 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodW ithArgs", "TestObject", info.Holder(), info.GetIsolate());
2993 if (UNLIKELY(info.Length() < 3)) { 3042 if (UNLIKELY(info.Length() < 3)) {
2994 throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate()); 3043 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
3044 exceptionState.throwIfNeeded();
2995 return; 3045 return;
2996 } 3046 }
2997 TestObj* imp = V8TestObject::toNative(info.Holder()); 3047 TestObj* imp = V8TestObject::toNative(info.Holder());
2998 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3048 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
2999 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3049 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
3000 if (info.Length() <= 2 || !info[2]->IsFunction()) { 3050 if (info.Length() <= 2 || !info[2]->IsFunction()) {
3001 throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", "The callback provided as parameter 3 is not a function."), info.G etIsolate()); 3051 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
3052 exceptionState.throwIfNeeded();
3002 return; 3053 return;
3003 } 3054 }
3004 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext()); 3055 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext());
3005 v8SetReturnValueInt(info, imp->longMethodWithArgs(longArg, strArg, objArg.re lease())); 3056 v8SetReturnValueInt(info, imp->longMethodWithArgs(longArg, strArg, objArg.re lease()));
3006 } 3057 }
3007 3058
3008 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3059 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
3009 { 3060 {
3010 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3011 TestObjV8Internal::longMethodWithArgsMethod(info); 3062 TestObjV8Internal::longMethodWithArgsMethod(info);
3012 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3013 } 3064 }
3014 3065
3015 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3066 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3016 { 3067 {
3017 TestObj* imp = V8TestObject::toNative(info.Holder()); 3068 TestObj* imp = V8TestObject::toNative(info.Holder());
3018 v8SetReturnValue(info, imp->objMethod()); 3069 v8SetReturnValue(info, imp->objMethod());
3019 } 3070 }
3020 3071
3021 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3072 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3022 { 3073 {
3023 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3024 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); 3075 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
3025 TestObjV8Internal::objMethodMethod(info); 3076 TestObjV8Internal::objMethodMethod(info);
3026 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3027 } 3078 }
3028 3079
3029 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3080 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3030 { 3081 {
3082 ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethodWi thArgs", "TestObject", info.Holder(), info.GetIsolate());
3031 if (UNLIKELY(info.Length() < 3)) { 3083 if (UNLIKELY(info.Length() < 3)) {
3032 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetI solate()); 3084 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
3085 exceptionState.throwIfNeeded();
3033 return; 3086 return;
3034 } 3087 }
3035 TestObj* imp = V8TestObject::toNative(info.Holder()); 3088 TestObj* imp = V8TestObject::toNative(info.Holder());
3036 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3089 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
3037 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3090 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
3038 if (info.Length() <= 2 || !info[2]->IsFunction()) { 3091 if (info.Length() <= 2 || !info[2]->IsFunction()) {
3039 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", "The callback provided as parameter 3 is not a function."), info.Ge tIsolate()); 3092 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
3093 exceptionState.throwIfNeeded();
3040 return; 3094 return;
3041 } 3095 }
3042 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext()); 3096 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext());
3043 v8SetReturnValue(info, imp->objMethodWithArgs(longArg, strArg, objArg.releas e())); 3097 v8SetReturnValue(info, imp->objMethodWithArgs(longArg, strArg, objArg.releas e()));
3044 } 3098 }
3045 3099
3046 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 3100 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
3047 { 3101 {
3048 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3102 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3049 TestObjV8Internal::objMethodWithArgsMethod(info); 3103 TestObjV8Internal::objMethodWithArgsMethod(info);
(...skipping 13 matching lines...) Expand all
3063 3117
3064 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 3118 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
3065 { 3119 {
3066 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3067 TestObjV8Internal::methodWithSequenceArgMethod(info); 3121 TestObjV8Internal::methodWithSequenceArgMethod(info);
3068 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3069 } 3123 }
3070 3124
3071 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 3125 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
3072 { 3126 {
3127 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodRetur ningSequence", "TestObject", info.Holder(), info.GetIsolate());
3073 if (UNLIKELY(info.Length() < 1)) { 3128 if (UNLIKELY(info.Length() < 1)) {
3074 throwTypeError(ExceptionMessages::failedToExecute("methodReturningSequen ce", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 3129 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3130 exceptionState.throwIfNeeded();
3075 return; 3131 return;
3076 } 3132 }
3077 TestObj* imp = V8TestObject::toNative(info.Holder()); 3133 TestObj* imp = V8TestObject::toNative(info.Holder());
3078 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3134 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
3079 v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.G etIsolate())); 3135 v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.G etIsolate()));
3080 } 3136 }
3081 3137
3082 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 3138 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
3083 { 3139 {
3084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3085 TestObjV8Internal::methodReturningSequenceMethod(info); 3141 TestObjV8Internal::methodReturningSequenceMethod(info);
3086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3087 } 3143 }
3088 3144
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3509 3565
3510 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 3566 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
3511 { 3567 {
3512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3513 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(info); 3569 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(info);
3514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3570 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3515 } 3571 }
3516 3572
3517 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 3573 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
3518 { 3574 {
3575 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO ptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3519 TestObj* imp = V8TestObject::toNative(info.Holder()); 3576 TestObj* imp = V8TestObject::toNative(info.Holder());
3520 if (UNLIKELY(info.Length() <= 0)) { 3577 if (UNLIKELY(info.Length() <= 0)) {
3521 imp->methodWithOptionalArg(); 3578 imp->methodWithOptionalArg();
3522 return; 3579 return;
3523 } 3580 }
3524 V8TRYCATCH_VOID(int, opt, toInt32(info[0])); 3581 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[0], exceptionState), except ionState);
3525 imp->methodWithOptionalArg(opt); 3582 imp->methodWithOptionalArg(opt);
3526 } 3583 }
3527 3584
3528 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 3585 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
3529 { 3586 {
3530 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3587 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3531 TestObjV8Internal::methodWithOptionalArgMethod(info); 3588 TestObjV8Internal::methodWithOptionalArgMethod(info);
3532 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3589 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3533 } 3590 }
3534 3591
3535 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 3592 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
3536 { 3593 {
3594 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onOptionalArgAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3537 if (UNLIKELY(info.Length() < 1)) { 3595 if (UNLIKELY(info.Length() < 1)) {
3538 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndOptionalArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info. Length())), info.GetIsolate()); 3596 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3597 exceptionState.throwIfNeeded();
3539 return; 3598 return;
3540 } 3599 }
3541 TestObj* imp = V8TestObject::toNative(info.Holder()); 3600 TestObj* imp = V8TestObject::toNative(info.Holder());
3542 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); 3601 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc eptionState);
3543 if (UNLIKELY(info.Length() <= 1)) { 3602 if (UNLIKELY(info.Length() <= 1)) {
3544 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); 3603 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
3545 return; 3604 return;
3546 } 3605 }
3547 V8TRYCATCH_VOID(int, opt, toInt32(info[1])); 3606 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[1], exceptionState), except ionState);
3548 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); 3607 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
3549 } 3608 }
3550 3609
3551 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 3610 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
3552 { 3611 {
3553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3612 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3554 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info); 3613 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info);
3555 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3556 } 3615 }
3557 3616
3558 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& info) 3617 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
3559 { 3618 {
3619 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onOptionalArgAndTwoOptionalArgs", "TestObject", info.Holder(), info.GetIsolate() );
3560 if (UNLIKELY(info.Length() < 1)) { 3620 if (UNLIKELY(info.Length() < 1)) {
3561 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndTwoOptionalArgs", "TestObject", ExceptionMessages::notEnoughArguments(1, i nfo.Length())), info.GetIsolate()); 3621 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3622 exceptionState.throwIfNeeded();
3562 return; 3623 return;
3563 } 3624 }
3564 TestObj* imp = V8TestObject::toNative(info.Holder()); 3625 TestObj* imp = V8TestObject::toNative(info.Holder());
3565 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); 3626 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc eptionState);
3566 if (UNLIKELY(info.Length() <= 1)) { 3627 if (UNLIKELY(info.Length() <= 1)) {
3567 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); 3628 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
3568 return; 3629 return;
3569 } 3630 }
3570 V8TRYCATCH_VOID(int, opt1, toInt32(info[1])); 3631 V8TRYCATCH_EXCEPTION_VOID(int, opt1, toInt32(info[1], exceptionState), excep tionState);
3571 if (UNLIKELY(info.Length() <= 2)) { 3632 if (UNLIKELY(info.Length() <= 2)) {
3572 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); 3633 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
3573 return; 3634 return;
3574 } 3635 }
3575 V8TRYCATCH_VOID(int, opt2, toInt32(info[2])); 3636 V8TRYCATCH_EXCEPTION_VOID(int, opt2, toInt32(info[2], exceptionState), excep tionState);
3576 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); 3637 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
3577 } 3638 }
3578 3639
3579 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 3640 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
3580 { 3641 {
3581 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3642 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3582 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info); 3643 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info);
3583 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3644 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3584 } 3645 }
3585 3646
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 3707
3647 static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 3708 static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
3648 { 3709 {
3649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3710 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3650 TestObjV8Internal::methodWithCallbackInterfaceArgMethod(info); 3711 TestObjV8Internal::methodWithCallbackInterfaceArgMethod(info);
3651 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3712 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3652 } 3713 }
3653 3714
3654 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 3715 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
3655 { 3716 {
3717 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onCallbackArgAndCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsol ate());
3656 if (UNLIKELY(info.Length() < 2)) { 3718 if (UNLIKELY(info.Length() < 2)) {
3657 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments (2, info.Length())), info.GetIsolate()); 3719 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
3720 exceptionState.throwIfNeeded();
3658 return; 3721 return;
3659 } 3722 }
3660 TestObj* imp = V8TestObject::toNative(info.Holder()); 3723 TestObj* imp = V8TestObject::toNative(info.Holder());
3661 V8TRYCATCH_VOID(int, nonCallback, toInt32(info[0])); 3724 V8TRYCATCH_EXCEPTION_VOID(int, nonCallback, toInt32(info[0], exceptionState) , exceptionState);
3662 if (info.Length() <= 1 || !info[1]->IsFunction()) { 3725 if (info.Length() <= 1 || !info[1]->IsFunction()) {
3663 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackInterfaceArg", "TestObject", "The callback provided as parameter 2 is not a function."), info.GetIsolate()); 3726 exceptionState.throwTypeError("The callback provided as parameter 2 is n ot a function.");
3727 exceptionState.throwIfNeeded();
3664 return; 3728 return;
3665 } 3729 }
3666 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c reate(v8::Handle<v8::Function>::Cast(info[1]), getExecutionContext()); 3730 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c reate(v8::Handle<v8::Function>::Cast(info[1]), getExecutionContext());
3667 imp->methodWithNonCallbackArgAndCallbackInterfaceArg(nonCallback, callbackIn terface.release()); 3731 imp->methodWithNonCallbackArgAndCallbackInterfaceArg(nonCallback, callbackIn terface.release());
3668 } 3732 }
3669 3733
3670 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 3734 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3671 { 3735 {
3672 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3736 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3673 TestObjV8Internal::methodWithNonCallbackArgAndCallbackInterfaceArgMethod(inf o); 3737 TestObjV8Internal::methodWithNonCallbackArgAndCallbackInterfaceArgMethod(inf o);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
3753 3817
3754 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3818 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3755 { 3819 {
3756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3820 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3757 TestObjV8Internal::staticMethodWithCallbackArgMethod(info); 3821 TestObjV8Internal::staticMethodWithCallbackArgMethod(info);
3758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3822 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3759 } 3823 }
3760 3824
3761 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 3825 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
3762 { 3826 {
3827 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt8", "TestObject", info.Holder(), info.GetIsolate());
3763 if (UNLIKELY(info.Length() < 1)) { 3828 if (UNLIKELY(info.Length() < 1)) {
3764 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3829 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3830 exceptionState.throwIfNeeded();
3765 return; 3831 return;
3766 } 3832 }
3767 TestObj* imp = V8TestObject::toNative(info.Holder()); 3833 TestObj* imp = V8TestObject::toNative(info.Holder());
3768 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(info[0], EnforceRange, ok) , info.GetIsolate()); 3834 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt8(info[0], EnforceRange, exceptio nState), exceptionState);
3769 imp->methodWithEnforceRangeInt8(value); 3835 imp->methodWithEnforceRangeInt8(value);
3770 } 3836 }
3771 3837
3772 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 3838 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
3773 { 3839 {
3774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3840 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3775 TestObjV8Internal::methodWithEnforceRangeInt8Method(info); 3841 TestObjV8Internal::methodWithEnforceRangeInt8Method(info);
3776 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3842 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3777 } 3843 }
3778 3844
3779 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3845 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3780 { 3846 {
3847 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt8", "TestObject", info.Holder(), info.GetIsolate());
3781 if (UNLIKELY(info.Length() < 1)) { 3848 if (UNLIKELY(info.Length() < 1)) {
3782 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3849 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3850 exceptionState.throwIfNeeded();
3783 return; 3851 return;
3784 } 3852 }
3785 TestObj* imp = V8TestObject::toNative(info.Holder()); 3853 TestObj* imp = V8TestObject::toNative(info.Holder());
3786 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(info[0], EnforceRang e, ok), info.GetIsolate()); 3854 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt8(info[0], EnforceRange, ex ceptionState), exceptionState);
3787 imp->methodWithEnforceRangeUInt8(value); 3855 imp->methodWithEnforceRangeUInt8(value);
3788 } 3856 }
3789 3857
3790 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3858 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3791 { 3859 {
3792 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3860 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3793 TestObjV8Internal::methodWithEnforceRangeUInt8Method(info); 3861 TestObjV8Internal::methodWithEnforceRangeUInt8Method(info);
3794 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3862 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3795 } 3863 }
3796 3864
3797 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3865 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3798 { 3866 {
3867 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt16", "TestObject", info.Holder(), info.GetIsolate());
3799 if (UNLIKELY(info.Length() < 1)) { 3868 if (UNLIKELY(info.Length() < 1)) {
3800 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3869 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3870 exceptionState.throwIfNeeded();
3801 return; 3871 return;
3802 } 3872 }
3803 TestObj* imp = V8TestObject::toNative(info.Holder()); 3873 TestObj* imp = V8TestObject::toNative(info.Holder());
3804 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt16(info[0], EnforceRange, ok ), info.GetIsolate()); 3874 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt16(info[0], EnforceRange, excepti onState), exceptionState);
3805 imp->methodWithEnforceRangeInt16(value); 3875 imp->methodWithEnforceRangeInt16(value);
3806 } 3876 }
3807 3877
3808 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3878 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3809 { 3879 {
3810 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3880 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3811 TestObjV8Internal::methodWithEnforceRangeInt16Method(info); 3881 TestObjV8Internal::methodWithEnforceRangeInt16Method(info);
3812 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3882 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3813 } 3883 }
3814 3884
3815 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3885 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3816 { 3886 {
3887 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt16", "TestObject", info.Holder(), info.GetIsolate());
3817 if (UNLIKELY(info.Length() < 1)) { 3888 if (UNLIKELY(info.Length() < 1)) {
3818 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 3889 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3890 exceptionState.throwIfNeeded();
3819 return; 3891 return;
3820 } 3892 }
3821 TestObj* imp = V8TestObject::toNative(info.Holder()); 3893 TestObj* imp = V8TestObject::toNative(info.Holder());
3822 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt16(info[0], EnforceRan ge, ok), info.GetIsolate()); 3894 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt16(info[0], EnforceRange, e xceptionState), exceptionState);
3823 imp->methodWithEnforceRangeUInt16(value); 3895 imp->methodWithEnforceRangeUInt16(value);
3824 } 3896 }
3825 3897
3826 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 3898 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3827 { 3899 {
3828 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3900 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3829 TestObjV8Internal::methodWithEnforceRangeUInt16Method(info); 3901 TestObjV8Internal::methodWithEnforceRangeUInt16Method(info);
3830 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3902 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3831 } 3903 }
3832 3904
3833 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3905 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3834 { 3906 {
3907 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt32", "TestObject", info.Holder(), info.GetIsolate());
3835 if (UNLIKELY(info.Length() < 1)) { 3908 if (UNLIKELY(info.Length() < 1)) {
3836 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3909 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3910 exceptionState.throwIfNeeded();
3837 return; 3911 return;
3838 } 3912 }
3839 TestObj* imp = V8TestObject::toNative(info.Holder()); 3913 TestObj* imp = V8TestObject::toNative(info.Holder());
3840 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(info[0], EnforceRange, ok ), info.GetIsolate()); 3914 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt32(info[0], EnforceRange, excepti onState), exceptionState);
3841 imp->methodWithEnforceRangeInt32(value); 3915 imp->methodWithEnforceRangeInt32(value);
3842 } 3916 }
3843 3917
3844 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3918 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3845 { 3919 {
3846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3920 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3847 TestObjV8Internal::methodWithEnforceRangeInt32Method(info); 3921 TestObjV8Internal::methodWithEnforceRangeInt32Method(info);
3848 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3922 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3849 } 3923 }
3850 3924
3851 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3925 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3852 { 3926 {
3927 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt32", "TestObject", info.Holder(), info.GetIsolate());
3853 if (UNLIKELY(info.Length() < 1)) { 3928 if (UNLIKELY(info.Length() < 1)) {
3854 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 3929 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3930 exceptionState.throwIfNeeded();
3855 return; 3931 return;
3856 } 3932 }
3857 TestObj* imp = V8TestObject::toNative(info.Holder()); 3933 TestObj* imp = V8TestObject::toNative(info.Holder());
3858 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(info[0], EnforceRan ge, ok), info.GetIsolate()); 3934 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt32(info[0], EnforceRange, e xceptionState), exceptionState);
3859 imp->methodWithEnforceRangeUInt32(value); 3935 imp->methodWithEnforceRangeUInt32(value);
3860 } 3936 }
3861 3937
3862 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 3938 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3863 { 3939 {
3864 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3940 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3865 TestObjV8Internal::methodWithEnforceRangeUInt32Method(info); 3941 TestObjV8Internal::methodWithEnforceRangeUInt32Method(info);
3866 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3942 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3867 } 3943 }
3868 3944
3869 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3945 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3870 { 3946 {
3947 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt64", "TestObject", info.Holder(), info.GetIsolate());
3871 if (UNLIKELY(info.Length() < 1)) { 3948 if (UNLIKELY(info.Length() < 1)) {
3872 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3949 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3950 exceptionState.throwIfNeeded();
3873 return; 3951 return;
3874 } 3952 }
3875 TestObj* imp = V8TestObject::toNative(info.Holder()); 3953 TestObj* imp = V8TestObject::toNative(info.Holder());
3876 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(info[0], EnforceRan ge, ok), info.GetIsolate()); 3954 V8TRYCATCH_EXCEPTION_VOID(long long, value, toInt64(info[0], EnforceRange, e xceptionState), exceptionState);
3877 imp->methodWithEnforceRangeInt64(value); 3955 imp->methodWithEnforceRangeInt64(value);
3878 } 3956 }
3879 3957
3880 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3958 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3881 { 3959 {
3882 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3883 TestObjV8Internal::methodWithEnforceRangeInt64Method(info); 3961 TestObjV8Internal::methodWithEnforceRangeInt64Method(info);
3884 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3962 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3885 } 3963 }
3886 3964
3887 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 3965 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3888 { 3966 {
3967 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt64", "TestObject", info.Holder(), info.GetIsolate());
3889 if (UNLIKELY(info.Length() < 1)) { 3968 if (UNLIKELY(info.Length() < 1)) {
3890 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 3969 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3970 exceptionState.throwIfNeeded();
3891 return; 3971 return;
3892 } 3972 }
3893 TestObj* imp = V8TestObject::toNative(info.Holder()); 3973 TestObj* imp = V8TestObject::toNative(info.Holder());
3894 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(info[0], EnforceRange, ok), info.GetIsolate()); 3974 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, value, toUInt64(info[0], Enfor ceRange, exceptionState), exceptionState);
3895 imp->methodWithEnforceRangeUInt64(value); 3975 imp->methodWithEnforceRangeUInt64(value);
3896 } 3976 }
3897 3977
3898 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 3978 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3899 { 3979 {
3900 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3980 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3901 TestObjV8Internal::methodWithEnforceRangeUInt64Method(info); 3981 TestObjV8Internal::methodWithEnforceRangeUInt64Method(info);
3902 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3982 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3903 } 3983 }
3904 3984
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
3979 4059
3980 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 4060 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
3981 { 4061 {
3982 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4062 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3983 TestObjV8Internal::callbackFunctionArgumentMethod(info); 4063 TestObjV8Internal::callbackFunctionArgumentMethod(info);
3984 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4064 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3985 } 4065 }
3986 4066
3987 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4067 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3988 { 4068 {
4069 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethod", "TestObject", info.Holder(), info.GetIsolate());
3989 if (UNLIKELY(info.Length() < 1)) { 4070 if (UNLIKELY(info.Length() < 1)) {
3990 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4071 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4072 exceptionState.throwIfNeeded();
3991 return; 4073 return;
3992 } 4074 }
3993 TestObj* imp = V8TestObject::toNative(info.Holder()); 4075 TestObj* imp = V8TestObject::toNative(info.Holder());
3994 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4076 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
3995 imp->overloadedMethod(longArg); 4077 imp->overloadedMethod(longArg);
3996 } 4078 }
3997 4079
3998 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4080 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3999 { 4081 {
4000 if (UNLIKELY(info.Length() < 1)) { 4082 if (UNLIKELY(info.Length() < 1)) {
4001 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4083 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate());
4002 return; 4084 return;
4003 } 4085 }
4004 TestObj* imp = V8TestObject::toNative(info.Holder()); 4086 TestObj* imp = V8TestObject::toNative(info.Holder());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
4081 4163
4082 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4164 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4083 { 4165 {
4084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4085 TestObjV8Internal::overloadedMethodMethod(info); 4167 TestObjV8Internal::overloadedMethodMethod(info);
4086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4168 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4087 } 4169 }
4088 4170
4089 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4171 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4090 { 4172 {
4173 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObject", info.Holder(), info.GetIsolate());
4091 if (UNLIKELY(info.Length() < 1)) { 4174 if (UNLIKELY(info.Length() < 1)) {
4092 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate()); 4175 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4176 exceptionState.throwIfNeeded();
4093 return; 4177 return;
4094 } 4178 }
4095 TestObj* imp = V8TestObject::toNative(info.Holder()); 4179 TestObj* imp = V8TestObject::toNative(info.Holder());
4096 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { 4180 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
4097 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", "The callback provided as parameter 1 is not a function."), info.Ge tIsolate()); 4181 exceptionState.throwTypeError("The callback provided as parameter 1 is n ot a function.");
4182 exceptionState.throwIfNeeded();
4098 return; 4183 return;
4099 } 4184 }
4100 OwnPtr<TestObject> objArg = info[0]->IsNull() ? nullptr : V8TestObject::crea te(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext()); 4185 OwnPtr<TestObject> objArg = info[0]->IsNull() ? nullptr : V8TestObject::crea te(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
4101 if (UNLIKELY(info.Length() <= 1)) { 4186 if (UNLIKELY(info.Length() <= 1)) {
4102 imp->overloadedMethodA(objArg.release()); 4187 imp->overloadedMethodA(objArg.release());
4103 return; 4188 return;
4104 } 4189 }
4105 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4190 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4106 imp->overloadedMethodA(objArg.release(), longArg); 4191 imp->overloadedMethodA(objArg.release(), longArg);
4107 } 4192 }
4108 4193
4109 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4194 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4110 { 4195 {
4111 if (UNLIKELY(info.Length() < 2)) { 4196 if (UNLIKELY(info.Length() < 2)) {
4112 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI solate()); 4197 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI solate());
4113 return; 4198 return;
4114 } 4199 }
4115 TestObj* imp = V8TestObject::toNative(info.Holder()); 4200 TestObj* imp = V8TestObject::toNative(info.Holder());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
4205 4290
4206 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4291 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4207 { 4292 {
4208 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4209 TestObjV8Internal::classMethodMethod(info); 4294 TestObjV8Internal::classMethodMethod(info);
4210 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4211 } 4296 }
4212 4297
4213 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 4298 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4214 { 4299 {
4300 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod WithOptional", "TestObject", info.Holder(), info.GetIsolate());
4215 if (UNLIKELY(info.Length() <= 0)) { 4301 if (UNLIKELY(info.Length() <= 0)) {
4216 v8SetReturnValueInt(info, TestObj::classMethodWithOptional()); 4302 v8SetReturnValueInt(info, TestObj::classMethodWithOptional());
4217 return; 4303 return;
4218 } 4304 }
4219 V8TRYCATCH_VOID(int, arg, toInt32(info[0])); 4305 V8TRYCATCH_EXCEPTION_VOID(int, arg, toInt32(info[0], exceptionState), except ionState);
4220 v8SetReturnValueInt(info, TestObj::classMethodWithOptional(arg)); 4306 v8SetReturnValueInt(info, TestObj::classMethodWithOptional(arg));
4221 } 4307 }
4222 4308
4223 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 4309 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
4224 { 4310 {
4225 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4226 TestObjV8Internal::classMethodWithOptionalMethod(info); 4312 TestObjV8Internal::classMethodWithOptionalMethod(info);
4227 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4228 } 4314 }
4229 4315
4230 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 4316 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
4231 { 4317 {
4232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4318 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4233 V8TestObject::classMethod2MethodCustom(info); 4319 V8TestObject::classMethod2MethodCustom(info);
4234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4235 } 4321 }
4236 4322
4237 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4323 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4238 { 4324 {
4325 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod WithClamp", "TestObject", info.Holder(), info.GetIsolate());
4239 if (UNLIKELY(info.Length() < 2)) { 4326 if (UNLIKELY(info.Length() < 2)) {
4240 throwTypeError(ExceptionMessages::failedToExecute("classMethodWithClamp" , "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G etIsolate()); 4327 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4328 exceptionState.throwIfNeeded();
4241 return; 4329 return;
4242 } 4330 }
4243 TestObj* imp = V8TestObject::toNative(info.Holder()); 4331 TestObj* imp = V8TestObject::toNative(info.Holder());
4244 unsigned objArgsShort = 0; 4332 unsigned objArgsShort = 0;
4245 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue()); 4333 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue());
4246 if (!std::isnan(objArgsShortNativeValue)) 4334 if (!std::isnan(objArgsShortNativeValue))
4247 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); 4335 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
4248 unsigned objArgsLong = 0; 4336 unsigned objArgsLong = 0;
4249 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue()); 4337 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue());
4250 if (!std::isnan(objArgsLongNativeValue)) 4338 if (!std::isnan(objArgsLongNativeValue))
4251 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); 4339 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
4252 imp->classMethodWithClamp(objArgsShort, objArgsLong); 4340 imp->classMethodWithClamp(objArgsShort, objArgsLong);
4253 } 4341 }
4254 4342
4255 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4343 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4256 { 4344 {
4257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4258 TestObjV8Internal::classMethodWithClampMethod(info); 4346 TestObjV8Internal::classMethodWithClampMethod(info);
4259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4260 } 4348 }
4261 4349
4262 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4350 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4263 { 4351 {
4352 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledAtRu ntimeMethod", "TestObject", info.Holder(), info.GetIsolate());
4264 if (UNLIKELY(info.Length() < 1)) { 4353 if (UNLIKELY(info.Length() < 1)) {
4265 throwTypeError(ExceptionMessages::failedToExecute("enabledAtRuntimeMetho d", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info .GetIsolate()); 4354 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4355 exceptionState.throwIfNeeded();
4266 return; 4356 return;
4267 } 4357 }
4268 TestObj* imp = V8TestObject::toNative(info.Holder()); 4358 TestObj* imp = V8TestObject::toNative(info.Holder());
4269 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4359 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4270 imp->enabledAtRuntimeMethod(longArg); 4360 imp->enabledAtRuntimeMethod(longArg);
4271 } 4361 }
4272 4362
4273 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 4363 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4274 { 4364 {
4275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4276 TestObjV8Internal::enabledAtRuntimeMethodMethod(info); 4366 TestObjV8Internal::enabledAtRuntimeMethodMethod(info);
4277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4278 } 4368 }
4279 4369
4280 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 4370 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4281 { 4371 {
4372 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledPerC ontextMethod", "TestObject", info.Holder(), info.GetIsolate());
4282 if (UNLIKELY(info.Length() < 1)) { 4373 if (UNLIKELY(info.Length() < 1)) {
4283 throwTypeError(ExceptionMessages::failedToExecute("enabledPerContextMeth od", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 4374 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4375 exceptionState.throwIfNeeded();
4284 return; 4376 return;
4285 } 4377 }
4286 TestObj* imp = V8TestObject::toNative(info.Holder()); 4378 TestObj* imp = V8TestObject::toNative(info.Holder());
4287 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4379 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4288 imp->enabledPerContextMethod(longArg); 4380 imp->enabledPerContextMethod(longArg);
4289 } 4381 }
4290 4382
4291 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 4383 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
4292 { 4384 {
4293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4385 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4294 TestObjV8Internal::enabledPerContextMethodMethod(info); 4386 TestObjV8Internal::enabledPerContextMethodMethod(info);
4295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4387 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4296 } 4388 }
4297 4389
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4438 4530
4439 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 4531 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4440 { 4532 {
4441 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4533 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4442 TestObjV8Internal::immutablePointFunctionMethod(info); 4534 TestObjV8Internal::immutablePointFunctionMethod(info);
4443 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4535 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4444 } 4536 }
4445 4537
4446 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 4538 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4447 { 4539 {
4540 ExceptionState exceptionState(ExceptionState::ExecutionContext, "svgPointMet hod", "TestObject", info.Holder(), info.GetIsolate());
4448 if (UNLIKELY(info.Length() < 2)) { 4541 if (UNLIKELY(info.Length() < 2)) {
4449 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsol ate()); 4542 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4543 exceptionState.throwIfNeeded();
4450 return; 4544 return;
4451 } 4545 }
4452 TestObj* imp = V8TestObject::toNative(info.Holder()); 4546 TestObj* imp = V8TestObject::toNative(info.Holder());
4453 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4547 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4454 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); 4548 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState);
4455 if (!item) { 4549 if (!item) {
4456 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); 4550 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
4551 exceptionState.throwIfNeeded();
4457 return; 4552 return;
4458 } 4553 }
4459 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index)))); 4554 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index))));
4460 } 4555 }
4461 4556
4462 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4557 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4463 { 4558 {
4464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4465 TestObjV8Internal::svgPointMethodMethod(info); 4560 TestObjV8Internal::svgPointMethodMethod(info);
4466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4467 } 4562 }
4468 4563
4469 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4564 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4470 { 4565 {
4471 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestObject", info.Holder(), info.GetIsolate()); 4566 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestObject", info.Holder(), info.GetIsolate());
4472 if (UNLIKELY(info.Length() < 2)) { 4567 if (UNLIKELY(info.Length() < 2)) {
4473 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 4568 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4474 exceptionState.throwIfNeeded(); 4569 exceptionState.throwIfNeeded();
4475 return; 4570 return;
4476 } 4571 }
4477 TestObj* imp = V8TestObject::toNative(info.Holder()); 4572 TestObj* imp = V8TestObject::toNative(info.Holder());
4478 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8SVGPoint::hasInst ance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))) { 4573 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8SVGPoint::hasInst ance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))) {
4479 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'."); 4574 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
4480 exceptionState.throwIfNeeded(); 4575 exceptionState.throwIfNeeded();
4481 return; 4576 return;
4482 } 4577 }
4483 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); 4578 V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, item, V8SVGPoint::has Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint: :toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4484 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); 4579 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState);
4485 if (!item) { 4580 if (!item) {
4486 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); 4581 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
4582 exceptionState.throwIfNeeded();
4487 return; 4583 return;
4488 } 4584 }
4489 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , exceptionState); 4585 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , exceptionState);
4490 if (exceptionState.throwIfNeeded()) 4586 if (exceptionState.throwIfNeeded())
4491 return; 4587 return;
4492 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt))); 4588 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt)));
4493 } 4589 }
4494 4590
4495 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4591 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4496 { 4592 {
(...skipping 19 matching lines...) Expand all
4516 { 4612 {
4517 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct ion", "TestObject", info.Holder(), info.GetIsolate()); 4613 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct ion", "TestObject", info.Holder(), info.GetIsolate());
4518 if (UNLIKELY(info.Length() < 3)) { 4614 if (UNLIKELY(info.Length() < 3)) {
4519 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length())); 4615 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
4520 exceptionState.throwIfNeeded(); 4616 exceptionState.throwIfNeeded();
4521 return; 4617 return;
4522 } 4618 }
4523 TestObj* imp = V8TestObject::toNative(info.Holder()); 4619 TestObj* imp = V8TestObject::toNative(info.Holder());
4524 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); 4620 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
4525 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue())); 4621 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue()));
4526 V8TRYCATCH_VOID(int, b, toInt32(info[2])); 4622 V8TRYCATCH_EXCEPTION_VOID(int, b, toInt32(info[2], exceptionState), exceptio nState);
4527 bool result = imp->strictFunction(str, a, b, exceptionState); 4623 bool result = imp->strictFunction(str, a, b, exceptionState);
4528 if (exceptionState.throwIfNeeded()) 4624 if (exceptionState.throwIfNeeded())
4529 return; 4625 return;
4530 v8SetReturnValueBool(info, result); 4626 v8SetReturnValueBool(info, result);
4531 } 4627 }
4532 4628
4533 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4629 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4534 { 4630 {
4535 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4631 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4536 TestObjV8Internal::strictFunctionMethod(info); 4632 TestObjV8Internal::strictFunctionMethod(info);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
4596 4692
4597 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 4693 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
4598 { 4694 {
4599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4600 TestObjV8Internal::variadicNodeMethodMethod(info); 4696 TestObjV8Internal::variadicNodeMethodMethod(info);
4601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4697 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4602 } 4698 }
4603 4699
4604 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 4700 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
4605 { 4701 {
4702 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN ullableArguments", "TestObject", info.Holder(), info.GetIsolate());
4606 if (UNLIKELY(info.Length() < 3)) { 4703 if (UNLIKELY(info.Length() < 3)) {
4607 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate()); 4704 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
4705 exceptionState.throwIfNeeded();
4608 return; 4706 return;
4609 } 4707 }
4610 TestObj* imp = V8TestObject::toNative(info.Holder()); 4708 TestObj* imp = V8TestObject::toNative(info.Holder());
4611 bool strIsNull = info[0]->IsNull(); 4709 bool strIsNull = info[0]->IsNull();
4612 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, info[0]); 4710 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, info[0]);
4613 String str = strStringResource; 4711 String str = strStringResource;
4614 bool lIsNull = info[1]->IsNull(); 4712 bool lIsNull = info[1]->IsNull();
4615 V8TRYCATCH_VOID(int, l, toInt32(info[1])); 4713 V8TRYCATCH_EXCEPTION_VOID(int, l, toInt32(info[1], exceptionState), exceptio nState);
4616 if (info.Length() <= 2 || !(info[2]->IsFunction() || info[2]->IsNull())) { 4714 if (info.Length() <= 2 || !(info[2]->IsFunction() || info[2]->IsNull())) {
4617 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", "The callback provided as parameter 3 is not a function." ), info.GetIsolate()); 4715 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
4716 exceptionState.throwIfNeeded();
4618 return; 4717 return;
4619 } 4718 }
4620 OwnPtr<TestObject> obj = info[2]->IsNull() ? nullptr : V8TestObject::create( v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext()); 4719 OwnPtr<TestObject> obj = info[2]->IsNull() ? nullptr : V8TestObject::create( v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext());
4621 if (UNLIKELY(info.Length() <= 3)) { 4720 if (UNLIKELY(info.Length() <= 3)) {
4622 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj.release()); 4721 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj.release());
4623 return; 4722 return;
4624 } 4723 }
4625 bool dIsNull = info[3]->IsNull(); 4724 bool dIsNull = info[3]->IsNull();
4626 V8TRYCATCH_VOID(double, d, static_cast<double>(info[3]->NumberValue())); 4725 V8TRYCATCH_VOID(double, d, static_cast<double>(info[3]->NumberValue()));
4627 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj .release(), dIsNull ? 0 : &d); 4726 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj .release(), dIsNull ? 0 : &d);
(...skipping 27 matching lines...) Expand all
4655 4754
4656 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& info) 4755 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& info)
4657 { 4756 {
4658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4757 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4659 TestObjV8Internal::perWorldMethodMethodForMainWorld(info); 4758 TestObjV8Internal::perWorldMethodMethodForMainWorld(info);
4660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4759 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4661 } 4760 }
4662 4761
4663 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 4762 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
4664 { 4763 {
4764 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4665 if (UNLIKELY(info.Length() < 1)) { 4765 if (UNLIKELY(info.Length() < 1)) {
4666 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 4766 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4767 exceptionState.throwIfNeeded();
4667 return; 4768 return;
4668 } 4769 }
4669 TestObj* imp = V8TestObject::toNative(info.Holder()); 4770 TestObj* imp = V8TestObject::toNative(info.Holder());
4670 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4771 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4671 imp->overloadedPerWorldMethod(longArg); 4772 imp->overloadedPerWorldMethod(longArg);
4672 } 4773 }
4673 4774
4674 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info) 4775 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info)
4675 { 4776 {
4777 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4676 if (UNLIKELY(info.Length() < 1)) { 4778 if (UNLIKELY(info.Length() < 1)) {
4677 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 4779 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4780 exceptionState.throwIfNeeded();
4678 return; 4781 return;
4679 } 4782 }
4680 TestObj* imp = V8TestObject::toNative(info.Holder()); 4783 TestObj* imp = V8TestObject::toNative(info.Holder());
4681 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4784 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4682 imp->overloadedPerWorldMethod(longArg); 4785 imp->overloadedPerWorldMethod(longArg);
4683 } 4786 }
4684 4787
4685 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 4788 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
4686 { 4789 {
4790 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4687 if (UNLIKELY(info.Length() < 2)) { 4791 if (UNLIKELY(info.Length() < 2)) {
4688 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate()); 4792 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4793 exceptionState.throwIfNeeded();
4689 return; 4794 return;
4690 } 4795 }
4691 TestObj* imp = V8TestObject::toNative(info.Holder()); 4796 TestObj* imp = V8TestObject::toNative(info.Holder());
4692 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4797 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4693 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4798 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4694 imp->overloadedPerWorldMethod(strArg, longArg); 4799 imp->overloadedPerWorldMethod(strArg, longArg);
4695 } 4800 }
4696 4801
4697 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4802 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4698 { 4803 {
4699 if (((info.Length() == 1))) { 4804 if (((info.Length() == 1))) {
4700 overloadedPerWorldMethod1Method(info); 4805 overloadedPerWorldMethod1Method(info);
4701 return; 4806 return;
4702 } 4807 }
4703 if (((info.Length() == 2))) { 4808 if (((info.Length() == 2))) {
(...skipping 12 matching lines...) Expand all
4716 4821
4717 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 4822 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
4718 { 4823 {
4719 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4824 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4720 TestObjV8Internal::overloadedPerWorldMethodMethod(info); 4825 TestObjV8Internal::overloadedPerWorldMethodMethod(info);
4721 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4826 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4722 } 4827 }
4723 4828
4724 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info) 4829 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info)
4725 { 4830 {
4831 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4726 if (UNLIKELY(info.Length() < 2)) { 4832 if (UNLIKELY(info.Length() < 2)) {
4727 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate()); 4833 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4834 exceptionState.throwIfNeeded();
4728 return; 4835 return;
4729 } 4836 }
4730 TestObj* imp = V8TestObject::toNative(info.Holder()); 4837 TestObj* imp = V8TestObject::toNative(info.Holder());
4731 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4838 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4732 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4839 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4733 imp->overloadedPerWorldMethod(strArg, longArg); 4840 imp->overloadedPerWorldMethod(strArg, longArg);
4734 } 4841 }
4735 4842
4736 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac kInfo<v8::Value>& info) 4843 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac kInfo<v8::Value>& info)
4737 { 4844 {
4738 if (((info.Length() == 1))) { 4845 if (((info.Length() == 1))) {
4739 overloadedPerWorldMethod1MethodForMainWorld(info); 4846 overloadedPerWorldMethod1MethodForMainWorld(info);
4740 return; 4847 return;
4741 } 4848 }
4742 if (((info.Length() == 2))) { 4849 if (((info.Length() == 2))) {
(...skipping 12 matching lines...) Expand all
4755 4862
4756 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info) 4863 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info)
4757 { 4864 {
4758 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4865 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4759 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(info); 4866 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(info);
4760 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4867 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4761 } 4868 }
4762 4869
4763 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& info) 4870 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& info)
4764 { 4871 {
4872 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod1", "TestObject", info.Holder(), info.GetIsolate());
4765 if (UNLIKELY(info.Length() < 1)) { 4873 if (UNLIKELY(info.Length() < 1)) {
4766 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod1 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4874 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4875 exceptionState.throwIfNeeded();
4767 return; 4876 return;
4768 } 4877 }
4769 TestObj* imp = V8TestObject::toNative(info.Holder()); 4878 TestObj* imp = V8TestObject::toNative(info.Holder());
4770 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4879 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4771 imp->activityLoggedMethod1(longArg); 4880 imp->activityLoggedMethod1(longArg);
4772 } 4881 }
4773 4882
4774 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 4883 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4775 { 4884 {
4776 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4777 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4886 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4778 if (contextData && contextData->activityLogger()) { 4887 if (contextData && contextData->activityLogger()) {
4779 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4888 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4780 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i nfo.Length(), loggerArgs.data(), "Method"); 4889 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i nfo.Length(), loggerArgs.data(), "Method");
4781 } 4890 }
4782 TestObjV8Internal::activityLoggedMethod1Method(info); 4891 TestObjV8Internal::activityLoggedMethod1Method(info);
4783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4784 } 4893 }
4785 4894
4786 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& info) 4895 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& info)
4787 { 4896 {
4897 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod2", "TestObject", info.Holder(), info.GetIsolate());
4788 if (UNLIKELY(info.Length() < 1)) { 4898 if (UNLIKELY(info.Length() < 1)) {
4789 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4899 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4900 exceptionState.throwIfNeeded();
4790 return; 4901 return;
4791 } 4902 }
4792 TestObj* imp = V8TestObject::toNative(info.Holder()); 4903 TestObj* imp = V8TestObject::toNative(info.Holder());
4793 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4904 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4794 imp->activityLoggedMethod2(longArg); 4905 imp->activityLoggedMethod2(longArg);
4795 } 4906 }
4796 4907
4797 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 4908 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4798 { 4909 {
4799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4910 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4800 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4911 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4801 if (contextData && contextData->activityLogger()) { 4912 if (contextData && contextData->activityLogger()) {
4802 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4913 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4803 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method"); 4914 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method");
4804 } 4915 }
4805 TestObjV8Internal::activityLoggedMethod2Method(info); 4916 TestObjV8Internal::activityLoggedMethod2Method(info);
4806 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4917 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4807 } 4918 }
4808 4919
4809 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& info) 4920 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& info)
4810 { 4921 {
4922 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod2", "TestObject", info.Holder(), info.GetIsolate());
4811 if (UNLIKELY(info.Length() < 1)) { 4923 if (UNLIKELY(info.Length() < 1)) {
4812 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4924 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4925 exceptionState.throwIfNeeded();
4813 return; 4926 return;
4814 } 4927 }
4815 TestObj* imp = V8TestObject::toNative(info.Holder()); 4928 TestObj* imp = V8TestObject::toNative(info.Holder());
4816 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4929 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4817 imp->activityLoggedMethod2(longArg); 4930 imp->activityLoggedMethod2(longArg);
4818 } 4931 }
4819 4932
4820 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa llbackInfo<v8::Value>& info) 4933 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa llbackInfo<v8::Value>& info)
4821 { 4934 {
4822 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4935 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4823 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4936 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4824 if (contextData && contextData->activityLogger()) { 4937 if (contextData && contextData->activityLogger()) {
4825 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4938 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4826 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method"); 4939 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method");
4827 } 4940 }
4828 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(info); 4941 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(info);
4829 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4942 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4830 } 4943 }
4831 4944
4832 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& info) 4945 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
4833 { 4946 {
4947 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4834 if (UNLIKELY(info.Length() < 1)) { 4948 if (UNLIKELY(info.Length() < 1)) {
4835 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate()); 4949 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4950 exceptionState.throwIfNeeded();
4836 return; 4951 return;
4837 } 4952 }
4838 TestObj* imp = V8TestObject::toNative(info.Holder()); 4953 TestObj* imp = V8TestObject::toNative(info.Holder());
4839 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4954 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4840 imp->activityLoggedInIsolatedWorldMethod(longArg); 4955 imp->activityLoggedInIsolatedWorldMethod(longArg);
4841 } 4956 }
4842 4957
4843 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 4958 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
4844 { 4959 {
4845 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4846 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 4961 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4847 if (contextData && contextData->activityLogger()) { 4962 if (contextData && contextData->activityLogger()) {
4848 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 4963 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4849 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", info.Length(), loggerArgs.data(), "Method"); 4964 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", info.Length(), loggerArgs.data(), "Method");
4850 } 4965 }
4851 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(info); 4966 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(info);
4852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4853 } 4968 }
4854 4969
4855 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& info) 4970 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& info)
4856 { 4971 {
4972 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4857 if (UNLIKELY(info.Length() < 1)) { 4973 if (UNLIKELY(info.Length() < 1)) {
4858 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate()); 4974 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4975 exceptionState.throwIfNeeded();
4859 return; 4976 return;
4860 } 4977 }
4861 TestObj* imp = V8TestObject::toNative(info.Holder()); 4978 TestObj* imp = V8TestObject::toNative(info.Holder());
4862 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4979 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4863 imp->activityLoggedInIsolatedWorldMethod(longArg); 4980 imp->activityLoggedInIsolatedWorldMethod(longArg);
4864 } 4981 }
4865 4982
4866 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 4983 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
4867 { 4984 {
4868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4985 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4869 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(inf o); 4986 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(inf o);
4870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4987 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4871 } 4988 }
4872 4989
4873 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& info) 4990 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& info)
4874 { 4991 {
4992 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4875 if (UNLIKELY(info.Length() < 1)) { 4993 if (UNLIKELY(info.Length() < 1)) {
4876 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate()); 4994 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4995 exceptionState.throwIfNeeded();
4877 return; 4996 return;
4878 } 4997 }
4879 TestObj* imp = V8TestObject::toNative(info.Holder()); 4998 TestObj* imp = V8TestObject::toNative(info.Holder());
4880 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4999 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4881 imp->overloadedActivityLoggedMethod(longArg); 5000 imp->overloadedActivityLoggedMethod(longArg);
4882 } 5001 }
4883 5002
4884 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info) 5003 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info)
4885 { 5004 {
5005 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4886 if (UNLIKELY(info.Length() < 1)) { 5006 if (UNLIKELY(info.Length() < 1)) {
4887 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate()); 5007 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5008 exceptionState.throwIfNeeded();
4888 return; 5009 return;
4889 } 5010 }
4890 TestObj* imp = V8TestObject::toNative(info.Holder()); 5011 TestObj* imp = V8TestObject::toNative(info.Holder());
4891 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 5012 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4892 imp->overloadedActivityLoggedMethod(longArg); 5013 imp->overloadedActivityLoggedMethod(longArg);
4893 } 5014 }
4894 5015
4895 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& info) 5016 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& info)
4896 { 5017 {
5018 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4897 if (UNLIKELY(info.Length() < 2)) { 5019 if (UNLIKELY(info.Length() < 2)) {
4898 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate()); 5020 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
5021 exceptionState.throwIfNeeded();
4899 return; 5022 return;
4900 } 5023 }
4901 TestObj* imp = V8TestObject::toNative(info.Holder()); 5024 TestObj* imp = V8TestObject::toNative(info.Holder());
4902 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 5025 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4903 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 5026 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4904 imp->overloadedActivityLoggedMethod(strArg, longArg); 5027 imp->overloadedActivityLoggedMethod(strArg, longArg);
4905 } 5028 }
4906 5029
4907 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 5030 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
4908 { 5031 {
4909 if (((info.Length() == 1))) { 5032 if (((info.Length() == 1))) {
4910 overloadedActivityLoggedMethod1Method(info); 5033 overloadedActivityLoggedMethod1Method(info);
4911 return; 5034 return;
4912 } 5035 }
4913 if (((info.Length() == 2))) { 5036 if (((info.Length() == 2))) {
(...skipping 17 matching lines...) Expand all
4931 if (contextData && contextData->activityLogger()) { 5054 if (contextData && contextData->activityLogger()) {
4932 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 5055 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4933 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method"); 5056 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method");
4934 } 5057 }
4935 TestObjV8Internal::overloadedActivityLoggedMethodMethod(info); 5058 TestObjV8Internal::overloadedActivityLoggedMethodMethod(info);
4936 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4937 } 5060 }
4938 5061
4939 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info) 5062 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info)
4940 { 5063 {
5064 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4941 if (UNLIKELY(info.Length() < 2)) { 5065 if (UNLIKELY(info.Length() < 2)) {
4942 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate()); 5066 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
5067 exceptionState.throwIfNeeded();
4943 return; 5068 return;
4944 } 5069 }
4945 TestObj* imp = V8TestObject::toNative(info.Holder()); 5070 TestObj* imp = V8TestObject::toNative(info.Holder());
4946 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 5071 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4947 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 5072 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4948 imp->overloadedActivityLoggedMethod(strArg, longArg); 5073 imp->overloadedActivityLoggedMethod(strArg, longArg);
4949 } 5074 }
4950 5075
4951 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC allbackInfo<v8::Value>& info) 5076 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC allbackInfo<v8::Value>& info)
4952 { 5077 {
4953 if (((info.Length() == 1))) { 5078 if (((info.Length() == 1))) {
4954 overloadedActivityLoggedMethod1MethodForMainWorld(info); 5079 overloadedActivityLoggedMethod1MethodForMainWorld(info);
4955 return; 5080 return;
4956 } 5081 }
4957 if (((info.Length() == 2))) { 5082 if (((info.Length() == 2))) {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
5469 fromInternalPointer(object)->deref(); 5594 fromInternalPointer(object)->deref();
5470 } 5595 }
5471 5596
5472 template<> 5597 template<>
5473 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 5598 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
5474 { 5599 {
5475 return toV8(impl, creationContext, isolate); 5600 return toV8(impl, creationContext, isolate);
5476 } 5601 }
5477 5602
5478 } // namespace WebCore 5603 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698