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

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: Rebase 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());
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 1039
1030 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 1040 static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
1031 { 1041 {
1032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1042 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1033 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(info); 1043 TestObjV8Internal::attrWithGetterExceptionAttributeGetter(info);
1034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1044 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1035 } 1045 }
1036 1046
1037 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1047 static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1038 { 1048 {
1049 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithGetter Exception", "TestObject", info.Holder(), info.GetIsolate());
1039 TestObj* imp = V8TestObject::toNative(info.Holder()); 1050 TestObj* imp = V8TestObject::toNative(info.Holder());
1040 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1051 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1041 imp->setAttrWithGetterException(cppValue); 1052 imp->setAttrWithGetterException(cppValue);
1042 } 1053 }
1043 1054
1044 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1055 static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1045 { 1056 {
1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1057 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1047 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info); 1058 TestObjV8Internal::attrWithGetterExceptionAttributeSetter(jsValue, info);
1048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1049 } 1060 }
1050 1061
1051 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 1062 static void attrWithSetterExceptionAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
1052 { 1063 {
1053 TestObj* imp = V8TestObject::toNative(info.Holder()); 1064 TestObj* imp = V8TestObject::toNative(info.Holder());
1054 v8SetReturnValueInt(info, imp->attrWithSetterException()); 1065 v8SetReturnValueInt(info, imp->attrWithSetterException());
1055 } 1066 }
1056 1067
1057 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 1068 static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
1058 { 1069 {
1059 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1070 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1060 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(info); 1071 TestObjV8Internal::attrWithSetterExceptionAttributeGetter(info);
1061 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1072 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1062 } 1073 }
1063 1074
1064 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1075 static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1065 { 1076 {
1066 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter Exception", "TestObject", info.Holder(), info.GetIsolate()); 1077 ExceptionState exceptionState(ExceptionState::SetterContext, "attrWithSetter Exception", "TestObject", info.Holder(), info.GetIsolate());
1067 TestObj* imp = V8TestObject::toNative(info.Holder()); 1078 TestObj* imp = V8TestObject::toNative(info.Holder());
1068 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1079 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1069 imp->setAttrWithSetterException(cppValue, exceptionState); 1080 imp->setAttrWithSetterException(cppValue, exceptionState);
1070 exceptionState.throwIfNeeded(); 1081 exceptionState.throwIfNeeded();
1071 } 1082 }
1072 1083
1073 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1084 static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1074 { 1085 {
1075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1086 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1076 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info); 1087 TestObjV8Internal::attrWithSetterExceptionAttributeSetter(jsValue, info);
1077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1088 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1078 } 1089 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 1174
1164 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info) 1175 static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info)
1165 { 1176 {
1166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1167 TestObjV8Internal::withScriptStateAttributeAttributeGetter(info); 1178 TestObjV8Internal::withScriptStateAttributeAttributeGetter(info);
1168 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1169 } 1180 }
1170 1181
1171 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::Value> jsValue , const v8::PropertyCallbackInfo<void>& info) 1182 static void withScriptStateAttributeAttributeSetter(v8::Local<v8::Value> jsValue , const v8::PropertyCallbackInfo<void>& info)
1172 { 1183 {
1184 ExceptionState exceptionState(ExceptionState::SetterContext, "withScriptStat eAttribute", "TestObject", info.Holder(), info.GetIsolate());
1173 TestObj* imp = V8TestObject::toNative(info.Holder()); 1185 TestObj* imp = V8TestObject::toNative(info.Holder());
1174 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1186 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1175 ScriptState* currentState = ScriptState::current(); 1187 ScriptState* currentState = ScriptState::current();
1176 if (!currentState) 1188 if (!currentState)
1177 return; 1189 return;
1178 ScriptState& state = *currentState; 1190 ScriptState& state = *currentState;
1179 imp->setWithScriptStateAttribute(&state, cppValue); 1191 imp->setWithScriptStateAttribute(&state, cppValue);
1180 if (state.hadException()) 1192 if (state.hadException())
1181 throwError(state.exception(), info.GetIsolate()); 1193 throwError(state.exception(), info.GetIsolate());
1182 } 1194 }
1183 1195
1184 static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String >, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1196 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
1455 1467
1456 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1468 static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1457 { 1469 {
1458 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1470 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1459 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(info); 1471 TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(info);
1460 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1472 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1461 } 1473 }
1462 1474
1463 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1475 static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1464 { 1476 {
1477 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeB yteAttr", "TestObject", info.Holder(), info.GetIsolate());
1465 TestObj* imp = V8TestObject::toNative(info.Holder()); 1478 TestObj* imp = V8TestObject::toNative(info.Holder());
1466 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt8(jsValue, EnforceRange, ok), info.GetIsolate()); 1479 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, EnforceRange, excep tionState), exceptionState);
1467 imp->setEnforcedRangeByteAttr(cppValue); 1480 imp->setEnforcedRangeByteAttr(cppValue);
1468 } 1481 }
1469 1482
1470 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1483 static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1471 { 1484 {
1472 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1485 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1473 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info); 1486 TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(jsValue, info);
1474 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1487 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1475 } 1488 }
1476 1489
1477 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 1490 static void enforcedRangeOctetAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
1478 { 1491 {
1479 TestObj* imp = V8TestObject::toNative(info.Holder()); 1492 TestObj* imp = V8TestObject::toNative(info.Holder());
1480 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr()); 1493 v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr());
1481 } 1494 }
1482 1495
1483 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1496 static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1484 { 1497 {
1485 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1486 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(info); 1499 TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(info);
1487 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1488 } 1501 }
1489 1502
1490 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1503 static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1491 { 1504 {
1505 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeO ctetAttr", "TestObject", info.Holder(), info.GetIsolate());
1492 TestObj* imp = V8TestObject::toNative(info.Holder()); 1506 TestObj* imp = V8TestObject::toNative(info.Holder());
1493 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceR ange, ok), info.GetIsolate()); 1507 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange, exceptionState), exceptionState);
1494 imp->setEnforcedRangeOctetAttr(cppValue); 1508 imp->setEnforcedRangeOctetAttr(cppValue);
1495 } 1509 }
1496 1510
1497 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1511 static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1498 { 1512 {
1499 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1513 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1500 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info); 1514 TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(jsValue, info);
1501 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1515 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1502 } 1516 }
1503 1517
1504 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 1518 static void enforcedRangeShortAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
1505 { 1519 {
1506 TestObj* imp = V8TestObject::toNative(info.Holder()); 1520 TestObj* imp = V8TestObject::toNative(info.Holder());
1507 v8SetReturnValueInt(info, imp->enforcedRangeShortAttr()); 1521 v8SetReturnValueInt(info, imp->enforcedRangeShortAttr());
1508 } 1522 }
1509 1523
1510 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1524 static void enforcedRangeShortAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1511 { 1525 {
1512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1526 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1513 TestObjV8Internal::enforcedRangeShortAttrAttributeGetter(info); 1527 TestObjV8Internal::enforcedRangeShortAttrAttributeGetter(info);
1514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1528 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1515 } 1529 }
1516 1530
1517 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1531 static void enforcedRangeShortAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1518 { 1532 {
1533 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeS hortAttr", "TestObject", info.Holder(), info.GetIsolate());
1519 TestObj* imp = V8TestObject::toNative(info.Holder()); 1534 TestObj* imp = V8TestObject::toNative(info.Holder());
1520 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt16(jsValue, EnforceRange, ok), info.GetIsolate()); 1535 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, EnforceRange, exce ptionState), exceptionState);
1521 imp->setEnforcedRangeShortAttr(cppValue); 1536 imp->setEnforcedRangeShortAttr(cppValue);
1522 } 1537 }
1523 1538
1524 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1539 static void enforcedRangeShortAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1525 { 1540 {
1526 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1527 TestObjV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info); 1542 TestObjV8Internal::enforcedRangeShortAttrAttributeSetter(jsValue, info);
1528 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1529 } 1544 }
1530 1545
1531 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info) 1546 static void enforcedRangeUnsignedShortAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
1532 { 1547 {
1533 TestObj* imp = V8TestObject::toNative(info.Holder()); 1548 TestObj* imp = V8TestObject::toNative(info.Holder());
1534 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedShortAttr()); 1549 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedShortAttr());
1535 } 1550 }
1536 1551
1537 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1552 static void enforcedRangeUnsignedShortAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1538 { 1553 {
1539 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1554 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1540 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info); 1555 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeGetter(info);
1541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1542 } 1557 }
1543 1558
1544 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info) 1559 static void enforcedRangeUnsignedShortAttrAttributeSetter(v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<void>& info)
1545 { 1560 {
1561 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedShortAttr", "TestObject", info.Holder(), info.GetIsolate());
1546 TestObj* imp = V8TestObject::toNative(info.Holder()); 1562 TestObj* imp = V8TestObject::toNative(info.Holder());
1547 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt16(jsValue, Enforce Range, ok), info.GetIsolate()); 1563 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, EnforceRange , exceptionState), exceptionState);
1548 imp->setEnforcedRangeUnsignedShortAttr(cppValue); 1564 imp->setEnforcedRangeUnsignedShortAttr(cppValue);
1549 } 1565 }
1550 1566
1551 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o) 1567 static void enforcedRangeUnsignedShortAttrAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf o)
1552 { 1568 {
1553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1554 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue, in fo); 1570 TestObjV8Internal::enforcedRangeUnsignedShortAttrAttributeSetter(jsValue, in fo);
1555 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1556 } 1572 }
1557 1573
1558 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1574 static void enforcedRangeLongAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1559 { 1575 {
1560 TestObj* imp = V8TestObject::toNative(info.Holder()); 1576 TestObj* imp = V8TestObject::toNative(info.Holder());
1561 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr()); 1577 v8SetReturnValueInt(info, imp->enforcedRangeLongAttr());
1562 } 1578 }
1563 1579
1564 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1580 static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1565 { 1581 {
1566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1567 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(info); 1583 TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(info);
1568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1569 } 1585 }
1570 1586
1571 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1587 static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1572 { 1588 {
1589 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL ongAttr", "TestObject", info.Holder(), info.GetIsolate());
1573 TestObj* imp = V8TestObject::toNative(info.Holder()); 1590 TestObj* imp = V8TestObject::toNative(info.Holder());
1574 V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt32(jsValue, EnforceRange, ok), info.GetIsolate()); 1591 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exce ptionState), exceptionState);
1575 imp->setEnforcedRangeLongAttr(cppValue); 1592 imp->setEnforcedRangeLongAttr(cppValue);
1576 } 1593 }
1577 1594
1578 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1595 static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1579 { 1596 {
1580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1597 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1581 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info); 1598 TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(jsValue, info);
1582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1599 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1583 } 1600 }
1584 1601
1585 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info) 1602 static void enforcedRangeUnsignedLongAttrAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
1586 { 1603 {
1587 TestObj* imp = V8TestObject::toNative(info.Holder()); 1604 TestObj* imp = V8TestObject::toNative(info.Holder());
1588 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr()); 1605 v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr());
1589 } 1606 }
1590 1607
1591 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 1608 static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
1592 { 1609 {
1593 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1610 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1594 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info); 1611 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(info);
1595 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1612 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1596 } 1613 }
1597 1614
1598 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 1615 static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
1599 { 1616 {
1617 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1600 TestObj* imp = V8TestObject::toNative(info.Holder()); 1618 TestObj* imp = V8TestObject::toNative(info.Holder());
1601 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt32(jsValue, Enforce Range, ok), info.GetIsolate()); 1619 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange , exceptionState), exceptionState);
1602 imp->setEnforcedRangeUnsignedLongAttr(cppValue); 1620 imp->setEnforcedRangeUnsignedLongAttr(cppValue);
1603 } 1621 }
1604 1622
1605 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 1623 static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
1606 { 1624 {
1607 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1625 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1608 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue, inf o); 1626 TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(jsValue, inf o);
1609 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1627 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1610 } 1628 }
1611 1629
1612 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 1630 static void enforcedRangeLongLongAttrAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
1613 { 1631 {
1614 TestObj* imp = V8TestObject::toNative(info.Holder()); 1632 TestObj* imp = V8TestObject::toNative(info.Holder());
1615 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()) ); 1633 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()) );
1616 } 1634 }
1617 1635
1618 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 1636 static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
1619 { 1637 {
1620 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1638 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1621 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(info); 1639 TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(info);
1622 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1640 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1623 } 1641 }
1624 1642
1625 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 1643 static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
1626 { 1644 {
1645 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeL ongLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1627 TestObj* imp = V8TestObject::toNative(info.Holder()); 1646 TestObj* imp = V8TestObject::toNative(info.Holder());
1628 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, cppValue, toInt64(jsValue, Enforce Range, ok), info.GetIsolate()); 1647 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, EnforceRange , exceptionState), exceptionState);
1629 imp->setEnforcedRangeLongLongAttr(cppValue); 1648 imp->setEnforcedRangeLongLongAttr(cppValue);
1630 } 1649 }
1631 1650
1632 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1651 static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1633 { 1652 {
1634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1653 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1635 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info); 1654 TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(jsValue, info);
1636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1655 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1637 } 1656 }
1638 1657
1639 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info) 1658 static void enforcedRangeUnsignedLongLongAttrAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info)
1640 { 1659 {
1641 TestObj* imp = V8TestObject::toNative(info.Holder()); 1660 TestObj* imp = V8TestObject::toNative(info.Holder());
1642 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon gAttr())); 1661 v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLon gAttr()));
1643 } 1662 }
1644 1663
1645 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1664 static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1646 { 1665 {
1647 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1648 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info); 1667 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(info);
1649 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1668 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1650 } 1669 }
1651 1670
1652 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value > jsValue, const v8::PropertyCallbackInfo<void>& info) 1671 static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::Value > jsValue, const v8::PropertyCallbackInfo<void>& info)
1653 { 1672 {
1673 ExceptionState exceptionState(ExceptionState::SetterContext, "enforcedRangeU nsignedLongLongAttr", "TestObject", info.Holder(), info.GetIsolate());
1654 TestObj* imp = V8TestObject::toNative(info.Holder()); 1674 TestObj* imp = V8TestObject::toNative(info.Holder());
1655 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, cppValue, toUInt64(jsValu e, EnforceRange, ok), info.GetIsolate()); 1675 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, En forceRange, exceptionState), exceptionState);
1656 imp->setEnforcedRangeUnsignedLongLongAttr(cppValue); 1676 imp->setEnforcedRangeUnsignedLongLongAttr(cppValue);
1657 } 1677 }
1658 1678
1659 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v 8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1679 static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v 8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1660 { 1680 {
1661 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1681 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1662 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsValue, info); 1682 TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(jsValue, info);
1663 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1683 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1664 } 1684 }
1665 1685
(...skipping 10 matching lines...) Expand all
1676 { 1696 {
1677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1678 TestObjV8Internal::conditionalAttr1AttributeGetter(info); 1698 TestObjV8Internal::conditionalAttr1AttributeGetter(info);
1679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1680 } 1700 }
1681 #endif // ENABLE(Condition1) 1701 #endif // ENABLE(Condition1)
1682 1702
1683 #if ENABLE(Condition1) 1703 #if ENABLE(Condition1)
1684 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1704 static void conditionalAttr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1685 { 1705 {
1706 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r1", "TestObject", info.Holder(), info.GetIsolate());
1686 TestObj* imp = V8TestObject::toNative(info.Holder()); 1707 TestObj* imp = V8TestObject::toNative(info.Holder());
1687 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1708 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1688 imp->setConditionalAttr1(cppValue); 1709 imp->setConditionalAttr1(cppValue);
1689 } 1710 }
1690 #endif // ENABLE(Condition1) 1711 #endif // ENABLE(Condition1)
1691 1712
1692 #if ENABLE(Condition1) 1713 #if ENABLE(Condition1)
1693 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1714 static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1694 { 1715 {
1695 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1696 TestObjV8Internal::conditionalAttr1AttributeSetter(jsValue, info); 1717 TestObjV8Internal::conditionalAttr1AttributeSetter(jsValue, info);
1697 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 13 matching lines...) Expand all
1711 { 1732 {
1712 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1733 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1713 TestObjV8Internal::conditionalAttr2AttributeGetter(info); 1734 TestObjV8Internal::conditionalAttr2AttributeGetter(info);
1714 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1735 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1715 } 1736 }
1716 #endif // ENABLE(Condition1) && ENABLE(Condition2) 1737 #endif // ENABLE(Condition1) && ENABLE(Condition2)
1717 1738
1718 #if ENABLE(Condition1) && ENABLE(Condition2) 1739 #if ENABLE(Condition1) && ENABLE(Condition2)
1719 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1740 static void conditionalAttr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1720 { 1741 {
1742 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r2", "TestObject", info.Holder(), info.GetIsolate());
1721 TestObj* imp = V8TestObject::toNative(info.Holder()); 1743 TestObj* imp = V8TestObject::toNative(info.Holder());
1722 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1744 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1723 imp->setConditionalAttr2(cppValue); 1745 imp->setConditionalAttr2(cppValue);
1724 } 1746 }
1725 #endif // ENABLE(Condition1) && ENABLE(Condition2) 1747 #endif // ENABLE(Condition1) && ENABLE(Condition2)
1726 1748
1727 #if ENABLE(Condition1) && ENABLE(Condition2) 1749 #if ENABLE(Condition1) && ENABLE(Condition2)
1728 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1750 static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1729 { 1751 {
1730 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1752 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1731 TestObjV8Internal::conditionalAttr2AttributeSetter(jsValue, info); 1753 TestObjV8Internal::conditionalAttr2AttributeSetter(jsValue, info);
1732 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1754 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 13 matching lines...) Expand all
1746 { 1768 {
1747 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1748 TestObjV8Internal::conditionalAttr3AttributeGetter(info); 1770 TestObjV8Internal::conditionalAttr3AttributeGetter(info);
1749 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1750 } 1772 }
1751 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) 1773 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3)
1752 1774
1753 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) 1775 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3)
1754 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1776 static void conditionalAttr3AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1755 { 1777 {
1778 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAtt r3", "TestObject", info.Holder(), info.GetIsolate());
1756 TestObj* imp = V8TestObject::toNative(info.Holder()); 1779 TestObj* imp = V8TestObject::toNative(info.Holder());
1757 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1780 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1758 imp->setConditionalAttr3(cppValue); 1781 imp->setConditionalAttr3(cppValue);
1759 } 1782 }
1760 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) 1783 #endif // ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3)
1761 1784
1762 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3) 1785 #if ENABLE(Condition1) || ENABLE(Condition2) || ENABLE(Condition3)
1763 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1786 static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1764 { 1787 {
1765 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1788 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1766 TestObjV8Internal::conditionalAttr3AttributeSetter(jsValue, info); 1789 TestObjV8Internal::conditionalAttr3AttributeSetter(jsValue, info);
1767 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1790 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 1928
1906 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 1929 static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1907 { 1930 {
1908 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1931 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1909 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(info); 1932 TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(info);
1910 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1933 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1911 } 1934 }
1912 1935
1913 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 1936 static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
1914 { 1937 {
1938 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledAtRunti meAttr", "TestObject", info.Holder(), info.GetIsolate());
1915 TestObj* imp = V8TestObject::toNative(info.Holder()); 1939 TestObj* imp = V8TestObject::toNative(info.Holder());
1916 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1940 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1917 imp->setEnabledAtRuntimeAttr(cppValue); 1941 imp->setEnabledAtRuntimeAttr(cppValue);
1918 } 1942 }
1919 1943
1920 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1944 static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1921 { 1945 {
1922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1946 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1923 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info); 1947 TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(jsValue, info);
1924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1948 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1925 } 1949 }
1926 1950
1927 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 1951 static void enabledPerContextAttrAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1928 { 1952 {
1929 TestObj* imp = V8TestObject::toNative(info.Holder()); 1953 TestObj* imp = V8TestObject::toNative(info.Holder());
1930 v8SetReturnValueInt(info, imp->enabledPerContextAttr()); 1954 v8SetReturnValueInt(info, imp->enabledPerContextAttr());
1931 } 1955 }
1932 1956
1933 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1957 static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1934 { 1958 {
1935 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1959 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1936 TestObjV8Internal::enabledPerContextAttrAttributeGetter(info); 1960 TestObjV8Internal::enabledPerContextAttrAttributeGetter(info);
1937 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1938 } 1962 }
1939 1963
1940 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 1964 static void enabledPerContextAttrAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
1941 { 1965 {
1966 ExceptionState exceptionState(ExceptionState::SetterContext, "enabledPerCont extAttr", "TestObject", info.Holder(), info.GetIsolate());
1942 TestObj* imp = V8TestObject::toNative(info.Holder()); 1967 TestObj* imp = V8TestObject::toNative(info.Holder());
1943 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 1968 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
1944 imp->setEnabledPerContextAttr(cppValue); 1969 imp->setEnabledPerContextAttr(cppValue);
1945 } 1970 }
1946 1971
1947 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1972 static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1948 { 1973 {
1949 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1974 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1950 TestObjV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info); 1975 TestObjV8Internal::enabledPerContextAttrAttributeSetter(jsValue, info);
1951 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1952 } 1977 }
1953 1978
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 2150
2126 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info) 2151 static void strawberryAttributeGetterCallback(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
2127 { 2152 {
2128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2153 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2129 TestObjV8Internal::strawberryAttributeGetter(info); 2154 TestObjV8Internal::strawberryAttributeGetter(info);
2130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2155 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2131 } 2156 }
2132 2157
2133 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info) 2158 static void strawberryAttributeSetter(v8::Local<v8::Value> jsValue, const v8::Pr opertyCallbackInfo<void>& info)
2134 { 2159 {
2160 ExceptionState exceptionState(ExceptionState::SetterContext, "strawberry", " TestObject", info.Holder(), info.GetIsolate());
2135 TestObj* imp = V8TestObject::toNative(info.Holder()); 2161 TestObj* imp = V8TestObject::toNative(info.Holder());
2136 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2162 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2137 imp->setBlueberry(cppValue); 2163 imp->setBlueberry(cppValue);
2138 } 2164 }
2139 2165
2140 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2166 static void strawberryAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2141 { 2167 {
2142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2143 TestObjV8Internal::strawberryAttributeSetter(jsValue, info); 2169 TestObjV8Internal::strawberryAttributeSetter(jsValue, info);
2144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2145 } 2171 }
2146 2172
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 2300
2275 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info) 2301 static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2276 { 2302 {
2277 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2303 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2278 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(info); 2304 TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(info);
2279 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2305 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2280 } 2306 }
2281 2307
2282 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info) 2308 static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::Value> js Value, const v8::PropertyCallbackInfo<void>& info)
2283 { 2309 {
2310 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongSe ttableAttribute", "TestObject", info.Holder(), info.GetIsolate());
2284 TestObj* imp = V8TestObject::toNative(info.Holder()); 2311 TestObj* imp = V8TestObject::toNative(info.Holder());
2285 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2312 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2286 imp->setNullableLongSettableAttribute(cppValue); 2313 imp->setNullableLongSettableAttribute(cppValue);
2287 } 2314 }
2288 2315
2289 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info ) 2316 static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info )
2290 { 2317 {
2291 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2318 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2292 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue, inf o); 2319 TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(jsValue, inf o);
2293 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2294 } 2321 }
2295 2322
(...skipping 14 matching lines...) Expand all
2310 2337
2311 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info) 2338 static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
2312 { 2339 {
2313 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2314 TestObjV8Internal::nullableStringValueAttributeGetter(info); 2341 TestObjV8Internal::nullableStringValueAttributeGetter(info);
2315 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2316 } 2343 }
2317 2344
2318 static void nullableStringValueAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2345 static void nullableStringValueAttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2319 { 2346 {
2347 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableString Value", "TestObject", info.Holder(), info.GetIsolate());
2320 TestObj* imp = V8TestObject::toNative(info.Holder()); 2348 TestObj* imp = V8TestObject::toNative(info.Holder());
2321 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2349 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2322 imp->setNullableStringValue(cppValue); 2350 imp->setNullableStringValue(cppValue);
2323 } 2351 }
2324 2352
2325 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2353 static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2326 { 2354 {
2327 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2355 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2328 TestObjV8Internal::nullableStringValueAttributeSetter(jsValue, info); 2356 TestObjV8Internal::nullableStringValueAttributeSetter(jsValue, info);
2329 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2330 } 2358 }
2331 2359
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2462 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2435 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2463 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2436 if (contextData && contextData->activityLogger()) 2464 if (contextData && contextData->activityLogger())
2437 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0, 0, "Getter"); 2465 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0, 0, "Getter");
2438 TestObjV8Internal::activityLoggedAttr1AttributeGetter(info); 2466 TestObjV8Internal::activityLoggedAttr1AttributeGetter(info);
2439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2440 } 2468 }
2441 2469
2442 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2470 static void activityLoggedAttr1AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2443 { 2471 {
2472 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr1", "TestObject", info.Holder(), info.GetIsolate());
2444 TestObj* imp = V8TestObject::toNative(info.Holder()); 2473 TestObj* imp = V8TestObject::toNative(info.Holder());
2445 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2474 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2446 imp->setActivityLoggedAttr1(cppValue); 2475 imp->setActivityLoggedAttr1(cppValue);
2447 } 2476 }
2448 2477
2449 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2478 static void activityLoggedAttr1AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2450 { 2479 {
2451 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2452 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2481 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2453 if (contextData && contextData->activityLogger()) { 2482 if (contextData && contextData->activityLogger()) {
2454 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2483 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2455 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1, &loggerArg[0], "Setter"); 2484 contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1, &loggerArg[0], "Setter");
(...skipping 13 matching lines...) Expand all
2469 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2470 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2499 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2471 if (contextData && contextData->activityLogger()) 2500 if (contextData && contextData->activityLogger())
2472 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter"); 2501 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
2473 TestObjV8Internal::activityLoggedAttr2AttributeGetter(info); 2502 TestObjV8Internal::activityLoggedAttr2AttributeGetter(info);
2474 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2475 } 2504 }
2476 2505
2477 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info) 2506 static void activityLoggedAttr2AttributeSetter(v8::Local<v8::Value> jsValue, con st v8::PropertyCallbackInfo<void>& info)
2478 { 2507 {
2508 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr2", "TestObject", info.Holder(), info.GetIsolate());
2479 TestObj* imp = V8TestObject::toNative(info.Holder()); 2509 TestObj* imp = V8TestObject::toNative(info.Holder());
2480 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2510 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2481 imp->setActivityLoggedAttr2(cppValue); 2511 imp->setActivityLoggedAttr2(cppValue);
2482 } 2512 }
2483 2513
2484 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2514 static void activityLoggedAttr2AttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2485 { 2515 {
2486 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2487 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2517 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2488 if (contextData && contextData->activityLogger()) { 2518 if (contextData && contextData->activityLogger()) {
2489 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2519 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2490 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter"); 2520 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter");
(...skipping 13 matching lines...) Expand all
2504 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2505 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2535 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2506 if (contextData && contextData->activityLogger()) 2536 if (contextData && contextData->activityLogger())
2507 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter"); 2537 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
2508 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info); 2538 TestObjV8Internal::activityLoggedAttr2AttributeGetterForMainWorld(info);
2509 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2510 } 2540 }
2511 2541
2512 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2542 static void activityLoggedAttr2AttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2513 { 2543 {
2544 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged Attr2", "TestObject", info.Holder(), info.GetIsolate());
2514 TestObj* imp = V8TestObject::toNative(info.Holder()); 2545 TestObj* imp = V8TestObject::toNative(info.Holder());
2515 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2546 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2516 imp->setActivityLoggedAttr2(cppValue); 2547 imp->setActivityLoggedAttr2(cppValue);
2517 } 2548 }
2518 2549
2519 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 2550 static void activityLoggedAttr2AttributeSetterCallbackForMainWorld(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
2520 { 2551 {
2521 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2522 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2553 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2523 if (contextData && contextData->activityLogger()) { 2554 if (contextData && contextData->activityLogger()) {
2524 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2555 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2525 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter"); 2556 contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter");
(...skipping 13 matching lines...) Expand all
2539 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2570 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2540 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2571 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2541 if (contextData && contextData->activityLogger()) 2572 if (contextData && contextData->activityLogger())
2542 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 0, 0, "Getter"); 2573 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 0, 0, "Getter");
2543 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info); 2574 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetter(info);
2544 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2575 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2545 } 2576 }
2546 2577
2547 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info) 2578 static void activityLoggedInIsolatedWorldsAttrAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info)
2548 { 2579 {
2580 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate());
2549 TestObj* imp = V8TestObject::toNative(info.Holder()); 2581 TestObj* imp = V8TestObject::toNative(info.Holder());
2550 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2582 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2551 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); 2583 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue);
2552 } 2584 }
2553 2585
2554 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2586 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2555 { 2587 {
2556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2557 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2589 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2558 if (contextData && contextData->activityLogger()) { 2590 if (contextData && contextData->activityLogger()) {
2559 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2591 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2560 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 1, &loggerArg[0], "Setter"); 2592 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttr", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2571 2603
2572 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2604 static void activityLoggedInIsolatedWorldsAttrAttributeGetterCallbackForMainWorl d(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2573 { 2605 {
2574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2606 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2575 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW orld(info); 2607 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeGetterForMainW orld(info);
2576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2608 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2577 } 2609 }
2578 2610
2579 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2611 static void activityLoggedInIsolatedWorldsAttrAttributeSetterForMainWorld(v8::Lo cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2580 { 2612 {
2613 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttr", "TestObject", info.Holder(), info.GetIsolate());
2581 TestObj* imp = V8TestObject::toNative(info.Holder()); 2614 TestObj* imp = V8TestObject::toNative(info.Holder());
2582 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2615 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2583 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue); 2616 imp->setActivityLoggedInIsolatedWorldsAttr(cppValue);
2584 } 2617 }
2585 2618
2586 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac kInfo<void>& info) 2619 static void activityLoggedInIsolatedWorldsAttrAttributeSetterCallbackForMainWorl d(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbac kInfo<void>& info)
2587 { 2620 {
2588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2621 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2589 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW orld(jsValue, info); 2622 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttributeSetterForMainW orld(jsValue, info);
2590 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2623 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2591 } 2624 }
2592 2625
2593 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 2626 static void activityLoggedAttrSetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2594 { 2627 {
2595 TestObj* imp = V8TestObject::toNative(info.Holder()); 2628 TestObj* imp = V8TestObject::toNative(info.Holder());
2596 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1()); 2629 v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1());
2597 } 2630 }
2598 2631
2599 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2632 static void activityLoggedAttrSetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2600 { 2633 {
2601 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2602 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(info); 2635 TestObjV8Internal::activityLoggedAttrSetter1AttributeGetter(info);
2603 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2604 } 2637 }
2605 2638
2606 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2639 static void activityLoggedAttrSetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2607 { 2640 {
2641 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter1", "TestObject", info.Holder(), info.GetIsolate());
2608 TestObj* imp = V8TestObject::toNative(info.Holder()); 2642 TestObj* imp = V8TestObject::toNative(info.Holder());
2609 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2643 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2610 imp->setActivityLoggedAttrSetter1(cppValue); 2644 imp->setActivityLoggedAttrSetter1(cppValue);
2611 } 2645 }
2612 2646
2613 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2647 static void activityLoggedAttrSetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2614 { 2648 {
2615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2616 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2650 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2617 if (contextData && contextData->activityLogger()) { 2651 if (contextData && contextData->activityLogger()) {
2618 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2652 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2619 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1 ", 1, &loggerArg[0], "Setter"); 2653 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1 ", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2630 2664
2631 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2665 static void activityLoggedAttrSetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2632 { 2666 {
2633 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2667 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2634 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(info); 2668 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetter(info);
2635 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2669 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2636 } 2670 }
2637 2671
2638 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2672 static void activityLoggedAttrSetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2639 { 2673 {
2674 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter2", "TestObject", info.Holder(), info.GetIsolate());
2640 TestObj* imp = V8TestObject::toNative(info.Holder()); 2675 TestObj* imp = V8TestObject::toNative(info.Holder());
2641 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2676 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2642 imp->setActivityLoggedAttrSetter2(cppValue); 2677 imp->setActivityLoggedAttrSetter2(cppValue);
2643 } 2678 }
2644 2679
2645 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2680 static void activityLoggedAttrSetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2646 { 2681 {
2647 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2682 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2648 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2683 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2649 if (contextData && contextData->activityLogger()) { 2684 if (contextData && contextData->activityLogger()) {
2650 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2685 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2651 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter"); 2686 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2662 2697
2663 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2698 static void activityLoggedAttrSetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2664 { 2699 {
2665 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2700 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2666 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(info ); 2701 TestObjV8Internal::activityLoggedAttrSetter2AttributeGetterForMainWorld(info );
2667 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2702 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2668 } 2703 }
2669 2704
2670 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 2705 static void activityLoggedAttrSetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
2671 { 2706 {
2707 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrSetter2", "TestObject", info.Holder(), info.GetIsolate());
2672 TestObj* imp = V8TestObject::toNative(info.Holder()); 2708 TestObj* imp = V8TestObject::toNative(info.Holder());
2673 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2709 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2674 imp->setActivityLoggedAttrSetter2(cppValue); 2710 imp->setActivityLoggedAttrSetter2(cppValue);
2675 } 2711 }
2676 2712
2677 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 2713 static void activityLoggedAttrSetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
2678 { 2714 {
2679 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2680 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2716 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2681 if (contextData && contextData->activityLogger()) { 2717 if (contextData && contextData->activityLogger()) {
2682 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2718 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2683 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter"); 2719 contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2 ", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2694 2730
2695 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2731 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2696 { 2732 {
2697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2733 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2698 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(i nfo); 2734 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetter(i nfo);
2699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2735 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2700 } 2736 }
2701 2737
2702 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2738 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2703 { 2739 {
2740 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate());
2704 TestObj* imp = V8TestObject::toNative(info.Holder()); 2741 TestObj* imp = V8TestObject::toNative(info.Holder());
2705 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2742 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2706 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); 2743 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue);
2707 } 2744 }
2708 2745
2709 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 2746 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
2710 { 2747 {
2711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2748 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2712 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2749 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2713 if (contextData && contextData->activityLogger()) { 2750 if (contextData && contextData->activityLogger()) {
2714 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 2751 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2715 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrSetter", 1, &loggerArg[0], "Setter"); 2752 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrSetter", 1, &loggerArg[0], "Setter");
(...skipping 10 matching lines...) Expand all
2726 2763
2727 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2764 static void activityLoggedInIsolatedWorldsAttrSetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2728 { 2765 {
2729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2766 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2730 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo rMainWorld(info); 2767 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeGetterFo rMainWorld(info);
2731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2768 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2732 } 2769 }
2733 2770
2734 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2771 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2735 { 2772 {
2773 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrSetter", "TestObject", info.Holder(), info.GetIsolate());
2736 TestObj* imp = V8TestObject::toNative(info.Holder()); 2774 TestObj* imp = V8TestObject::toNative(info.Holder());
2737 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2775 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2738 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue); 2776 imp->setActivityLoggedInIsolatedWorldsAttrSetter(cppValue);
2739 } 2777 }
2740 2778
2741 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info) 2779 static void activityLoggedInIsolatedWorldsAttrSetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info)
2742 { 2780 {
2743 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2744 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo rMainWorld(jsValue, info); 2782 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttributeSetterFo rMainWorld(jsValue, info);
2745 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2746 } 2784 }
2747 2785
2748 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 2786 static void activityLoggedAttrGetter1AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2749 { 2787 {
2750 TestObj* imp = V8TestObject::toNative(info.Holder()); 2788 TestObj* imp = V8TestObject::toNative(info.Holder());
2751 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1()); 2789 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1());
2752 } 2790 }
2753 2791
2754 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2792 static void activityLoggedAttrGetter1AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2755 { 2793 {
2756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2757 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2795 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2758 if (contextData && contextData->activityLogger()) 2796 if (contextData && contextData->activityLogger())
2759 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1 ", 0, 0, "Getter"); 2797 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1 ", 0, 0, "Getter");
2760 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(info); 2798 TestObjV8Internal::activityLoggedAttrGetter1AttributeGetter(info);
2761 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2799 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2762 } 2800 }
2763 2801
2764 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2802 static void activityLoggedAttrGetter1AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2765 { 2803 {
2804 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter1", "TestObject", info.Holder(), info.GetIsolate());
2766 TestObj* imp = V8TestObject::toNative(info.Holder()); 2805 TestObj* imp = V8TestObject::toNative(info.Holder());
2767 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2806 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2768 imp->setActivityLoggedAttrGetter1(cppValue); 2807 imp->setActivityLoggedAttrGetter1(cppValue);
2769 } 2808 }
2770 2809
2771 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2810 static void activityLoggedAttrGetter1AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2772 { 2811 {
2773 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2774 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info); 2813 TestObjV8Internal::activityLoggedAttrGetter1AttributeSetter(jsValue, info);
2775 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2776 } 2815 }
2777 2816
2778 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 2817 static void activityLoggedAttrGetter2AttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2779 { 2818 {
2780 TestObj* imp = V8TestObject::toNative(info.Holder()); 2819 TestObj* imp = V8TestObject::toNative(info.Holder());
2781 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); 2820 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2());
2782 } 2821 }
2783 2822
2784 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 2823 static void activityLoggedAttrGetter2AttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2785 { 2824 {
2786 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2787 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2826 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2788 if (contextData && contextData->activityLogger()) 2827 if (contextData && contextData->activityLogger())
2789 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter"); 2828 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter");
2790 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(info); 2829 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetter(info);
2791 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2830 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2792 } 2831 }
2793 2832
2794 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 2833 static void activityLoggedAttrGetter2AttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
2795 { 2834 {
2835 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter2", "TestObject", info.Holder(), info.GetIsolate());
2796 TestObj* imp = V8TestObject::toNative(info.Holder()); 2836 TestObj* imp = V8TestObject::toNative(info.Holder());
2797 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2837 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2798 imp->setActivityLoggedAttrGetter2(cppValue); 2838 imp->setActivityLoggedAttrGetter2(cppValue);
2799 } 2839 }
2800 2840
2801 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2841 static void activityLoggedAttrGetter2AttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2802 { 2842 {
2803 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2843 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2804 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info); 2844 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetter(jsValue, info);
2805 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2806 } 2846 }
2807 2847
2808 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope rtyCallbackInfo<v8::Value>& info) 2848 static void activityLoggedAttrGetter2AttributeGetterForMainWorld(const v8::Prope rtyCallbackInfo<v8::Value>& info)
2809 { 2849 {
2810 TestObj* imp = V8TestObject::toNative(info.Holder()); 2850 TestObj* imp = V8TestObject::toNative(info.Holder());
2811 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2()); 2851 v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2());
2812 } 2852 }
2813 2853
2814 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2854 static void activityLoggedAttrGetter2AttributeGetterCallbackForMainWorld(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2815 { 2855 {
2816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2817 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2857 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2818 if (contextData && contextData->activityLogger()) 2858 if (contextData && contextData->activityLogger())
2819 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter"); 2859 contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2 ", 0, 0, "Getter");
2820 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(info ); 2860 TestObjV8Internal::activityLoggedAttrGetter2AttributeGetterForMainWorld(info );
2821 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2861 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2822 } 2862 }
2823 2863
2824 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 2864 static void activityLoggedAttrGetter2AttributeSetterForMainWorld(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
2825 { 2865 {
2866 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged AttrGetter2", "TestObject", info.Holder(), info.GetIsolate());
2826 TestObj* imp = V8TestObject::toNative(info.Holder()); 2867 TestObj* imp = V8TestObject::toNative(info.Holder());
2827 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2868 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2828 imp->setActivityLoggedAttrGetter2(cppValue); 2869 imp->setActivityLoggedAttrGetter2(cppValue);
2829 } 2870 }
2830 2871
2831 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 2872 static void activityLoggedAttrGetter2AttributeSetterCallbackForMainWorld(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
2832 { 2873 {
2833 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2834 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(jsVa lue, info); 2875 TestObjV8Internal::activityLoggedAttrGetter2AttributeSetterForMainWorld(jsVa lue, info);
2835 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2836 } 2877 }
2837 2878
2838 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info) 2879 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info)
2839 { 2880 {
2840 TestObj* imp = V8TestObject::toNative(info.Holder()); 2881 TestObj* imp = V8TestObject::toNative(info.Holder());
2841 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); 2882 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter());
2842 } 2883 }
2843 2884
2844 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2885 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2845 { 2886 {
2846 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2887 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2847 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 2888 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2848 if (contextData && contextData->activityLogger()) 2889 if (contextData && contextData->activityLogger())
2849 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrGetter", 0, 0, "Getter"); 2890 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldsAttrGetter", 0, 0, "Getter");
2850 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(i nfo); 2891 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetter(i nfo);
2851 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2852 } 2893 }
2853 2894
2854 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2895 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2855 { 2896 {
2897 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate());
2856 TestObj* imp = V8TestObject::toNative(info.Holder()); 2898 TestObj* imp = V8TestObject::toNative(info.Holder());
2857 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2899 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2858 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); 2900 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue);
2859 } 2901 }
2860 2902
2861 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 2903 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
2862 { 2904 {
2863 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2905 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2864 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(j sValue, info); 2906 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetter(j sValue, info);
2865 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2907 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2866 } 2908 }
2867 2909
2868 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld( const v8::PropertyCallbackInfo<v8::Value>& info) 2910 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterForMainWorld( const v8::PropertyCallbackInfo<v8::Value>& info)
2869 { 2911 {
2870 TestObj* imp = V8TestObject::toNative(info.Holder()); 2912 TestObj* imp = V8TestObject::toNative(info.Holder());
2871 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter()); 2913 v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter());
2872 } 2914 }
2873 2915
2874 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 2916 static void activityLoggedInIsolatedWorldsAttrGetterAttributeGetterCallbackForMa inWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2875 { 2917 {
2876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2918 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2877 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo rMainWorld(info); 2919 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeGetterFo rMainWorld(info);
2878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2920 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2879 } 2921 }
2880 2922
2881 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2923 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterForMainWorld( v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2882 { 2924 {
2925 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLogged InIsolatedWorldsAttrGetter", "TestObject", info.Holder(), info.GetIsolate());
2883 TestObj* imp = V8TestObject::toNative(info.Holder()); 2926 TestObj* imp = V8TestObject::toNative(info.Holder());
2884 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2927 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2885 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue); 2928 imp->setActivityLoggedInIsolatedWorldsAttrGetter(cppValue);
2886 } 2929 }
2887 2930
2888 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info) 2931 static void activityLoggedInIsolatedWorldsAttrGetterAttributeSetterCallbackForMa inWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyC allbackInfo<void>& info)
2889 { 2932 {
2890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2933 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2891 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo rMainWorld(jsValue, info); 2934 TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttributeSetterFo rMainWorld(jsValue, info);
2892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2935 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2893 } 2936 }
2894 2937
(...skipping 18 matching lines...) Expand all
2913 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 2956 static void deprecatedStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
2914 { 2957 {
2915 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 2958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2916 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute); 2959 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute);
2917 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(info); 2960 TestObjV8Internal::deprecatedStaticAttrAttributeGetter(info);
2918 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2961 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2919 } 2962 }
2920 2963
2921 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 2964 static void deprecatedStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
2922 { 2965 {
2923 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 2966 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedStat icAttr", "TestObject", info.Holder(), info.GetIsolate());
2967 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2924 TestObj::setDeprecatedStaticAttr(cppValue); 2968 TestObj::setDeprecatedStaticAttr(cppValue);
2925 } 2969 }
2926 2970
2927 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 2971 static void deprecatedStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2928 { 2972 {
2929 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 2973 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2930 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute); 2974 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::StaticAtt ribute);
2931 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info); 2975 TestObjV8Internal::deprecatedStaticAttrAttributeSetter(jsValue, info);
2932 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 2976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2933 } 2977 }
(...skipping 21 matching lines...) Expand all
2955 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info) 2999 static void deprecatedAttrAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
2956 { 3000 {
2957 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 3001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2958 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute ); 3002 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute );
2959 TestObjV8Internal::deprecatedAttrAttributeGetter(info); 3003 TestObjV8Internal::deprecatedAttrAttributeGetter(info);
2960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3004 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2961 } 3005 }
2962 3006
2963 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info) 3007 static void deprecatedAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8 ::PropertyCallbackInfo<void>& info)
2964 { 3008 {
3009 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedAttr ", "TestObject", info.Holder(), info.GetIsolate());
2965 TestObj* imp = V8TestObject::toNative(info.Holder()); 3010 TestObj* imp = V8TestObject::toNative(info.Holder());
2966 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); 3011 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
2967 imp->setDeprecatedAttr(cppValue); 3012 imp->setDeprecatedAttr(cppValue);
2968 } 3013 }
2969 3014
2970 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 3015 static void deprecatedAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2971 { 3016 {
2972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 3017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2973 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute ); 3018 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Attribute );
2974 TestObjV8Internal::deprecatedAttrAttributeSetter(jsValue, info); 3019 TestObjV8Internal::deprecatedAttrAttributeSetter(jsValue, info);
2975 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3020 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
2976 } 3021 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
3063 3108
3064 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 3109 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3065 { 3110 {
3066 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3067 TestObjV8Internal::voidMethodMethod(info); 3112 TestObjV8Internal::voidMethodMethod(info);
3068 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3113 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3069 } 3114 }
3070 3115
3071 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3116 static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3072 { 3117 {
3118 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodW ithArgs", "TestObject", info.Holder(), info.GetIsolate());
3073 if (UNLIKELY(info.Length() < 3)) { 3119 if (UNLIKELY(info.Length() < 3)) {
3074 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate()); 3120 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
3121 exceptionState.throwIfNeeded();
3075 return; 3122 return;
3076 } 3123 }
3077 TestObj* imp = V8TestObject::toNative(info.Holder()); 3124 TestObj* imp = V8TestObject::toNative(info.Holder());
3078 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3125 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
3079 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3126 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
3080 if (info.Length() <= 2 || !info[2]->IsFunction()) { 3127 if (info.Length() <= 2 || !info[2]->IsFunction()) {
3081 throwTypeError(ExceptionMessages::failedToExecute("voidMethodWithArgs", "TestObject", "The callback provided as parameter 3 is not a function."), info.G etIsolate()); 3128 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
3129 exceptionState.throwIfNeeded();
3082 return; 3130 return;
3083 } 3131 }
3084 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext()); 3132 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext());
3085 imp->voidMethodWithArgs(longArg, strArg, objArg.release()); 3133 imp->voidMethodWithArgs(longArg, strArg, objArg.release());
3086 } 3134 }
3087 3135
3088 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3136 static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
3089 { 3137 {
3090 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3091 TestObjV8Internal::voidMethodWithArgsMethod(info); 3139 TestObjV8Internal::voidMethodWithArgsMethod(info);
3092 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3093 } 3141 }
3094 3142
3095 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3143 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3096 { 3144 {
3097 TestObj* imp = V8TestObject::toNative(info.Holder()); 3145 TestObj* imp = V8TestObject::toNative(info.Holder());
3098 v8SetReturnValueInt(info, imp->longMethod()); 3146 v8SetReturnValueInt(info, imp->longMethod());
3099 } 3147 }
3100 3148
3101 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 3149 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3102 { 3150 {
3103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3151 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3104 TestObjV8Internal::longMethodMethod(info); 3152 TestObjV8Internal::longMethodMethod(info);
3105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3153 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3106 } 3154 }
3107 3155
3108 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3156 static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3109 { 3157 {
3158 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodW ithArgs", "TestObject", info.Holder(), info.GetIsolate());
3110 if (UNLIKELY(info.Length() < 3)) { 3159 if (UNLIKELY(info.Length() < 3)) {
3111 throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.Get Isolate()); 3160 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
3161 exceptionState.throwIfNeeded();
3112 return; 3162 return;
3113 } 3163 }
3114 TestObj* imp = V8TestObject::toNative(info.Holder()); 3164 TestObj* imp = V8TestObject::toNative(info.Holder());
3115 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3165 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
3116 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3166 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
3117 if (info.Length() <= 2 || !info[2]->IsFunction()) { 3167 if (info.Length() <= 2 || !info[2]->IsFunction()) {
3118 throwTypeError(ExceptionMessages::failedToExecute("longMethodWithArgs", "TestObject", "The callback provided as parameter 3 is not a function."), info.G etIsolate()); 3168 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
3169 exceptionState.throwIfNeeded();
3119 return; 3170 return;
3120 } 3171 }
3121 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext()); 3172 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext());
3122 v8SetReturnValueInt(info, imp->longMethodWithArgs(longArg, strArg, objArg.re lease())); 3173 v8SetReturnValueInt(info, imp->longMethodWithArgs(longArg, strArg, objArg.re lease()));
3123 } 3174 }
3124 3175
3125 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 3176 static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
3126 { 3177 {
3127 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3178 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3128 TestObjV8Internal::longMethodWithArgsMethod(info); 3179 TestObjV8Internal::longMethodWithArgsMethod(info);
3129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3130 } 3181 }
3131 3182
3132 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 3183 static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3133 { 3184 {
3134 TestObj* imp = V8TestObject::toNative(info.Holder()); 3185 TestObj* imp = V8TestObject::toNative(info.Holder());
3135 v8SetReturnValue(info, imp->objMethod()); 3186 v8SetReturnValue(info, imp->objMethod());
3136 } 3187 }
3137 3188
3138 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3189 static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3139 { 3190 {
3140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3191 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3141 UseCounter::count(activeExecutionContext(), UseCounter::TestFeature); 3192 UseCounter::count(activeExecutionContext(), UseCounter::TestFeature);
3142 TestObjV8Internal::objMethodMethod(info); 3193 TestObjV8Internal::objMethodMethod(info);
3143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3144 } 3195 }
3145 3196
3146 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 3197 static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
3147 { 3198 {
3199 ExceptionState exceptionState(ExceptionState::ExecutionContext, "objMethodWi thArgs", "TestObject", info.Holder(), info.GetIsolate());
3148 if (UNLIKELY(info.Length() < 3)) { 3200 if (UNLIKELY(info.Length() < 3)) {
3149 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetI solate()); 3201 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
3202 exceptionState.throwIfNeeded();
3150 return; 3203 return;
3151 } 3204 }
3152 TestObj* imp = V8TestObject::toNative(info.Holder()); 3205 TestObj* imp = V8TestObject::toNative(info.Holder());
3153 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3206 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
3154 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]); 3207 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[1]);
3155 if (info.Length() <= 2 || !info[2]->IsFunction()) { 3208 if (info.Length() <= 2 || !info[2]->IsFunction()) {
3156 throwTypeError(ExceptionMessages::failedToExecute("objMethodWithArgs", " TestObject", "The callback provided as parameter 3 is not a function."), info.Ge tIsolate()); 3209 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
3210 exceptionState.throwIfNeeded();
3157 return; 3211 return;
3158 } 3212 }
3159 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext()); 3213 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[2]), getExecutionContext());
3160 v8SetReturnValue(info, imp->objMethodWithArgs(longArg, strArg, objArg.releas e())); 3214 v8SetReturnValue(info, imp->objMethodWithArgs(longArg, strArg, objArg.releas e()));
3161 } 3215 }
3162 3216
3163 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 3217 static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
3164 { 3218 {
3165 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3219 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3166 TestObjV8Internal::objMethodWithArgsMethod(info); 3220 TestObjV8Internal::objMethodWithArgsMethod(info);
(...skipping 13 matching lines...) Expand all
3180 3234
3181 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 3235 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
3182 { 3236 {
3183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3237 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3184 TestObjV8Internal::methodWithSequenceArgMethod(info); 3238 TestObjV8Internal::methodWithSequenceArgMethod(info);
3185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3186 } 3240 }
3187 3241
3188 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 3242 static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
3189 { 3243 {
3244 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodRetur ningSequence", "TestObject", info.Holder(), info.GetIsolate());
3190 if (UNLIKELY(info.Length() < 1)) { 3245 if (UNLIKELY(info.Length() < 1)) {
3191 throwTypeError(ExceptionMessages::failedToExecute("methodReturningSequen ce", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 3246 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3247 exceptionState.throwIfNeeded();
3192 return; 3248 return;
3193 } 3249 }
3194 TestObj* imp = V8TestObject::toNative(info.Holder()); 3250 TestObj* imp = V8TestObject::toNative(info.Holder());
3195 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 3251 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
3196 v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.G etIsolate())); 3252 v8SetReturnValue(info, v8Array(imp->methodReturningSequence(longArg), info.G etIsolate()));
3197 } 3253 }
3198 3254
3199 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 3255 static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
3200 { 3256 {
3201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3202 TestObjV8Internal::methodReturningSequenceMethod(info); 3258 TestObjV8Internal::methodReturningSequenceMethod(info);
3203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3204 } 3260 }
3205 3261
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3626 3682
3627 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 3683 static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
3628 { 3684 {
3629 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3685 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3630 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(info); 3686 TestObjV8Internal::withActiveWindowAndFirstWindowMethod(info);
3631 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3687 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3632 } 3688 }
3633 3689
3634 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 3690 static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
3635 { 3691 {
3692 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithO ptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3636 TestObj* imp = V8TestObject::toNative(info.Holder()); 3693 TestObj* imp = V8TestObject::toNative(info.Holder());
3637 if (UNLIKELY(info.Length() <= 0)) { 3694 if (UNLIKELY(info.Length() <= 0)) {
3638 imp->methodWithOptionalArg(); 3695 imp->methodWithOptionalArg();
3639 return; 3696 return;
3640 } 3697 }
3641 V8TRYCATCH_VOID(int, opt, toInt32(info[0])); 3698 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[0], exceptionState), except ionState);
3642 imp->methodWithOptionalArg(opt); 3699 imp->methodWithOptionalArg(opt);
3643 } 3700 }
3644 3701
3645 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 3702 static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
3646 { 3703 {
3647 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3648 TestObjV8Internal::methodWithOptionalArgMethod(info); 3705 TestObjV8Internal::methodWithOptionalArgMethod(info);
3649 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3650 } 3707 }
3651 3708
3652 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 3709 static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
3653 { 3710 {
3711 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onOptionalArgAndOptionalArg", "TestObject", info.Holder(), info.GetIsolate());
3654 if (UNLIKELY(info.Length() < 1)) { 3712 if (UNLIKELY(info.Length() < 1)) {
3655 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndOptionalArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info. Length())), info.GetIsolate()); 3713 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3714 exceptionState.throwIfNeeded();
3656 return; 3715 return;
3657 } 3716 }
3658 TestObj* imp = V8TestObject::toNative(info.Holder()); 3717 TestObj* imp = V8TestObject::toNative(info.Holder());
3659 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); 3718 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc eptionState);
3660 if (UNLIKELY(info.Length() <= 1)) { 3719 if (UNLIKELY(info.Length() <= 1)) {
3661 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); 3720 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
3662 return; 3721 return;
3663 } 3722 }
3664 V8TRYCATCH_VOID(int, opt, toInt32(info[1])); 3723 V8TRYCATCH_EXCEPTION_VOID(int, opt, toInt32(info[1], exceptionState), except ionState);
3665 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); 3724 imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
3666 } 3725 }
3667 3726
3668 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 3727 static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
3669 { 3728 {
3670 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3671 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info); 3730 TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(info);
3672 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3673 } 3732 }
3674 3733
3675 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& info) 3734 static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
3676 { 3735 {
3736 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onOptionalArgAndTwoOptionalArgs", "TestObject", info.Holder(), info.GetIsolate() );
3677 if (UNLIKELY(info.Length() < 1)) { 3737 if (UNLIKELY(info.Length() < 1)) {
3678 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonOptional ArgAndTwoOptionalArgs", "TestObject", ExceptionMessages::notEnoughArguments(1, i nfo.Length())), info.GetIsolate()); 3738 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3739 exceptionState.throwIfNeeded();
3679 return; 3740 return;
3680 } 3741 }
3681 TestObj* imp = V8TestObject::toNative(info.Holder()); 3742 TestObj* imp = V8TestObject::toNative(info.Holder());
3682 V8TRYCATCH_VOID(int, nonOpt, toInt32(info[0])); 3743 V8TRYCATCH_EXCEPTION_VOID(int, nonOpt, toInt32(info[0], exceptionState), exc eptionState);
3683 if (UNLIKELY(info.Length() <= 1)) { 3744 if (UNLIKELY(info.Length() <= 1)) {
3684 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); 3745 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
3685 return; 3746 return;
3686 } 3747 }
3687 V8TRYCATCH_VOID(int, opt1, toInt32(info[1])); 3748 V8TRYCATCH_EXCEPTION_VOID(int, opt1, toInt32(info[1], exceptionState), excep tionState);
3688 if (UNLIKELY(info.Length() <= 2)) { 3749 if (UNLIKELY(info.Length() <= 2)) {
3689 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); 3750 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
3690 return; 3751 return;
3691 } 3752 }
3692 V8TRYCATCH_VOID(int, opt2, toInt32(info[2])); 3753 V8TRYCATCH_EXCEPTION_VOID(int, opt2, toInt32(info[2], exceptionState), excep tionState);
3693 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); 3754 imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
3694 } 3755 }
3695 3756
3696 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 3757 static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
3697 { 3758 {
3698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3759 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3699 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info); 3760 TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(info);
3700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3761 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3701 } 3762 }
3702 3763
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
3763 3824
3764 static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 3825 static void methodWithCallbackInterfaceArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
3765 { 3826 {
3766 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3827 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3767 TestObjV8Internal::methodWithCallbackInterfaceArgMethod(info); 3828 TestObjV8Internal::methodWithCallbackInterfaceArgMethod(info);
3768 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3829 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3769 } 3830 }
3770 3831
3771 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 3832 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
3772 { 3833 {
3834 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN onCallbackArgAndCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsol ate());
3773 if (UNLIKELY(info.Length() < 2)) { 3835 if (UNLIKELY(info.Length() < 2)) {
3774 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments (2, info.Length())), info.GetIsolate()); 3836 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
3837 exceptionState.throwIfNeeded();
3775 return; 3838 return;
3776 } 3839 }
3777 TestObj* imp = V8TestObject::toNative(info.Holder()); 3840 TestObj* imp = V8TestObject::toNative(info.Holder());
3778 V8TRYCATCH_VOID(int, nonCallback, toInt32(info[0])); 3841 V8TRYCATCH_EXCEPTION_VOID(int, nonCallback, toInt32(info[0], exceptionState) , exceptionState);
3779 if (info.Length() <= 1 || !info[1]->IsFunction()) { 3842 if (info.Length() <= 1 || !info[1]->IsFunction()) {
3780 throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallback ArgAndCallbackInterfaceArg", "TestObject", "The callback provided as parameter 2 is not a function."), info.GetIsolate()); 3843 exceptionState.throwTypeError("The callback provided as parameter 2 is n ot a function.");
3844 exceptionState.throwIfNeeded();
3781 return; 3845 return;
3782 } 3846 }
3783 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c reate(v8::Handle<v8::Function>::Cast(info[1]), getExecutionContext()); 3847 OwnPtr<TestCallbackInterface> callbackInterface = V8TestCallbackInterface::c reate(v8::Handle<v8::Function>::Cast(info[1]), getExecutionContext());
3784 imp->methodWithNonCallbackArgAndCallbackInterfaceArg(nonCallback, callbackIn terface.release()); 3848 imp->methodWithNonCallbackArgAndCallbackInterfaceArg(nonCallback, callbackIn terface.release());
3785 } 3849 }
3786 3850
3787 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 3851 static void methodWithNonCallbackArgAndCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3788 { 3852 {
3789 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3790 TestObjV8Internal::methodWithNonCallbackArgAndCallbackInterfaceArgMethod(inf o); 3854 TestObjV8Internal::methodWithNonCallbackArgAndCallbackInterfaceArgMethod(inf o);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
3870 3934
3871 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3935 static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3872 { 3936 {
3873 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3937 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3874 TestObjV8Internal::staticMethodWithCallbackArgMethod(info); 3938 TestObjV8Internal::staticMethodWithCallbackArgMethod(info);
3875 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3939 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3876 } 3940 }
3877 3941
3878 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 3942 static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
3879 { 3943 {
3944 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt8", "TestObject", info.Holder(), info.GetIsolate());
3880 if (UNLIKELY(info.Length() < 1)) { 3945 if (UNLIKELY(info.Length() < 1)) {
3881 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3946 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3947 exceptionState.throwIfNeeded();
3882 return; 3948 return;
3883 } 3949 }
3884 TestObj* imp = V8TestObject::toNative(info.Holder()); 3950 TestObj* imp = V8TestObject::toNative(info.Holder());
3885 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(info[0], EnforceRange, ok) , info.GetIsolate()); 3951 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt8(info[0], EnforceRange, exceptio nState), exceptionState);
3886 imp->methodWithEnforceRangeInt8(value); 3952 imp->methodWithEnforceRangeInt8(value);
3887 } 3953 }
3888 3954
3889 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 3955 static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
3890 { 3956 {
3891 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3957 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3892 TestObjV8Internal::methodWithEnforceRangeInt8Method(info); 3958 TestObjV8Internal::methodWithEnforceRangeInt8Method(info);
3893 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3959 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3894 } 3960 }
3895 3961
3896 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3962 static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3897 { 3963 {
3964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt8", "TestObject", info.Holder(), info.GetIsolate());
3898 if (UNLIKELY(info.Length() < 1)) { 3965 if (UNLIKELY(info.Length() < 1)) {
3899 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt8", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3966 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3967 exceptionState.throwIfNeeded();
3900 return; 3968 return;
3901 } 3969 }
3902 TestObj* imp = V8TestObject::toNative(info.Holder()); 3970 TestObj* imp = V8TestObject::toNative(info.Holder());
3903 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(info[0], EnforceRang e, ok), info.GetIsolate()); 3971 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt8(info[0], EnforceRange, ex ceptionState), exceptionState);
3904 imp->methodWithEnforceRangeUInt8(value); 3972 imp->methodWithEnforceRangeUInt8(value);
3905 } 3973 }
3906 3974
3907 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3975 static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3908 { 3976 {
3909 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3977 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3910 TestObjV8Internal::methodWithEnforceRangeUInt8Method(info); 3978 TestObjV8Internal::methodWithEnforceRangeUInt8Method(info);
3911 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3979 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3912 } 3980 }
3913 3981
3914 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 3982 static void methodWithEnforceRangeInt16Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3915 { 3983 {
3984 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt16", "TestObject", info.Holder(), info.GetIsolate());
3916 if (UNLIKELY(info.Length() < 1)) { 3985 if (UNLIKELY(info.Length() < 1)) {
3917 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 3986 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
3987 exceptionState.throwIfNeeded();
3918 return; 3988 return;
3919 } 3989 }
3920 TestObj* imp = V8TestObject::toNative(info.Holder()); 3990 TestObj* imp = V8TestObject::toNative(info.Holder());
3921 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt16(info[0], EnforceRange, ok ), info.GetIsolate()); 3991 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt16(info[0], EnforceRange, excepti onState), exceptionState);
3922 imp->methodWithEnforceRangeInt16(value); 3992 imp->methodWithEnforceRangeInt16(value);
3923 } 3993 }
3924 3994
3925 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 3995 static void methodWithEnforceRangeInt16MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3926 { 3996 {
3927 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 3997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3928 TestObjV8Internal::methodWithEnforceRangeInt16Method(info); 3998 TestObjV8Internal::methodWithEnforceRangeInt16Method(info);
3929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 3999 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3930 } 4000 }
3931 4001
3932 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4002 static void methodWithEnforceRangeUInt16Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3933 { 4003 {
4004 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt16", "TestObject", info.Holder(), info.GetIsolate());
3934 if (UNLIKELY(info.Length() < 1)) { 4005 if (UNLIKELY(info.Length() < 1)) {
3935 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt16", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 4006 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4007 exceptionState.throwIfNeeded();
3936 return; 4008 return;
3937 } 4009 }
3938 TestObj* imp = V8TestObject::toNative(info.Holder()); 4010 TestObj* imp = V8TestObject::toNative(info.Holder());
3939 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt16(info[0], EnforceRan ge, ok), info.GetIsolate()); 4011 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt16(info[0], EnforceRange, e xceptionState), exceptionState);
3940 imp->methodWithEnforceRangeUInt16(value); 4012 imp->methodWithEnforceRangeUInt16(value);
3941 } 4013 }
3942 4014
3943 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 4015 static void methodWithEnforceRangeUInt16MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3944 { 4016 {
3945 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3946 TestObjV8Internal::methodWithEnforceRangeUInt16Method(info); 4018 TestObjV8Internal::methodWithEnforceRangeUInt16Method(info);
3947 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3948 } 4020 }
3949 4021
3950 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 4022 static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3951 { 4023 {
4024 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt32", "TestObject", info.Holder(), info.GetIsolate());
3952 if (UNLIKELY(info.Length() < 1)) { 4025 if (UNLIKELY(info.Length() < 1)) {
3953 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 4026 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4027 exceptionState.throwIfNeeded();
3954 return; 4028 return;
3955 } 4029 }
3956 TestObj* imp = V8TestObject::toNative(info.Holder()); 4030 TestObj* imp = V8TestObject::toNative(info.Holder());
3957 V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(info[0], EnforceRange, ok ), info.GetIsolate()); 4031 V8TRYCATCH_EXCEPTION_VOID(int, value, toInt32(info[0], EnforceRange, excepti onState), exceptionState);
3958 imp->methodWithEnforceRangeInt32(value); 4032 imp->methodWithEnforceRangeInt32(value);
3959 } 4033 }
3960 4034
3961 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 4035 static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3962 { 4036 {
3963 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4037 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3964 TestObjV8Internal::methodWithEnforceRangeInt32Method(info); 4038 TestObjV8Internal::methodWithEnforceRangeInt32Method(info);
3965 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4039 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3966 } 4040 }
3967 4041
3968 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4042 static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
3969 { 4043 {
4044 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt32", "TestObject", info.Holder(), info.GetIsolate());
3970 if (UNLIKELY(info.Length() < 1)) { 4045 if (UNLIKELY(info.Length() < 1)) {
3971 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt32", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 4046 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4047 exceptionState.throwIfNeeded();
3972 return; 4048 return;
3973 } 4049 }
3974 TestObj* imp = V8TestObject::toNative(info.Holder()); 4050 TestObj* imp = V8TestObject::toNative(info.Holder());
3975 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(info[0], EnforceRan ge, ok), info.GetIsolate()); 4051 V8TRYCATCH_EXCEPTION_VOID(unsigned, value, toUInt32(info[0], EnforceRange, e xceptionState), exceptionState);
3976 imp->methodWithEnforceRangeUInt32(value); 4052 imp->methodWithEnforceRangeUInt32(value);
3977 } 4053 }
3978 4054
3979 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 4055 static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
3980 { 4056 {
3981 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4057 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3982 TestObjV8Internal::methodWithEnforceRangeUInt32Method(info); 4058 TestObjV8Internal::methodWithEnforceRangeUInt32Method(info);
3983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
3984 } 4060 }
3985 4061
3986 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& info) 4062 static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8: :Value>& info)
3987 { 4063 {
4064 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeInt64", "TestObject", info.Holder(), info.GetIsolate());
3988 if (UNLIKELY(info.Length() < 1)) { 4065 if (UNLIKELY(info.Length() < 1)) {
3989 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); 4066 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4067 exceptionState.throwIfNeeded();
3990 return; 4068 return;
3991 } 4069 }
3992 TestObj* imp = V8TestObject::toNative(info.Holder()); 4070 TestObj* imp = V8TestObject::toNative(info.Holder());
3993 V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(info[0], EnforceRan ge, ok), info.GetIsolate()); 4071 V8TRYCATCH_EXCEPTION_VOID(long long, value, toInt64(info[0], EnforceRange, e xceptionState), exceptionState);
3994 imp->methodWithEnforceRangeInt64(value); 4072 imp->methodWithEnforceRangeInt64(value);
3995 } 4073 }
3996 4074
3997 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 4075 static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
3998 { 4076 {
3999 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4077 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4000 TestObjV8Internal::methodWithEnforceRangeInt64Method(info); 4078 TestObjV8Internal::methodWithEnforceRangeInt64Method(info);
4001 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4079 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4002 } 4080 }
4003 4081
4004 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4082 static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4005 { 4083 {
4084 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithE nforceRangeUInt64", "TestObject", info.Holder(), info.GetIsolate());
4006 if (UNLIKELY(info.Length() < 1)) { 4085 if (UNLIKELY(info.Length() < 1)) {
4007 throwTypeError(ExceptionMessages::failedToExecute("methodWithEnforceRang eUInt64", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate()); 4086 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4087 exceptionState.throwIfNeeded();
4008 return; 4088 return;
4009 } 4089 }
4010 TestObj* imp = V8TestObject::toNative(info.Holder()); 4090 TestObj* imp = V8TestObject::toNative(info.Holder());
4011 V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(info[0], EnforceRange, ok), info.GetIsolate()); 4091 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, value, toUInt64(info[0], Enfor ceRange, exceptionState), exceptionState);
4012 imp->methodWithEnforceRangeUInt64(value); 4092 imp->methodWithEnforceRangeUInt64(value);
4013 } 4093 }
4014 4094
4015 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 4095 static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
4016 { 4096 {
4017 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4097 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4018 TestObjV8Internal::methodWithEnforceRangeUInt64Method(info); 4098 TestObjV8Internal::methodWithEnforceRangeUInt64Method(info);
4019 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4099 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4020 } 4100 }
4021 4101
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
4096 4176
4097 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 4177 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
4098 { 4178 {
4099 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4100 TestObjV8Internal::callbackFunctionArgumentMethod(info); 4180 TestObjV8Internal::callbackFunctionArgumentMethod(info);
4101 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4102 } 4182 }
4103 4183
4104 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4184 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4105 { 4185 {
4186 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethod", "TestObject", info.Holder(), info.GetIsolate());
4106 if (UNLIKELY(info.Length() < 1)) { 4187 if (UNLIKELY(info.Length() < 1)) {
4107 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4188 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4189 exceptionState.throwIfNeeded();
4108 return; 4190 return;
4109 } 4191 }
4110 TestObj* imp = V8TestObject::toNative(info.Holder()); 4192 TestObj* imp = V8TestObject::toNative(info.Holder());
4111 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4193 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4112 imp->overloadedMethod(longArg); 4194 imp->overloadedMethod(longArg);
4113 } 4195 }
4114 4196
4115 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 4197 static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4116 { 4198 {
4117 if (UNLIKELY(info.Length() < 1)) { 4199 if (UNLIKELY(info.Length() < 1)) {
4118 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate()); 4200 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "T estObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIs olate());
4119 return; 4201 return;
4120 } 4202 }
4121 TestObj* imp = V8TestObject::toNative(info.Holder()); 4203 TestObj* imp = V8TestObject::toNative(info.Holder());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
4198 4280
4199 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4281 static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4200 { 4282 {
4201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4283 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4202 TestObjV8Internal::overloadedMethodMethod(info); 4284 TestObjV8Internal::overloadedMethodMethod(info);
4203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4285 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4204 } 4286 }
4205 4287
4206 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4288 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4207 { 4289 {
4290 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObject", info.Holder(), info.GetIsolate());
4208 if (UNLIKELY(info.Length() < 1)) { 4291 if (UNLIKELY(info.Length() < 1)) {
4209 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetI solate()); 4292 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4293 exceptionState.throwIfNeeded();
4210 return; 4294 return;
4211 } 4295 }
4212 TestObj* imp = V8TestObject::toNative(info.Holder()); 4296 TestObj* imp = V8TestObject::toNative(info.Holder());
4213 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { 4297 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
4214 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", "The callback provided as parameter 1 is not a function."), info.Ge tIsolate()); 4298 exceptionState.throwTypeError("The callback provided as parameter 1 is n ot a function.");
4299 exceptionState.throwIfNeeded();
4215 return; 4300 return;
4216 } 4301 }
4217 OwnPtr<TestObject> objArg = info[0]->IsNull() ? nullptr : V8TestObject::crea te(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext()); 4302 OwnPtr<TestObject> objArg = info[0]->IsNull() ? nullptr : V8TestObject::crea te(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext());
4218 if (UNLIKELY(info.Length() <= 1)) { 4303 if (UNLIKELY(info.Length() <= 1)) {
4219 imp->overloadedMethodA(objArg.release()); 4304 imp->overloadedMethodA(objArg.release());
4220 return; 4305 return;
4221 } 4306 }
4222 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4307 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4223 imp->overloadedMethodA(objArg.release(), longArg); 4308 imp->overloadedMethodA(objArg.release(), longArg);
4224 } 4309 }
4225 4310
4226 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 4311 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
4227 { 4312 {
4228 if (UNLIKELY(info.Length() < 2)) { 4313 if (UNLIKELY(info.Length() < 2)) {
4229 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI solate()); 4314 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", " TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetI solate());
4230 return; 4315 return;
4231 } 4316 }
4232 TestObj* imp = V8TestObject::toNative(info.Holder()); 4317 TestObj* imp = V8TestObject::toNative(info.Holder());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
4322 4407
4323 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4408 static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4324 { 4409 {
4325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4410 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4326 TestObjV8Internal::classMethodMethod(info); 4411 TestObjV8Internal::classMethodMethod(info);
4327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4412 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4328 } 4413 }
4329 4414
4330 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 4415 static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4331 { 4416 {
4417 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod WithOptional", "TestObject", info.Holder(), info.GetIsolate());
4332 if (UNLIKELY(info.Length() <= 0)) { 4418 if (UNLIKELY(info.Length() <= 0)) {
4333 v8SetReturnValueInt(info, TestObj::classMethodWithOptional()); 4419 v8SetReturnValueInt(info, TestObj::classMethodWithOptional());
4334 return; 4420 return;
4335 } 4421 }
4336 V8TRYCATCH_VOID(int, arg, toInt32(info[0])); 4422 V8TRYCATCH_EXCEPTION_VOID(int, arg, toInt32(info[0], exceptionState), except ionState);
4337 v8SetReturnValueInt(info, TestObj::classMethodWithOptional(arg)); 4423 v8SetReturnValueInt(info, TestObj::classMethodWithOptional(arg));
4338 } 4424 }
4339 4425
4340 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 4426 static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
4341 { 4427 {
4342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4428 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4343 TestObjV8Internal::classMethodWithOptionalMethod(info); 4429 TestObjV8Internal::classMethodWithOptionalMethod(info);
4344 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4430 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4345 } 4431 }
4346 4432
4347 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 4433 static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
4348 { 4434 {
4349 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4350 V8TestObject::classMethod2MethodCustom(info); 4436 V8TestObject::classMethod2MethodCustom(info);
4351 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4352 } 4438 }
4353 4439
4354 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4440 static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4355 { 4441 {
4442 ExceptionState exceptionState(ExceptionState::ExecutionContext, "classMethod WithClamp", "TestObject", info.Holder(), info.GetIsolate());
4356 if (UNLIKELY(info.Length() < 2)) { 4443 if (UNLIKELY(info.Length() < 2)) {
4357 throwTypeError(ExceptionMessages::failedToExecute("classMethodWithClamp" , "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G etIsolate()); 4444 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4445 exceptionState.throwIfNeeded();
4358 return; 4446 return;
4359 } 4447 }
4360 TestObj* imp = V8TestObject::toNative(info.Holder()); 4448 TestObj* imp = V8TestObject::toNative(info.Holder());
4361 unsigned objArgsShort = 0; 4449 unsigned objArgsShort = 0;
4362 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue()); 4450 V8TRYCATCH_VOID(double, objArgsShortNativeValue, info[0]->NumberValue());
4363 if (!std::isnan(objArgsShortNativeValue)) 4451 if (!std::isnan(objArgsShortNativeValue))
4364 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue); 4452 objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
4365 unsigned objArgsLong = 0; 4453 unsigned objArgsLong = 0;
4366 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue()); 4454 V8TRYCATCH_VOID(double, objArgsLongNativeValue, info[1]->NumberValue());
4367 if (!std::isnan(objArgsLongNativeValue)) 4455 if (!std::isnan(objArgsLongNativeValue))
4368 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue); 4456 objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
4369 imp->classMethodWithClamp(objArgsShort, objArgsLong); 4457 imp->classMethodWithClamp(objArgsShort, objArgsLong);
4370 } 4458 }
4371 4459
4372 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4460 static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4373 { 4461 {
4374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4462 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4375 TestObjV8Internal::classMethodWithClampMethod(info); 4463 TestObjV8Internal::classMethodWithClampMethod(info);
4376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4464 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4377 } 4465 }
4378 4466
4379 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4467 static void enabledAtRuntimeMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4380 { 4468 {
4469 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledAtRu ntimeMethod", "TestObject", info.Holder(), info.GetIsolate());
4381 if (UNLIKELY(info.Length() < 1)) { 4470 if (UNLIKELY(info.Length() < 1)) {
4382 throwTypeError(ExceptionMessages::failedToExecute("enabledAtRuntimeMetho d", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info .GetIsolate()); 4471 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4472 exceptionState.throwIfNeeded();
4383 return; 4473 return;
4384 } 4474 }
4385 TestObj* imp = V8TestObject::toNative(info.Holder()); 4475 TestObj* imp = V8TestObject::toNative(info.Holder());
4386 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4476 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4387 imp->enabledAtRuntimeMethod(longArg); 4477 imp->enabledAtRuntimeMethod(longArg);
4388 } 4478 }
4389 4479
4390 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 4480 static void enabledAtRuntimeMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4391 { 4481 {
4392 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4482 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4393 TestObjV8Internal::enabledAtRuntimeMethodMethod(info); 4483 TestObjV8Internal::enabledAtRuntimeMethodMethod(info);
4394 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4484 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4395 } 4485 }
4396 4486
4397 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 4487 static void enabledPerContextMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4398 { 4488 {
4489 ExceptionState exceptionState(ExceptionState::ExecutionContext, "enabledPerC ontextMethod", "TestObject", info.Holder(), info.GetIsolate());
4399 if (UNLIKELY(info.Length() < 1)) { 4490 if (UNLIKELY(info.Length() < 1)) {
4400 throwTypeError(ExceptionMessages::failedToExecute("enabledPerContextMeth od", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate()); 4491 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4492 exceptionState.throwIfNeeded();
4401 return; 4493 return;
4402 } 4494 }
4403 TestObj* imp = V8TestObject::toNative(info.Holder()); 4495 TestObj* imp = V8TestObject::toNative(info.Holder());
4404 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4496 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4405 imp->enabledPerContextMethod(longArg); 4497 imp->enabledPerContextMethod(longArg);
4406 } 4498 }
4407 4499
4408 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 4500 static void enabledPerContextMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
4409 { 4501 {
4410 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4502 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4411 TestObjV8Internal::enabledPerContextMethodMethod(info); 4503 TestObjV8Internal::enabledPerContextMethodMethod(info);
4412 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4504 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4413 } 4505 }
4414 4506
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
4555 4647
4556 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 4648 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4557 { 4649 {
4558 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4559 TestObjV8Internal::immutablePointFunctionMethod(info); 4651 TestObjV8Internal::immutablePointFunctionMethod(info);
4560 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4561 } 4653 }
4562 4654
4563 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 4655 static void svgPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4564 { 4656 {
4657 ExceptionState exceptionState(ExceptionState::ExecutionContext, "svgPointMet hod", "TestObject", info.Holder(), info.GetIsolate());
4565 if (UNLIKELY(info.Length() < 2)) { 4658 if (UNLIKELY(info.Length() < 2)) {
4566 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", ExceptionMessages::notEnoughArguments(2, info.Length())), info.GetIsol ate()); 4659 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4660 exceptionState.throwIfNeeded();
4567 return; 4661 return;
4568 } 4662 }
4569 TestObj* imp = V8TestObject::toNative(info.Holder()); 4663 TestObj* imp = V8TestObject::toNative(info.Holder());
4570 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); 4664 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);
4571 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); 4665 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState);
4572 if (!item) { 4666 if (!item) {
4573 throwTypeError(ExceptionMessages::failedToExecute("svgPointMethod", "Tes tObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); 4667 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
4668 exceptionState.throwIfNeeded();
4574 return; 4669 return;
4575 } 4670 }
4576 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index)))); 4671 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp- >svgPointMethod(item->propertyReference(), index))));
4577 } 4672 }
4578 4673
4579 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4674 static void svgPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4580 { 4675 {
4581 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4676 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4582 TestObjV8Internal::svgPointMethodMethod(info); 4677 TestObjV8Internal::svgPointMethodMethod(info);
4583 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4584 } 4679 }
4585 4680
4586 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 4681 static void strictSVGPointMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4587 { 4682 {
4588 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestObject", info.Holder(), info.GetIsolate()); 4683 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictSVGPo intMethod", "TestObject", info.Holder(), info.GetIsolate());
4589 if (UNLIKELY(info.Length() < 2)) { 4684 if (UNLIKELY(info.Length() < 2)) {
4590 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 4685 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4591 exceptionState.throwIfNeeded(); 4686 exceptionState.throwIfNeeded();
4592 return; 4687 return;
4593 } 4688 }
4594 TestObj* imp = V8TestObject::toNative(info.Holder()); 4689 TestObj* imp = V8TestObject::toNative(info.Holder());
4595 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8SVGPoint::hasInst ance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))) { 4690 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8SVGPoint::hasInst ance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))) {
4596 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'."); 4691 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
4597 exceptionState.throwIfNeeded(); 4692 exceptionState.throwIfNeeded();
4598 return; 4693 return;
4599 } 4694 }
4600 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); 4695 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);
4601 V8TRYCATCH_VOID(unsigned, index, toUInt32(info[1])); 4696 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[1], exceptionState) , exceptionState);
4602 if (!item) { 4697 if (!item) {
4603 throwTypeError(ExceptionMessages::failedToExecute("strictSVGPointMethod" , "TestObject", "parameter 1 is not of type 'SVGPoint'."), info.GetIsolate()); 4698 exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
4699 exceptionState.throwIfNeeded();
4604 return; 4700 return;
4605 } 4701 }
4606 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , exceptionState); 4702 SVGPoint result = imp->strictSVGPointMethod(item->propertyReference(), index , exceptionState);
4607 if (exceptionState.throwIfNeeded()) 4703 if (exceptionState.throwIfNeeded())
4608 return; 4704 return;
4609 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt))); 4705 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(resu lt)));
4610 } 4706 }
4611 4707
4612 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 4708 static void strictSVGPointMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4613 { 4709 {
(...skipping 19 matching lines...) Expand all
4633 { 4729 {
4634 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct ion", "TestObject", info.Holder(), info.GetIsolate()); 4730 ExceptionState exceptionState(ExceptionState::ExecutionContext, "strictFunct ion", "TestObject", info.Holder(), info.GetIsolate());
4635 if (UNLIKELY(info.Length() < 3)) { 4731 if (UNLIKELY(info.Length() < 3)) {
4636 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length())); 4732 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
4637 exceptionState.throwIfNeeded(); 4733 exceptionState.throwIfNeeded();
4638 return; 4734 return;
4639 } 4735 }
4640 TestObj* imp = V8TestObject::toNative(info.Holder()); 4736 TestObj* imp = V8TestObject::toNative(info.Holder());
4641 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]); 4737 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, info[0]);
4642 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue())); 4738 V8TRYCATCH_VOID(float, a, static_cast<float>(info[1]->NumberValue()));
4643 V8TRYCATCH_VOID(int, b, toInt32(info[2])); 4739 V8TRYCATCH_EXCEPTION_VOID(int, b, toInt32(info[2], exceptionState), exceptio nState);
4644 bool result = imp->strictFunction(str, a, b, exceptionState); 4740 bool result = imp->strictFunction(str, a, b, exceptionState);
4645 if (exceptionState.throwIfNeeded()) 4741 if (exceptionState.throwIfNeeded())
4646 return; 4742 return;
4647 v8SetReturnValueBool(info, result); 4743 v8SetReturnValueBool(info, result);
4648 } 4744 }
4649 4745
4650 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 4746 static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4651 { 4747 {
4652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4748 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4653 TestObjV8Internal::strictFunctionMethod(info); 4749 TestObjV8Internal::strictFunctionMethod(info);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
4713 4809
4714 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 4810 static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
4715 { 4811 {
4716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4717 TestObjV8Internal::variadicNodeMethodMethod(info); 4813 TestObjV8Internal::variadicNodeMethodMethod(info);
4718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4719 } 4815 }
4720 4816
4721 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 4817 static void methodWithNullableArgumentsMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
4722 { 4818 {
4819 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodWithN ullableArguments", "TestObject", info.Holder(), info.GetIsolate());
4723 if (UNLIKELY(info.Length() < 3)) { 4820 if (UNLIKELY(info.Length() < 3)) {
4724 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate()); 4821 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
4822 exceptionState.throwIfNeeded();
4725 return; 4823 return;
4726 } 4824 }
4727 TestObj* imp = V8TestObject::toNative(info.Holder()); 4825 TestObj* imp = V8TestObject::toNative(info.Holder());
4728 bool strIsNull = info[0]->IsNull(); 4826 bool strIsNull = info[0]->IsNull();
4729 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, info[0]); 4827 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strStringResource, info[0]);
4730 String str = strStringResource; 4828 String str = strStringResource;
4731 bool lIsNull = info[1]->IsNull(); 4829 bool lIsNull = info[1]->IsNull();
4732 V8TRYCATCH_VOID(int, l, toInt32(info[1])); 4830 V8TRYCATCH_EXCEPTION_VOID(int, l, toInt32(info[1], exceptionState), exceptio nState);
4733 if (info.Length() <= 2 || !(info[2]->IsFunction() || info[2]->IsNull())) { 4831 if (info.Length() <= 2 || !(info[2]->IsFunction() || info[2]->IsNull())) {
4734 throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableArg uments", "TestObject", "The callback provided as parameter 3 is not a function." ), info.GetIsolate()); 4832 exceptionState.throwTypeError("The callback provided as parameter 3 is n ot a function.");
4833 exceptionState.throwIfNeeded();
4735 return; 4834 return;
4736 } 4835 }
4737 OwnPtr<TestObject> obj = info[2]->IsNull() ? nullptr : V8TestObject::create( v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext()); 4836 OwnPtr<TestObject> obj = info[2]->IsNull() ? nullptr : V8TestObject::create( v8::Handle<v8::Function>::Cast(info[2]), getExecutionContext());
4738 if (UNLIKELY(info.Length() <= 3)) { 4837 if (UNLIKELY(info.Length() <= 3)) {
4739 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj.release()); 4838 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj.release());
4740 return; 4839 return;
4741 } 4840 }
4742 bool dIsNull = info[3]->IsNull(); 4841 bool dIsNull = info[3]->IsNull();
4743 V8TRYCATCH_VOID(double, d, static_cast<double>(info[3]->NumberValue())); 4842 V8TRYCATCH_VOID(double, d, static_cast<double>(info[3]->NumberValue()));
4744 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj .release(), dIsNull ? 0 : &d); 4843 imp->methodWithNullableArguments(strIsNull ? 0 : &str, lIsNull ? 0 : &l, obj .release(), dIsNull ? 0 : &d);
(...skipping 27 matching lines...) Expand all
4772 4871
4773 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& info) 4872 static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackI nfo<v8::Value>& info)
4774 { 4873 {
4775 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4776 TestObjV8Internal::perWorldMethodMethodForMainWorld(info); 4875 TestObjV8Internal::perWorldMethodMethodForMainWorld(info);
4777 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4778 } 4877 }
4779 4878
4780 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 4879 static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
4781 { 4880 {
4881 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4782 if (UNLIKELY(info.Length() < 1)) { 4882 if (UNLIKELY(info.Length() < 1)) {
4783 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 4883 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4884 exceptionState.throwIfNeeded();
4784 return; 4885 return;
4785 } 4886 }
4786 TestObj* imp = V8TestObject::toNative(info.Holder()); 4887 TestObj* imp = V8TestObject::toNative(info.Holder());
4787 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4888 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4788 imp->overloadedPerWorldMethod(longArg); 4889 imp->overloadedPerWorldMethod(longArg);
4789 } 4890 }
4790 4891
4791 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info) 4892 static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info)
4792 { 4893 {
4894 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4793 if (UNLIKELY(info.Length() < 1)) { 4895 if (UNLIKELY(info.Length() < 1)) {
4794 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate()); 4896 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4897 exceptionState.throwIfNeeded();
4795 return; 4898 return;
4796 } 4899 }
4797 TestObj* imp = V8TestObject::toNative(info.Holder()); 4900 TestObj* imp = V8TestObject::toNative(info.Holder());
4798 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4901 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4799 imp->overloadedPerWorldMethod(longArg); 4902 imp->overloadedPerWorldMethod(longArg);
4800 } 4903 }
4801 4904
4802 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 4905 static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
4803 { 4906 {
4907 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4804 if (UNLIKELY(info.Length() < 2)) { 4908 if (UNLIKELY(info.Length() < 2)) {
4805 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate()); 4909 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4910 exceptionState.throwIfNeeded();
4806 return; 4911 return;
4807 } 4912 }
4808 TestObj* imp = V8TestObject::toNative(info.Holder()); 4913 TestObj* imp = V8TestObject::toNative(info.Holder());
4809 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4914 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4810 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4915 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4811 imp->overloadedPerWorldMethod(strArg, longArg); 4916 imp->overloadedPerWorldMethod(strArg, longArg);
4812 } 4917 }
4813 4918
4814 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4919 static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4815 { 4920 {
4816 if (((info.Length() == 1))) { 4921 if (((info.Length() == 1))) {
4817 overloadedPerWorldMethod1Method(info); 4922 overloadedPerWorldMethod1Method(info);
4818 return; 4923 return;
4819 } 4924 }
4820 if (((info.Length() == 2))) { 4925 if (((info.Length() == 2))) {
(...skipping 12 matching lines...) Expand all
4833 4938
4834 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 4939 static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
4835 { 4940 {
4836 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4941 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4837 TestObjV8Internal::overloadedPerWorldMethodMethod(info); 4942 TestObjV8Internal::overloadedPerWorldMethodMethod(info);
4838 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4943 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4839 } 4944 }
4840 4945
4841 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info) 4946 static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallba ckInfo<v8::Value>& info)
4842 { 4947 {
4948 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4843 if (UNLIKELY(info.Length() < 2)) { 4949 if (UNLIKELY(info.Length() < 2)) {
4844 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldMet hod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length())), in fo.GetIsolate()); 4950 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4951 exceptionState.throwIfNeeded();
4845 return; 4952 return;
4846 } 4953 }
4847 TestObj* imp = V8TestObject::toNative(info.Holder()); 4954 TestObj* imp = V8TestObject::toNative(info.Holder());
4848 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 4955 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
4849 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 4956 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
4850 imp->overloadedPerWorldMethod(strArg, longArg); 4957 imp->overloadedPerWorldMethod(strArg, longArg);
4851 } 4958 }
4852 4959
4853 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac kInfo<v8::Value>& info) 4960 static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbac kInfo<v8::Value>& info)
4854 { 4961 {
4855 if (((info.Length() == 1))) { 4962 if (((info.Length() == 1))) {
4856 overloadedPerWorldMethod1MethodForMainWorld(info); 4963 overloadedPerWorldMethod1MethodForMainWorld(info);
4857 return; 4964 return;
4858 } 4965 }
4859 if (((info.Length() == 2))) { 4966 if (((info.Length() == 2))) {
(...skipping 12 matching lines...) Expand all
4872 4979
4873 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info) 4980 static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info)
4874 { 4981 {
4875 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4982 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4876 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(info); 4983 TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(info);
4877 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4984 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4878 } 4985 }
4879 4986
4880 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& info) 4987 static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value >& info)
4881 { 4988 {
4989 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod1", "TestObject", info.Holder(), info.GetIsolate());
4882 if (UNLIKELY(info.Length() < 1)) { 4990 if (UNLIKELY(info.Length() < 1)) {
4883 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod1 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 4991 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4992 exceptionState.throwIfNeeded();
4884 return; 4993 return;
4885 } 4994 }
4886 TestObj* imp = V8TestObject::toNative(info.Holder()); 4995 TestObj* imp = V8TestObject::toNative(info.Holder());
4887 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 4996 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4888 imp->activityLoggedMethod1(longArg); 4997 imp->activityLoggedMethod1(longArg);
4889 } 4998 }
4890 4999
4891 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 5000 static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4892 { 5001 {
4893 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4894 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 5003 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4895 if (contextData && contextData->activityLogger()) { 5004 if (contextData && contextData->activityLogger()) {
4896 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 5005 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4897 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i nfo.Length(), loggerArgs.data(), "Method"); 5006 contextData->activityLogger()->log("TestObject.activityLoggedMethod1", i nfo.Length(), loggerArgs.data(), "Method");
4898 } 5007 }
4899 TestObjV8Internal::activityLoggedMethod1Method(info); 5008 TestObjV8Internal::activityLoggedMethod1Method(info);
4900 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4901 } 5010 }
4902 5011
4903 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& info) 5012 static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value >& info)
4904 { 5013 {
5014 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod2", "TestObject", info.Holder(), info.GetIsolate());
4905 if (UNLIKELY(info.Length() < 1)) { 5015 if (UNLIKELY(info.Length() < 1)) {
4906 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 5016 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5017 exceptionState.throwIfNeeded();
4907 return; 5018 return;
4908 } 5019 }
4909 TestObj* imp = V8TestObject::toNative(info.Holder()); 5020 TestObj* imp = V8TestObject::toNative(info.Holder());
4910 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 5021 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4911 imp->activityLoggedMethod2(longArg); 5022 imp->activityLoggedMethod2(longArg);
4912 } 5023 }
4913 5024
4914 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 5025 static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4915 { 5026 {
4916 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4917 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 5028 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4918 if (contextData && contextData->activityLogger()) { 5029 if (contextData && contextData->activityLogger()) {
4919 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 5030 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4920 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method"); 5031 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method");
4921 } 5032 }
4922 TestObjV8Internal::activityLoggedMethod2Method(info); 5033 TestObjV8Internal::activityLoggedMethod2Method(info);
4923 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4924 } 5035 }
4925 5036
4926 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& info) 5037 static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackIn fo<v8::Value>& info)
4927 { 5038 {
5039 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedMethod2", "TestObject", info.Holder(), info.GetIsolate());
4928 if (UNLIKELY(info.Length() < 1)) { 5040 if (UNLIKELY(info.Length() < 1)) {
4929 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedMethod2 ", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())), info. GetIsolate()); 5041 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5042 exceptionState.throwIfNeeded();
4930 return; 5043 return;
4931 } 5044 }
4932 TestObj* imp = V8TestObject::toNative(info.Holder()); 5045 TestObj* imp = V8TestObject::toNative(info.Holder());
4933 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 5046 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4934 imp->activityLoggedMethod2(longArg); 5047 imp->activityLoggedMethod2(longArg);
4935 } 5048 }
4936 5049
4937 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa llbackInfo<v8::Value>& info) 5050 static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCa llbackInfo<v8::Value>& info)
4938 { 5051 {
4939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5052 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4940 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 5053 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4941 if (contextData && contextData->activityLogger()) { 5054 if (contextData && contextData->activityLogger()) {
4942 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);
4943 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method"); 5056 contextData->activityLogger()->log("TestObject.activityLoggedMethod2", i nfo.Length(), loggerArgs.data(), "Method");
4944 } 5057 }
4945 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(info); 5058 TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(info);
4946 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4947 } 5060 }
4948 5061
4949 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& info) 5062 static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
4950 { 5063 {
5064 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4951 if (UNLIKELY(info.Length() < 1)) { 5065 if (UNLIKELY(info.Length() < 1)) {
4952 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate()); 5066 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5067 exceptionState.throwIfNeeded();
4953 return; 5068 return;
4954 } 5069 }
4955 TestObj* imp = V8TestObject::toNative(info.Holder()); 5070 TestObj* imp = V8TestObject::toNative(info.Holder());
4956 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 5071 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4957 imp->activityLoggedInIsolatedWorldMethod(longArg); 5072 imp->activityLoggedInIsolatedWorldMethod(longArg);
4958 } 5073 }
4959 5074
4960 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 5075 static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
4961 { 5076 {
4962 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5077 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4963 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext()); 5078 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4964 if (contextData && contextData->activityLogger()) { 5079 if (contextData && contextData->activityLogger()) {
4965 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 5080 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
4966 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", info.Length(), loggerArgs.data(), "Method"); 5081 contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedW orldMethod", info.Length(), loggerArgs.data(), "Method");
4967 } 5082 }
4968 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(info); 5083 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(info);
4969 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5084 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4970 } 5085 }
4971 5086
4972 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& info) 5087 static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::Func tionCallbackInfo<v8::Value>& info)
4973 { 5088 {
5089 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLog gedInIsolatedWorldMethod", "TestObject", info.Holder(), info.GetIsolate());
4974 if (UNLIKELY(info.Length() < 1)) { 5090 if (UNLIKELY(info.Length() < 1)) {
4975 throwTypeError(ExceptionMessages::failedToExecute("activityLoggedInIsola tedWorldMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())), info.GetIsolate()); 5091 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5092 exceptionState.throwIfNeeded();
4976 return; 5093 return;
4977 } 5094 }
4978 TestObj* imp = V8TestObject::toNative(info.Holder()); 5095 TestObj* imp = V8TestObject::toNative(info.Holder());
4979 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 5096 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4980 imp->activityLoggedInIsolatedWorldMethod(longArg); 5097 imp->activityLoggedInIsolatedWorldMethod(longArg);
4981 } 5098 }
4982 5099
4983 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 5100 static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
4984 { 5101 {
4985 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 5102 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4986 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(inf o); 5103 TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(inf o);
4987 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4988 } 5105 }
4989 5106
4990 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& info) 5107 static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo <v8::Value>& info)
4991 { 5108 {
5109 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
4992 if (UNLIKELY(info.Length() < 1)) { 5110 if (UNLIKELY(info.Length() < 1)) {
4993 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate()); 5111 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5112 exceptionState.throwIfNeeded();
4994 return; 5113 return;
4995 } 5114 }
4996 TestObj* imp = V8TestObject::toNative(info.Holder()); 5115 TestObj* imp = V8TestObject::toNative(info.Holder());
4997 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 5116 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4998 imp->overloadedActivityLoggedMethod(longArg); 5117 imp->overloadedActivityLoggedMethod(longArg);
4999 } 5118 }
5000 5119
5001 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info) 5120 static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info)
5002 { 5121 {
5122 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
5003 if (UNLIKELY(info.Length() < 1)) { 5123 if (UNLIKELY(info.Length() < 1)) {
5004 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate()); 5124 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5125 exceptionState.throwIfNeeded();
5005 return; 5126 return;
5006 } 5127 }
5007 TestObj* imp = V8TestObject::toNative(info.Holder()); 5128 TestObj* imp = V8TestObject::toNative(info.Holder());
5008 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); 5129 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
5009 imp->overloadedActivityLoggedMethod(longArg); 5130 imp->overloadedActivityLoggedMethod(longArg);
5010 } 5131 }
5011 5132
5012 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& info) 5133 static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo <v8::Value>& info)
5013 { 5134 {
5135 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
5014 if (UNLIKELY(info.Length() < 2)) { 5136 if (UNLIKELY(info.Length() < 2)) {
5015 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate()); 5137 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
5138 exceptionState.throwIfNeeded();
5016 return; 5139 return;
5017 } 5140 }
5018 TestObj* imp = V8TestObject::toNative(info.Holder()); 5141 TestObj* imp = V8TestObject::toNative(info.Holder());
5019 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 5142 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
5020 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 5143 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
5021 imp->overloadedActivityLoggedMethod(strArg, longArg); 5144 imp->overloadedActivityLoggedMethod(strArg, longArg);
5022 } 5145 }
5023 5146
5024 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 5147 static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
5025 { 5148 {
5026 if (((info.Length() == 1))) { 5149 if (((info.Length() == 1))) {
5027 overloadedActivityLoggedMethod1Method(info); 5150 overloadedActivityLoggedMethod1Method(info);
5028 return; 5151 return;
5029 } 5152 }
5030 if (((info.Length() == 2))) { 5153 if (((info.Length() == 2))) {
(...skipping 17 matching lines...) Expand all
5048 if (contextData && contextData->activityLogger()) { 5171 if (contextData && contextData->activityLogger()) {
5049 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0); 5172 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
5050 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method"); 5173 contextData->activityLogger()->log("TestObject.overloadedActivityLoggedM ethod", info.Length(), loggerArgs.data(), "Method");
5051 } 5174 }
5052 TestObjV8Internal::overloadedActivityLoggedMethodMethod(info); 5175 TestObjV8Internal::overloadedActivityLoggedMethodMethod(info);
5053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 5176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
5054 } 5177 }
5055 5178
5056 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info) 5179 static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::Function CallbackInfo<v8::Value>& info)
5057 { 5180 {
5181 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedA ctivityLoggedMethod", "TestObject", info.Holder(), info.GetIsolate());
5058 if (UNLIKELY(info.Length() < 2)) { 5182 if (UNLIKELY(info.Length() < 2)) {
5059 throwTypeError(ExceptionMessages::failedToExecute("overloadedActivityLog gedMethod", "TestObject", ExceptionMessages::notEnoughArguments(2, info.Length() )), info.GetIsolate()); 5183 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
5184 exceptionState.throwIfNeeded();
5060 return; 5185 return;
5061 } 5186 }
5062 TestObj* imp = V8TestObject::toNative(info.Holder()); 5187 TestObj* imp = V8TestObject::toNative(info.Holder());
5063 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 5188 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
5064 V8TRYCATCH_VOID(int, longArg, toInt32(info[1])); 5189 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
5065 imp->overloadedActivityLoggedMethod(strArg, longArg); 5190 imp->overloadedActivityLoggedMethod(strArg, longArg);
5066 } 5191 }
5067 5192
5068 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC allbackInfo<v8::Value>& info) 5193 static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionC allbackInfo<v8::Value>& info)
5069 { 5194 {
5070 if (((info.Length() == 1))) { 5195 if (((info.Length() == 1))) {
5071 overloadedActivityLoggedMethod1MethodForMainWorld(info); 5196 overloadedActivityLoggedMethod1MethodForMainWorld(info);
5072 return; 5197 return;
5073 } 5198 }
5074 if (((info.Length() == 2))) { 5199 if (((info.Length() == 2))) {
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
5563 fromInternalPointer(object)->deref(); 5688 fromInternalPointer(object)->deref();
5564 } 5689 }
5565 5690
5566 template<> 5691 template<>
5567 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 5692 v8::Handle<v8::Value> toV8NoInline(TestObj* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
5568 { 5693 {
5569 return toV8(impl, creationContext, isolate); 5694 return toV8(impl, creationContext, isolate);
5570 } 5695 }
5571 5696
5572 } // namespace WebCore 5697 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698