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

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

Issue 130943004: Regularize extended attributes on partial interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 TestImplements::setNode24(imp, WTF::getPtr(cppValue)); 273 TestImplements::setNode24(imp, WTF::getPtr(cppValue));
274 } 274 }
275 275
276 static void Node24AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 276 static void Node24AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
277 { 277 {
278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
279 TestInterfaceV8Internal::Node24AttributeSetter(jsValue, info); 279 TestInterfaceV8Internal::Node24AttributeSetter(jsValue, info);
280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
281 } 281 }
282 282
283 #if ENABLE(Condition11) || ENABLE(Condition12) 283 #if ENABLE(CONDITION_PARTIAL)
284 static void supplementalStaticReadOnlyAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info) 284 static void supplementalStaticReadOnlyAttrAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
285 { 285 {
286 v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAt tr()); 286 v8SetReturnValueInt(info, TestPartialInterface::supplementalStaticReadOnlyAt tr());
287 } 287 }
288 #endif // ENABLE(Condition11) || ENABLE(Condition12) 288 #endif // ENABLE(CONDITION_PARTIAL)
289 289
290 #if ENABLE(Condition11) || ENABLE(Condition12) 290 #if ENABLE(CONDITION_PARTIAL)
291 static void supplementalStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info) 291 static void supplementalStaticReadOnlyAttrAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
292 { 292 {
293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
294 TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttributeGetter(info) ; 294 TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttributeGetter(info) ;
295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
296 } 296 }
297 #endif // ENABLE(Condition11) || ENABLE(Condition12) 297 #endif // ENABLE(CONDITION_PARTIAL)
298 298
299 #if ENABLE(Condition11) || ENABLE(Condition12) 299 #if ENABLE(CONDITION_PARTIAL)
300 static void supplementalStaticAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 300 static void supplementalStaticAttrAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
301 { 301 {
302 v8SetReturnValueString(info, TestPartialInterface::supplementalStaticAttr(), info.GetIsolate()); 302 v8SetReturnValueString(info, TestPartialInterface::supplementalStaticAttr(), info.GetIsolate());
303 } 303 }
304 #endif // ENABLE(Condition11) || ENABLE(Condition12) 304 #endif // ENABLE(CONDITION_PARTIAL)
305 305
306 #if ENABLE(Condition11) || ENABLE(Condition12) 306 #if ENABLE(CONDITION_PARTIAL)
307 static void supplementalStaticAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 307 static void supplementalStaticAttrAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
308 { 308 {
309 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 309 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
310 TestInterfaceV8Internal::supplementalStaticAttrAttributeGetter(info); 310 TestInterfaceV8Internal::supplementalStaticAttrAttributeGetter(info);
311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
312 } 312 }
313 #endif // ENABLE(Condition11) || ENABLE(Condition12) 313 #endif // ENABLE(CONDITION_PARTIAL)
314 314
315 #if ENABLE(Condition11) || ENABLE(Condition12) 315 #if ENABLE(CONDITION_PARTIAL)
316 static void supplementalStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 316 static void supplementalStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
317 { 317 {
318 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 318 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
319 TestPartialInterface::setSupplementalStaticAttr(cppValue); 319 TestPartialInterface::setSupplementalStaticAttr(cppValue);
320 } 320 }
321 #endif // ENABLE(Condition11) || ENABLE(Condition12) 321 #endif // ENABLE(CONDITION_PARTIAL)
322 322
323 #if ENABLE(Condition11) || ENABLE(Condition12) 323 #if ENABLE(CONDITION_PARTIAL)
324 static void supplementalStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 324 static void supplementalStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
325 { 325 {
326 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 326 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
327 TestInterfaceV8Internal::supplementalStaticAttrAttributeSetter(jsValue, info ); 327 TestInterfaceV8Internal::supplementalStaticAttrAttributeSetter(jsValue, info );
328 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 328 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
329 } 329 }
330 #endif // ENABLE(Condition11) || ENABLE(Condition12) 330 #endif // ENABLE(CONDITION_PARTIAL)
331 331
332 #if ENABLE(Condition11) || ENABLE(Condition12) 332 #if ENABLE(CONDITION_PARTIAL)
333 static void supplementalStr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info) 333 static void supplementalStr1AttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
334 { 334 {
335 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 335 TestInterface* imp = V8TestInterface::toNative(info.Holder());
336 v8SetReturnValueString(info, TestPartialInterface::supplementalStr1(imp), in fo.GetIsolate()); 336 v8SetReturnValueString(info, TestPartialInterface::supplementalStr1(imp), in fo.GetIsolate());
337 } 337 }
338 #endif // ENABLE(Condition11) || ENABLE(Condition12) 338 #endif // ENABLE(CONDITION_PARTIAL)
339 339
340 #if ENABLE(Condition11) || ENABLE(Condition12) 340 #if ENABLE(CONDITION_PARTIAL)
341 static void supplementalStr1AttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 341 static void supplementalStr1AttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
342 { 342 {
343 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 343 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
344 TestInterfaceV8Internal::supplementalStr1AttributeGetter(info); 344 TestInterfaceV8Internal::supplementalStr1AttributeGetter(info);
345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
346 } 346 }
347 #endif // ENABLE(Condition11) || ENABLE(Condition12) 347 #endif // ENABLE(CONDITION_PARTIAL)
348 348
349 #if ENABLE(Condition11) || ENABLE(Condition12) 349 #if ENABLE(CONDITION_PARTIAL)
350 static void supplementalStr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info) 350 static void supplementalStr2AttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
351 { 351 {
352 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 352 TestInterface* imp = V8TestInterface::toNative(info.Holder());
353 v8SetReturnValueString(info, TestPartialInterface::supplementalStr2(imp), in fo.GetIsolate()); 353 v8SetReturnValueString(info, TestPartialInterface::supplementalStr2(imp), in fo.GetIsolate());
354 } 354 }
355 #endif // ENABLE(Condition11) || ENABLE(Condition12) 355 #endif // ENABLE(CONDITION_PARTIAL)
356 356
357 #if ENABLE(Condition11) || ENABLE(Condition12) 357 #if ENABLE(CONDITION_PARTIAL)
358 static void supplementalStr2AttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 358 static void supplementalStr2AttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
359 { 359 {
360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
361 TestInterfaceV8Internal::supplementalStr2AttributeGetter(info); 361 TestInterfaceV8Internal::supplementalStr2AttributeGetter(info);
362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
363 } 363 }
364 #endif // ENABLE(Condition11) || ENABLE(Condition12) 364 #endif // ENABLE(CONDITION_PARTIAL)
365 365
366 #if ENABLE(Condition11) || ENABLE(Condition12) 366 #if ENABLE(CONDITION_PARTIAL)
367 static void supplementalStr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 367 static void supplementalStr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
368 { 368 {
369 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 369 TestInterface* imp = V8TestInterface::toNative(info.Holder());
370 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 370 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
371 TestPartialInterface::setSupplementalStr2(imp, cppValue); 371 TestPartialInterface::setSupplementalStr2(imp, cppValue);
372 } 372 }
373 #endif // ENABLE(Condition11) || ENABLE(Condition12) 373 #endif // ENABLE(CONDITION_PARTIAL)
374 374
375 #if ENABLE(Condition11) || ENABLE(Condition12) 375 #if ENABLE(CONDITION_PARTIAL)
376 static void supplementalStr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 376 static void supplementalStr2AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
377 { 377 {
378 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 378 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
379 TestInterfaceV8Internal::supplementalStr2AttributeSetter(jsValue, info); 379 TestInterfaceV8Internal::supplementalStr2AttributeSetter(jsValue, info);
380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
381 } 381 }
382 #endif // ENABLE(Condition11) || ENABLE(Condition12) 382 #endif // ENABLE(CONDITION_PARTIAL)
383 383
384 #if ENABLE(Condition11) || ENABLE(Condition12) 384 #if ENABLE(CONDITION_PARTIAL)
385 static void supplementalStr3AttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 385 static void supplementalStr3AttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
386 { 386 {
387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
388 V8TestInterface::supplementalStr3AttributeGetterCustom(info); 388 V8TestInterface::supplementalStr3AttributeGetterCustom(info);
389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
390 } 390 }
391 #endif // ENABLE(Condition11) || ENABLE(Condition12) 391 #endif // ENABLE(CONDITION_PARTIAL)
392 392
393 #if ENABLE(Condition11) || ENABLE(Condition12) 393 #if ENABLE(CONDITION_PARTIAL)
394 static void supplementalStr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 394 static void supplementalStr3AttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
395 { 395 {
396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
397 V8TestInterface::supplementalStr3AttributeSetterCustom(jsValue, info); 397 V8TestInterface::supplementalStr3AttributeSetterCustom(jsValue, info);
398 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 398 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
399 } 399 }
400 #endif // ENABLE(Condition11) || ENABLE(Condition12) 400 #endif // ENABLE(CONDITION_PARTIAL)
401 401
402 #if ENABLE(Condition11) || ENABLE(Condition12) 402 #if ENABLE(CONDITION_PARTIAL)
403 static void supplementalNodeAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info) 403 static void supplementalNodeAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
404 { 404 {
405 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 405 TestInterface* imp = V8TestInterface::toNative(info.Holder());
406 v8SetReturnValueFast(info, TestPartialInterface::supplementalNode(imp), imp) ; 406 v8SetReturnValueFast(info, TestPartialInterface::supplementalNode(imp), imp) ;
407 } 407 }
408 #endif // ENABLE(Condition11) || ENABLE(Condition12) 408 #endif // ENABLE(CONDITION_PARTIAL)
409 409
410 #if ENABLE(Condition11) || ENABLE(Condition12) 410 #if ENABLE(CONDITION_PARTIAL)
411 static void supplementalNodeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 411 static void supplementalNodeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
412 { 412 {
413 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 413 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
414 TestInterfaceV8Internal::supplementalNodeAttributeGetter(info); 414 TestInterfaceV8Internal::supplementalNodeAttributeGetter(info);
415 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 415 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
416 } 416 }
417 #endif // ENABLE(Condition11) || ENABLE(Condition12) 417 #endif // ENABLE(CONDITION_PARTIAL)
418 418
419 #if ENABLE(Condition11) || ENABLE(Condition12) 419 #if ENABLE(CONDITION_PARTIAL)
420 static void supplementalNodeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 420 static void supplementalNodeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
421 { 421 {
422 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 422 TestInterface* imp = V8TestInterface::toNative(info.Holder());
423 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0); 423 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0);
424 TestPartialInterface::setSupplementalNode(imp, WTF::getPtr(cppValue)); 424 TestPartialInterface::setSupplementalNode(imp, WTF::getPtr(cppValue));
425 } 425 }
426 #endif // ENABLE(Condition11) || ENABLE(Condition12) 426 #endif // ENABLE(CONDITION_PARTIAL)
427 427
428 #if ENABLE(Condition11) || ENABLE(Condition12) 428 #if ENABLE(CONDITION_PARTIAL)
429 static void supplementalNodeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 429 static void supplementalNodeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
430 { 430 {
431 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 431 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
432 TestInterfaceV8Internal::supplementalNodeAttributeSetter(jsValue, info); 432 TestInterfaceV8Internal::supplementalNodeAttributeSetter(jsValue, info);
433 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 433 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
434 } 434 }
435 #endif // ENABLE(Condition11) || ENABLE(Condition12) 435 #endif // ENABLE(CONDITION_PARTIAL)
436 436
437 #if ENABLE(Condition11) || ENABLE(Condition12) 437 #if ENABLE(CONDITION_PARTIAL)
438 static void Node13AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o) 438 static void Node13AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o)
439 { 439 {
440 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 440 TestInterface* imp = V8TestInterface::toNative(info.Holder());
441 v8SetReturnValueFast(info, TestPartialInterface::node13(imp), imp); 441 v8SetReturnValueFast(info, TestPartialInterface::node13(imp), imp);
442 } 442 }
443 #endif // ENABLE(Condition11) || ENABLE(Condition12) 443 #endif // ENABLE(CONDITION_PARTIAL)
444 444
445 #if ENABLE(Condition11) || ENABLE(Condition12) 445 #if ENABLE(CONDITION_PARTIAL)
446 static void Node13AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info) 446 static void Node13AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info)
447 { 447 {
448 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 448 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
449 TestInterfaceV8Internal::Node13AttributeGetter(info); 449 TestInterfaceV8Internal::Node13AttributeGetter(info);
450 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 450 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
451 } 451 }
452 #endif // ENABLE(Condition11) || ENABLE(Condition12) 452 #endif // ENABLE(CONDITION_PARTIAL)
453 453
454 #if ENABLE(Condition11) || ENABLE(Condition12) 454 #if ENABLE(CONDITION_PARTIAL)
455 static void Node13AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info) 455 static void Node13AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info)
456 { 456 {
457 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 457 TestInterface* imp = V8TestInterface::toNative(info.Holder());
458 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0); 458 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0);
459 TestPartialInterface::setNode13(imp, WTF::getPtr(cppValue)); 459 TestPartialInterface::setNode13(imp, WTF::getPtr(cppValue));
460 } 460 }
461 #endif // ENABLE(Condition11) || ENABLE(Condition12) 461 #endif // ENABLE(CONDITION_PARTIAL)
462 462
463 #if ENABLE(Condition11) || ENABLE(Condition12) 463 #if ENABLE(CONDITION_PARTIAL)
464 static void Node13AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 464 static void Node13AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
465 { 465 {
466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
467 TestInterfaceV8Internal::Node13AttributeSetter(jsValue, info); 467 TestInterfaceV8Internal::Node13AttributeSetter(jsValue, info);
468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
469 } 469 }
470 #endif // ENABLE(Condition11) || ENABLE(Condition12) 470 #endif // ENABLE(CONDITION_PARTIAL)
471 471
472 #if ENABLE(Condition11) || ENABLE(Condition12) 472 #if ENABLE(CONDITION_PARTIAL)
473 static void Node14AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o) 473 static void Node14AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o)
474 { 474 {
475 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 475 TestInterface* imp = V8TestInterface::toNative(info.Holder());
476 v8SetReturnValueFast(info, TestPartialInterface::node14(imp), imp); 476 v8SetReturnValueFast(info, TestPartialInterface::node14(imp), imp);
477 } 477 }
478 #endif // ENABLE(Condition11) || ENABLE(Condition12) 478 #endif // ENABLE(CONDITION_PARTIAL)
479 479
480 #if ENABLE(Condition11) || ENABLE(Condition12) 480 #if ENABLE(CONDITION_PARTIAL)
481 static void Node14AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info) 481 static void Node14AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info)
482 { 482 {
483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
484 TestInterfaceV8Internal::Node14AttributeGetter(info); 484 TestInterfaceV8Internal::Node14AttributeGetter(info);
485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
486 } 486 }
487 #endif // ENABLE(Condition11) || ENABLE(Condition12) 487 #endif // ENABLE(CONDITION_PARTIAL)
488 488
489 #if ENABLE(Condition11) || ENABLE(Condition12) 489 #if ENABLE(CONDITION_PARTIAL)
490 static void Node14AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info) 490 static void Node14AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info)
491 { 491 {
492 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 492 TestInterface* imp = V8TestInterface::toNative(info.Holder());
493 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0); 493 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0);
494 TestPartialInterface::setNode14(imp, WTF::getPtr(cppValue)); 494 TestPartialInterface::setNode14(imp, WTF::getPtr(cppValue));
495 } 495 }
496 #endif // ENABLE(Condition11) || ENABLE(Condition12) 496 #endif // ENABLE(CONDITION_PARTIAL)
497 497
498 #if ENABLE(Condition11) || ENABLE(Condition12) 498 #if ENABLE(CONDITION_PARTIAL)
499 static void Node14AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 499 static void Node14AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
500 { 500 {
501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
502 TestInterfaceV8Internal::Node14AttributeSetter(jsValue, info); 502 TestInterfaceV8Internal::Node14AttributeSetter(jsValue, info);
503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
504 } 504 }
505 #endif // ENABLE(Condition11) || ENABLE(Condition12) 505 #endif // ENABLE(CONDITION_PARTIAL)
506 506
507 #if ENABLE(Condition11) || ENABLE(Condition12) 507 #if ENABLE(CONDITION_PARTIAL)
508 static void Node15AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o) 508 static void Node15AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o)
509 { 509 {
510 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 510 TestInterface* imp = V8TestInterface::toNative(info.Holder());
511 v8SetReturnValueFast(info, TestPartialInterface::node15(imp), imp); 511 v8SetReturnValueFast(info, TestPartialInterface::node15(imp), imp);
512 } 512 }
513 #endif // ENABLE(Condition11) || ENABLE(Condition12) 513 #endif // ENABLE(CONDITION_PARTIAL)
514 514
515 #if ENABLE(Condition11) || ENABLE(Condition12) 515 #if ENABLE(CONDITION_PARTIAL)
516 static void Node15AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info) 516 static void Node15AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info)
517 { 517 {
518 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 518 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
519 TestInterfaceV8Internal::Node15AttributeGetter(info); 519 TestInterfaceV8Internal::Node15AttributeGetter(info);
520 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 520 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
521 } 521 }
522 #endif // ENABLE(Condition11) || ENABLE(Condition12) 522 #endif // ENABLE(CONDITION_PARTIAL)
523 523
524 #if ENABLE(Condition11) || ENABLE(Condition12) 524 #if ENABLE(CONDITION_PARTIAL)
525 static void Node15AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info) 525 static void Node15AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper tyCallbackInfo<void>& info)
526 { 526 {
527 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 527 TestInterface* imp = V8TestInterface::toNative(info.Holder());
528 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0); 528 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0);
529 TestPartialInterface::setNode15(imp, WTF::getPtr(cppValue)); 529 TestPartialInterface::setNode15(imp, WTF::getPtr(cppValue));
530 } 530 }
531 #endif // ENABLE(Condition11) || ENABLE(Condition12) 531 #endif // ENABLE(CONDITION_PARTIAL)
532 532
533 #if ENABLE(Condition11) || ENABLE(Condition12) 533 #if ENABLE(CONDITION_PARTIAL)
534 static void Node15AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 534 static void Node15AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
535 { 535 {
536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
537 TestInterfaceV8Internal::Node15AttributeSetter(jsValue, info); 537 TestInterfaceV8Internal::Node15AttributeSetter(jsValue, info);
538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
539 } 539 }
540 #endif // ENABLE(Condition11) || ENABLE(Condition12) 540 #endif // ENABLE(CONDITION_PARTIAL)
541 541
542 static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 542 static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
543 { 543 {
544 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 544 TestInterface* imp = V8TestInterface::toNative(info.Holder());
545 TestImplements::implementsMethod1(imp); 545 TestImplements::implementsMethod1(imp);
546 } 546 }
547 547
548 static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 548 static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
549 { 549 {
550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 TestImplements::implementsMethod4(); 594 TestImplements::implementsMethod4();
595 } 595 }
596 596
597 static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 597 static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
598 { 598 {
599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
600 TestInterfaceV8Internal::implementsMethod4Method(info); 600 TestInterfaceV8Internal::implementsMethod4Method(info);
601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
602 } 602 }
603 603
604 #if ENABLE(Condition11) || ENABLE(Condition12) 604 #if ENABLE(CONDITION_PARTIAL)
605 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 605 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
606 { 606 {
607 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 607 TestInterface* imp = V8TestInterface::toNative(info.Holder());
608 TestPartialInterface::supplementalMethod1(imp); 608 TestPartialInterface::supplementalMethod1(imp);
609 } 609 }
610 #endif // ENABLE(Condition11) || ENABLE(Condition12) 610 #endif // ENABLE(CONDITION_PARTIAL)
611 611
612 #if ENABLE(Condition11) || ENABLE(Condition12) 612 #if ENABLE(CONDITION_PARTIAL)
613 static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 613 static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
614 { 614 {
615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
616 TestInterfaceV8Internal::supplementalMethod1Method(info); 616 TestInterfaceV8Internal::supplementalMethod1Method(info);
617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
618 } 618 }
619 #endif // ENABLE(Condition11) || ENABLE(Condition12) 619 #endif // ENABLE(CONDITION_PARTIAL)
620 620
621 #if ENABLE(Condition11) || ENABLE(Condition12) 621 #if ENABLE(CONDITION_PARTIAL)
622 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 622 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
623 { 623 {
624 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa lMethod2", "TestInterface", info.Holder(), info.GetIsolate()); 624 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa lMethod2", "TestInterface", info.Holder(), info.GetIsolate());
625 if (UNLIKELY(info.Length() < 2)) { 625 if (UNLIKELY(info.Length() < 2)) {
626 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 626 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
627 exceptionState.throwIfNeeded(); 627 exceptionState.throwIfNeeded();
628 return; 628 return;
629 } 629 }
630 TestInterface* imp = V8TestInterface::toNative(info.Holder()); 630 TestInterface* imp = V8TestInterface::toNative(info.Holder());
631 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 631 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
632 if (info.Length() <= 1 || !info[1]->IsFunction()) { 632 if (info.Length() <= 1 || !info[1]->IsFunction()) {
633 exceptionState.throwTypeError("The callback provided as parameter 2 is n ot a function."); 633 exceptionState.throwTypeError("The callback provided as parameter 2 is n ot a function.");
634 exceptionState.throwIfNeeded(); 634 exceptionState.throwIfNeeded();
635 return; 635 return;
636 } 636 }
637 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[1]), getExecutionContext()); 637 OwnPtr<TestObject> objArg = V8TestObject::create(v8::Handle<v8::Function>::C ast(info[1]), getExecutionContext());
638 ExecutionContext* scriptContext = getExecutionContext(); 638 ExecutionContext* scriptContext = getExecutionContext();
639 RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptCon text, imp, strArg, objArg.release(), exceptionState); 639 RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptCon text, imp, strArg, objArg.release(), exceptionState);
640 if (exceptionState.throwIfNeeded()) 640 if (exceptionState.throwIfNeeded())
641 return; 641 return;
642 v8SetReturnValue(info, result.release()); 642 v8SetReturnValue(info, result.release());
643 } 643 }
644 #endif // ENABLE(Condition11) || ENABLE(Condition12) 644 #endif // ENABLE(CONDITION_PARTIAL)
645 645
646 #if ENABLE(Condition11) || ENABLE(Condition12) 646 #if ENABLE(CONDITION_PARTIAL)
647 static void supplementalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 647 static void supplementalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
648 { 648 {
649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
650 TestInterfaceV8Internal::supplementalMethod2Method(info); 650 TestInterfaceV8Internal::supplementalMethod2Method(info);
651 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 651 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
652 } 652 }
653 #endif // ENABLE(Condition11) || ENABLE(Condition12) 653 #endif // ENABLE(CONDITION_PARTIAL)
654 654
655 #if ENABLE(Condition11) || ENABLE(Condition12) 655 #if ENABLE(CONDITION_PARTIAL)
656 static void supplementalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 656 static void supplementalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
657 { 657 {
658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
659 V8TestInterface::supplementalMethod3MethodCustom(info); 659 V8TestInterface::supplementalMethod3MethodCustom(info);
660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
661 } 661 }
662 #endif // ENABLE(Condition11) || ENABLE(Condition12) 662 #endif // ENABLE(CONDITION_PARTIAL)
663 663
664 #if ENABLE(Condition11) || ENABLE(Condition12) 664 #if ENABLE(CONDITION_PARTIAL)
665 static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& info) 665 static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& info)
666 { 666 {
667 TestPartialInterface::supplementalMethod4(); 667 TestPartialInterface::supplementalMethod4();
668 } 668 }
669 #endif // ENABLE(Condition11) || ENABLE(Condition12) 669 #endif // ENABLE(CONDITION_PARTIAL)
670 670
671 #if ENABLE(Condition11) || ENABLE(Condition12) 671 #if ENABLE(CONDITION_PARTIAL)
672 static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 672 static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
673 { 673 {
674 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 674 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
675 TestInterfaceV8Internal::supplementalMethod4Method(info); 675 TestInterfaceV8Internal::supplementalMethod4Method(info);
676 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 676 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
677 } 677 }
678 #endif // ENABLE(Condition11) || ENABLE(Condition12) 678 #endif // ENABLE(CONDITION_PARTIAL)
679 679
680 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 680 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
681 { 681 {
682 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rface", info.Holder(), info.GetIsolate()); 682 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rface", info.Holder(), info.GetIsolate());
683 if (UNLIKELY(info.Length() < 1)) { 683 if (UNLIKELY(info.Length() < 1)) {
684 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 684 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
685 exceptionState.throwIfNeeded(); 685 exceptionState.throwIfNeeded();
686 return; 686 return;
687 } 687 }
688 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]); 688 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 } 797 }
798 setObjectGroup(object, wrapper, isolate); 798 setObjectGroup(object, wrapper, isolate);
799 } 799 }
800 800
801 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = { 801 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = {
802 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), 0 /* on instance */}, 802 {"implementsStr1", TestInterfaceV8Internal::implementsStr1AttributeGetterCal lback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), 0 /* on instance */},
803 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, 803 {"implementsStr2", TestInterfaceV8Internal::implementsStr2AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
804 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, 804 {"implementsStr3", TestInterfaceV8Internal::implementsStr3AttributeGetterCal lback, TestInterfaceV8Internal::implementsStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
805 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, 805 {"implementsNode", TestInterfaceV8Internal::implementsNodeAttributeGetterCal lback, TestInterfaceV8Internal::implementsNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
806 {"eventHandlerAttribute", TestInterfaceV8Internal::eventHandlerAttributeAttr ibuteGetterCallback, TestInterfaceV8Internal::eventHandlerAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */}, 806 {"eventHandlerAttribute", TestInterfaceV8Internal::eventHandlerAttributeAttr ibuteGetterCallback, TestInterfaceV8Internal::eventHandlerAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
807 #if ENABLE(Condition11) || ENABLE(Condition12) 807 #if ENABLE(CONDITION_PARTIAL)
808 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 808 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttributeGette rCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */},
809 #endif // ENABLE(Condition11) || ENABLE(Condition12) 809 #endif // ENABLE(CONDITION_PARTIAL)
810 #if ENABLE(Condition11) || ENABLE(Condition12) 810 #if ENABLE(CONDITION_PARTIAL)
811 {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */}, 811 {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr2AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
812 #endif // ENABLE(Condition11) || ENABLE(Condition12) 812 #endif // ENABLE(CONDITION_PARTIAL)
813 #if ENABLE(Condition11) || ENABLE(Condition12) 813 #if ENABLE(CONDITION_PARTIAL)
814 {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */}, 814 {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttributeGette rCallback, TestInterfaceV8Internal::supplementalStr3AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
815 #endif // ENABLE(Condition11) || ENABLE(Condition12) 815 #endif // ENABLE(CONDITION_PARTIAL)
816 #if ENABLE(Condition11) || ENABLE(Condition12) 816 #if ENABLE(CONDITION_PARTIAL)
817 {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttributeGette rCallback, TestInterfaceV8Internal::supplementalNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */}, 817 {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttributeGette rCallback, TestInterfaceV8Internal::supplementalNodeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
818 #endif // ENABLE(Condition11) || ENABLE(Condition12) 818 #endif // ENABLE(CONDITION_PARTIAL)
819 }; 819 };
820 820
821 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { 821 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
822 {"implementsMethod1", TestInterfaceV8Internal::implementsMethod1MethodCallba ck, 0, 0}, 822 {"implementsMethod1", TestInterfaceV8Internal::implementsMethod1MethodCallba ck, 0, 0},
823 {"implementsMethod2", TestInterfaceV8Internal::implementsMethod2MethodCallba ck, 0, 2}, 823 {"implementsMethod2", TestInterfaceV8Internal::implementsMethod2MethodCallba ck, 0, 2},
824 {"implementsMethod3", TestInterfaceV8Internal::implementsMethod3MethodCallba ck, 0, 0}, 824 {"implementsMethod3", TestInterfaceV8Internal::implementsMethod3MethodCallba ck, 0, 0},
825 #if ENABLE(Condition11) || ENABLE(Condition12) 825 #if ENABLE(CONDITION_PARTIAL)
826 {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCa llback, 0, 0}, 826 {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCa llback, 0, 0},
827 #endif // ENABLE(Condition11) || ENABLE(Condition12) 827 #endif // ENABLE(CONDITION_PARTIAL)
828 #if ENABLE(Condition11) || ENABLE(Condition12) 828 #if ENABLE(CONDITION_PARTIAL)
829 {"supplementalMethod2", TestInterfaceV8Internal::supplementalMethod2MethodCa llback, 0, 2}, 829 {"supplementalMethod2", TestInterfaceV8Internal::supplementalMethod2MethodCa llback, 0, 2},
830 #endif // ENABLE(Condition11) || ENABLE(Condition12) 830 #endif // ENABLE(CONDITION_PARTIAL)
831 #if ENABLE(Condition11) || ENABLE(Condition12) 831 #if ENABLE(CONDITION_PARTIAL)
832 {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCa llback, 0, 0}, 832 {"supplementalMethod3", TestInterfaceV8Internal::supplementalMethod3MethodCa llback, 0, 0},
833 #endif // ENABLE(Condition11) || ENABLE(Condition12) 833 #endif // ENABLE(CONDITION_PARTIAL)
834 }; 834 };
835 835
836 void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info) 836 void V8TestInterface::constructorCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info)
837 { 837 {
838 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); 838 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
839 if (!info.IsConstructCall()) { 839 if (!info.IsConstructCall()) {
840 throwTypeError(ExceptionMessages::failedToConstruct("TestInterface", "Pl ease use the 'new' operator, this DOM object constructor cannot be called as a f unction."), info.GetIsolate()); 840 throwTypeError(ExceptionMessages::failedToConstruct("TestInterface", "Pl ease use the 'new' operator, this DOM object constructor cannot be called as a f unction."), info.GetIsolate());
841 return; 841 return;
842 } 842 }
843 843
(...skipping 17 matching lines...) Expand all
861 isolate, currentWorldType); 861 isolate, currentWorldType);
862 functionTemplate->SetCallHandler(V8TestInterface::constructorCallback); 862 functionTemplate->SetCallHandler(V8TestInterface::constructorCallback);
863 functionTemplate->SetLength(1); 863 functionTemplate->SetLength(1);
864 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate(); 864 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
865 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate(); 865 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
866 if (RuntimeEnabledFeatures::featureName23Enabled()) { 866 if (RuntimeEnabledFeatures::featureName23Enabled()) {
867 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 867 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
868 {"Node23", TestInterfaceV8Internal::Node23AttributeGetterCallback, TestI nterfaceV8Internal::Node23AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}; 868 {"Node23", TestInterfaceV8Internal::Node23AttributeGetterCallback, TestI nterfaceV8Internal::Node23AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
869 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType); 869 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType);
870 } 870 }
871 #if ENABLE(Condition11) || ENABLE(Condition12) 871 #if ENABLE(CONDITION_PARTIAL)
872 if (RuntimeEnabledFeatures::condition13Enabled()) { 872 if (RuntimeEnabledFeatures::condition13Enabled()) {
873 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 873 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
874 {"Node13", TestInterfaceV8Internal::Node13AttributeGetterCallback, TestI nterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}; 874 {"Node13", TestInterfaceV8Internal::Node13AttributeGetterCallback, TestI nterfaceV8Internal::Node13AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */};
875 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType); 875 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType);
876 } 876 }
877 #endif // ENABLE(Condition11) || ENABLE(Condition12) 877 #endif // ENABLE(CONDITION_PARTIAL)
878 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { 878 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = {
879 {"IMPLEMENTSCONSTANT1", 1}, 879 {"IMPLEMENTSCONSTANT1", 1},
880 {"IMPLEMENTSCONSTANT2", 2}, 880 {"IMPLEMENTSCONSTANT2", 2},
881 {"SUPPLEMENTALCONSTANT1", 1}, 881 {"SUPPLEMENTALCONSTANT1", 1},
882 {"SUPPLEMENTALCONSTANT2", 2}, 882 {"SUPPLEMENTALCONSTANT2", 2},
883 }; 883 };
884 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); 884 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate);
885 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation); 885 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation);
886 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS T_IMPLDoesntMatchWithImplementation); 886 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS T_IMPLDoesntMatchWithImplementation);
887 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); 887 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation);
888 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac e_CONST_IMPLDoesntMatchWithImplementation); 888 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac e_CONST_IMPLDoesntMatchWithImplementation);
889 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV 8Internal::namedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySe tterCallback, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterf aceV8Internal::namedPropertyEnumeratorCallback); 889 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV 8Internal::namedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySe tterCallback, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterf aceV8Internal::namedPropertyEnumeratorCallback);
890 functionTemplate->Set(v8AtomicString(isolate, "implementsMethod4"), v8::Func tionTemplate::New(isolate, TestInterfaceV8Internal::implementsMethod4MethodCallb ack, v8Undefined(), v8::Local<v8::Signature>(), 0)); 890 functionTemplate->Set(v8AtomicString(isolate, "implementsMethod4"), v8::Func tionTemplate::New(isolate, TestInterfaceV8Internal::implementsMethod4MethodCallb ack, v8Undefined(), v8::Local<v8::Signature>(), 0));
891 #if ENABLE(Condition11) || ENABLE(Condition12) 891 #if ENABLE(CONDITION_PARTIAL)
892 functionTemplate->Set(v8AtomicString(isolate, "supplementalMethod4"), v8::Fu nctionTemplate::New(isolate, TestInterfaceV8Internal::supplementalMethod4MethodC allback, v8Undefined(), v8::Local<v8::Signature>(), 0)); 892 functionTemplate->Set(v8AtomicString(isolate, "supplementalMethod4"), v8::Fu nctionTemplate::New(isolate, TestInterfaceV8Internal::supplementalMethod4MethodC allback, v8Undefined(), v8::Local<v8::Signature>(), 0));
893 #endif // ENABLE(Condition11) || ENABLE(Condition12) 893 #endif // ENABLE(CONDITION_PARTIAL)
894 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticReadOnlyAttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrib uteGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAtt ribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessCo ntrol>(v8::DEFAULT)); 894 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticReadOnlyAttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrib uteGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAtt ribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessCo ntrol>(v8::DEFAULT));
895 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticAttr"), TestInterfaceV8Internal::implementsStaticAttrAttributeGetterCallbac k, TestInterfaceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::Ext ernal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle <v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 895 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticAttr"), TestInterfaceV8Internal::implementsStaticAttrAttributeGetterCallbac k, TestInterfaceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::Ext ernal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle <v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
896 #if ENABLE(Condition11) || ENABLE(Condition12) 896 #if ENABLE(CONDITION_PARTIAL)
897 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa lStaticReadOnlyAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAt tributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::Propert yAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::Acce ssControl>(v8::DEFAULT)); 897 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa lStaticReadOnlyAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAt tributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::Propert yAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::Acce ssControl>(v8::DEFAULT));
898 #endif // ENABLE(Condition11) || ENABLE(Condition12) 898 #endif // ENABLE(CONDITION_PARTIAL)
899 #if ENABLE(Condition11) || ENABLE(Condition12) 899 #if ENABLE(CONDITION_PARTIAL)
900 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa lStaticAttr"), TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCal lback, TestInterfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v 8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8:: Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 900 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa lStaticAttr"), TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCal lback, TestInterfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v 8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8:: Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
901 #endif // ENABLE(Condition11) || ENABLE(Condition12) 901 #endif // ENABLE(CONDITION_PARTIAL)
902 902
903 // Custom toString template 903 // Custom toString template
904 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :current()->toStringTemplate()); 904 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :current()->toStringTemplate());
905 } 905 }
906 906
907 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te, WrapperWorldType currentWorldType) 907 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te, WrapperWorldType currentWorldType)
908 { 908 {
909 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 909 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
910 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo); 910 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
911 if (result != data->templateMap(currentWorldType).end()) 911 if (result != data->templateMap(currentWorldType).end())
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 } 982 }
983 983
984 template<> 984 template<>
985 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 985 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
986 { 986 {
987 return toV8(impl, creationContext, isolate); 987 return toV8(impl, creationContext, isolate);
988 } 988 }
989 989
990 } // namespace WebCore 990 } // namespace WebCore
991 #endif // ENABLE(Condition1) || ENABLE(Condition2) 991 #endif // ENABLE(Condition1) || ENABLE(Condition2)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.h ('k') | Source/core/animation/ElementAnimation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698