| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 #include "V8TestInterface5.h" | 7 #include "V8TestInterface5.h" |
| 8 | 8 |
| 9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 309 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 310 { | 310 { |
| 311 v8::Local<v8::Value> v8Value = info[0]; | 311 v8::Local<v8::Value> v8Value = info[0]; |
| 312 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); | 312 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); |
| 313 } | 313 } |
| 314 | 314 |
| 315 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 315 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 316 { | 316 { |
| 317 if (UNLIKELY(info.Length() < 1)) { | 317 if (UNLIKELY(info.Length() < 1)) { |
| 318 V8ThrowException::throwException(info.GetIsolate(), createMinimumArityTy
peErrorForMethod(info.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInte
rface5", 1, info.Length())); | 318 throwMinimumArityErrorForMethod(info.GetIsolate(), "TestInterface5", "vo
idMethodTestInterfaceEmptyArg", 1, info.Length()); |
| 319 return; | 319 return; |
| 320 } | 320 } |
| 321 |
| 321 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 322 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 323 |
| 322 TestInterfaceEmpty* testInterfaceEmptyArg; | 324 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 323 { | 325 { |
| 324 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 326 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
| 325 if (!testInterfaceEmptyArg) { | 327 if (!testInterfaceEmptyArg) { |
| 326 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "paramet
er 1 is not of type 'TestInterfaceEmpty'.")); | 328 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "paramet
er 1 is not of type 'TestInterfaceEmpty'.")); |
| 327 return; | 329 return; |
| 328 } | 330 } |
| 329 } | 331 } |
| 330 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | 332 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| 331 } | 333 } |
| 332 | 334 |
| 333 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 335 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 334 { | 336 { |
| 335 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); | 337 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); |
| 336 } | 338 } |
| 337 | 339 |
| 338 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 340 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 339 { | 341 { |
| 340 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 342 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodDoubleArgFloatArg"); |
| 343 |
| 341 if (UNLIKELY(info.Length() < 2)) { | 344 if (UNLIKELY(info.Length() < 2)) { |
| 342 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 345 throwMinimumArityError(exceptionState, 2, info.Length()); |
| 343 return; | 346 return; |
| 344 } | 347 } |
| 348 |
| 345 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 349 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 350 |
| 346 double doubleArg; | 351 double doubleArg; |
| 347 float floatArg; | 352 float floatArg; |
| 348 { | 353 { |
| 349 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); | 354 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat
e); |
| 350 if (exceptionState.hadException()) | 355 if (exceptionState.hadException()) |
| 351 return; | 356 return; |
| 352 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState)
; | 357 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState)
; |
| 353 if (exceptionState.hadException()) | 358 if (exceptionState.hadException()) |
| 354 return; | 359 return; |
| 355 } | 360 } |
| 356 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 361 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
| 357 } | 362 } |
| 358 | 363 |
| 359 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 364 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 360 { | 365 { |
| 361 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); | 366 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); |
| 362 } | 367 } |
| 363 | 368 |
| 364 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 369 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 365 { | 370 { |
| 366 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info
.GetIsolate()); | 371 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg"); |
| 372 |
| 367 if (UNLIKELY(info.Length() < 2)) { | 373 if (UNLIKELY(info.Length() < 2)) { |
| 368 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 374 throwMinimumArityError(exceptionState, 2, info.Length()); |
| 369 return; | 375 return; |
| 370 } | 376 } |
| 377 |
| 371 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 378 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 379 |
| 372 double unrestrictedDoubleArg; | 380 double unrestrictedDoubleArg; |
| 373 float unrestrictedFloatArg; | 381 float unrestrictedFloatArg; |
| 374 { | 382 { |
| 375 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt
ate); | 383 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt
ate); |
| 376 if (exceptionState.hadException()) | 384 if (exceptionState.hadException()) |
| 377 return; | 385 return; |
| 378 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat
e); | 386 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat
e); |
| 379 if (exceptionState.hadException()) | 387 if (exceptionState.hadException()) |
| 380 return; | 388 return; |
| 381 } | 389 } |
| 382 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); | 390 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); |
| 383 } | 391 } |
| 384 | 392 |
| 385 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 393 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 386 { | 394 { |
| 387 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); | 395 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); |
| 388 } | 396 } |
| 389 | 397 |
| 390 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 398 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 391 { | 399 { |
| 392 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 400 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 401 |
| 393 impl->voidMethod(); | 402 impl->voidMethod(); |
| 394 } | 403 } |
| 395 | 404 |
| 396 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 405 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 397 { | 406 { |
| 398 TestInterface5ImplementationV8Internal::voidMethodMethod(info); | 407 TestInterface5ImplementationV8Internal::voidMethodMethod(info); |
| 399 } | 408 } |
| 400 | 409 |
| 401 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 410 static void voidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 402 { | 411 { |
| 403 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 412 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 413 |
| 404 impl->voidMethod(); | 414 impl->voidMethod(); |
| 405 } | 415 } |
| 406 | 416 |
| 407 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
v8::Value>& info) | 417 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 408 { | 418 { |
| 409 TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info); | 419 TestInterface5ImplementationV8Internal::voidMethodMethodForMainWorld(info); |
| 410 } | 420 } |
| 411 | 421 |
| 412 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 422 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 413 { | 423 { |
| 414 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 424 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 425 |
| 415 impl->alwaysExposedMethod(); | 426 impl->alwaysExposedMethod(); |
| 416 } | 427 } |
| 417 | 428 |
| 418 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 429 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 419 { | 430 { |
| 420 TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info); | 431 TestInterface5ImplementationV8Internal::alwaysExposedMethodMethod(info); |
| 421 } | 432 } |
| 422 | 433 |
| 423 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 434 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 424 { | 435 { |
| 425 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 436 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 437 |
| 426 impl->workerExposedMethod(); | 438 impl->workerExposedMethod(); |
| 427 } | 439 } |
| 428 | 440 |
| 429 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 441 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 430 { | 442 { |
| 431 TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info); | 443 TestInterface5ImplementationV8Internal::workerExposedMethodMethod(info); |
| 432 } | 444 } |
| 433 | 445 |
| 434 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 446 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 435 { | 447 { |
| 436 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 448 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 449 |
| 437 impl->windowExposedMethod(); | 450 impl->windowExposedMethod(); |
| 438 } | 451 } |
| 439 | 452 |
| 440 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 453 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 441 { | 454 { |
| 442 TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info); | 455 TestInterface5ImplementationV8Internal::windowExposedMethodMethod(info); |
| 443 } | 456 } |
| 444 | 457 |
| 445 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 458 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 446 { | 459 { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 468 } | 481 } |
| 469 | 482 |
| 470 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 483 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 471 { | 484 { |
| 472 TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info
); | 485 TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethod(info
); |
| 473 } | 486 } |
| 474 | 487 |
| 475 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 488 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
| 476 { | 489 { |
| 477 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 490 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 491 |
| 478 impl->windowAndServiceWorkerExposedMethod(); | 492 impl->windowAndServiceWorkerExposedMethod(); |
| 479 } | 493 } |
| 480 | 494 |
| 481 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 495 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 482 { | 496 { |
| 483 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM
ethod(info); | 497 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM
ethod(info); |
| 484 } | 498 } |
| 485 | 499 |
| 486 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 500 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 487 { | 501 { |
| 488 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 502 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodBooleanOrDOMStringArg"); |
| 503 |
| 489 if (UNLIKELY(info.Length() < 1)) { | 504 if (UNLIKELY(info.Length() < 1)) { |
| 490 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 505 throwMinimumArityError(exceptionState, 1, info.Length()); |
| 491 return; | 506 return; |
| 492 } | 507 } |
| 508 |
| 493 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 509 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 510 |
| 494 BooleanOrString arg; | 511 BooleanOrString arg; |
| 495 { | 512 { |
| 496 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv
ersionMode::NotNullable, exceptionState); | 513 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv
ersionMode::NotNullable, exceptionState); |
| 497 if (exceptionState.hadException()) | 514 if (exceptionState.hadException()) |
| 498 return; | 515 return; |
| 499 } | 516 } |
| 500 impl->voidMethodBooleanOrDOMStringArg(arg); | 517 impl->voidMethodBooleanOrDOMStringArg(arg); |
| 501 } | 518 } |
| 502 | 519 |
| 503 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 520 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 504 { | 521 { |
| 505 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); | 522 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); |
| 506 } | 523 } |
| 507 | 524 |
| 508 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 525 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 509 { | 526 { |
| 510 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 527 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "voidMethodDoubleOrDOMStringArg"); |
| 528 |
| 511 if (UNLIKELY(info.Length() < 1)) { | 529 if (UNLIKELY(info.Length() < 1)) { |
| 512 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 530 throwMinimumArityError(exceptionState, 1, info.Length()); |
| 513 return; | 531 return; |
| 514 } | 532 } |
| 533 |
| 515 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 534 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 535 |
| 516 DoubleOrString arg; | 536 DoubleOrString arg; |
| 517 { | 537 { |
| 518 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::NotNullable, exceptionState); | 538 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve
rsionMode::NotNullable, exceptionState); |
| 519 if (exceptionState.hadException()) | 539 if (exceptionState.hadException()) |
| 520 return; | 540 return; |
| 521 } | 541 } |
| 522 impl->voidMethodDoubleOrDOMStringArg(arg); | 542 impl->voidMethodDoubleOrDOMStringArg(arg); |
| 523 } | 543 } |
| 524 | 544 |
| 525 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 545 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 526 { | 546 { |
| 527 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); | 547 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); |
| 528 } | 548 } |
| 529 | 549 |
| 530 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 550 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 531 { | 551 { |
| 532 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface5", info.Holder(), info.GetIsolate()); | 552 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "keys"); |
| 553 |
| 533 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 554 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 555 |
| 534 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 556 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 535 Iterator* result = impl->keysForBinding(scriptState, exceptionState); | 557 Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
| 536 if (exceptionState.hadException()) { | 558 if (exceptionState.hadException()) { |
| 537 return; | 559 return; |
| 538 } | 560 } |
| 539 v8SetReturnValue(info, result); | 561 v8SetReturnValue(info, result); |
| 540 } | 562 } |
| 541 | 563 |
| 542 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 564 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 543 { | 565 { |
| 544 TestInterface5ImplementationV8Internal::keysMethod(info); | 566 TestInterface5ImplementationV8Internal::keysMethod(info); |
| 545 } | 567 } |
| 546 | 568 |
| 547 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 569 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 548 { | 570 { |
| 549 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface5", info.Holder(), info.GetIsolate()); | 571 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "values"); |
| 572 |
| 550 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 573 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 574 |
| 551 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 575 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 552 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); | 576 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
| 553 if (exceptionState.hadException()) { | 577 if (exceptionState.hadException()) { |
| 554 return; | 578 return; |
| 555 } | 579 } |
| 556 v8SetReturnValue(info, result); | 580 v8SetReturnValue(info, result); |
| 557 } | 581 } |
| 558 | 582 |
| 559 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 583 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 560 { | 584 { |
| 561 TestInterface5ImplementationV8Internal::valuesMethod(info); | 585 TestInterface5ImplementationV8Internal::valuesMethod(info); |
| 562 } | 586 } |
| 563 | 587 |
| 564 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 588 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 565 { | 589 { |
| 566 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface5", info.Holder(), info.GetIsolate()); | 590 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "entries"); |
| 591 |
| 567 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 592 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 593 |
| 568 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 594 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 569 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); | 595 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
| 570 if (exceptionState.hadException()) { | 596 if (exceptionState.hadException()) { |
| 571 return; | 597 return; |
| 572 } | 598 } |
| 573 v8SetReturnValue(info, result); | 599 v8SetReturnValue(info, result); |
| 574 } | 600 } |
| 575 | 601 |
| 576 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 602 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 577 { | 603 { |
| 578 TestInterface5ImplementationV8Internal::entriesMethod(info); | 604 TestInterface5ImplementationV8Internal::entriesMethod(info); |
| 579 } | 605 } |
| 580 | 606 |
| 581 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 607 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 582 { | 608 { |
| 583 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface5", info.Holder(), info.GetIsolate()); | 609 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "forEach"); |
| 610 |
| 584 if (UNLIKELY(info.Length() < 1)) { | 611 if (UNLIKELY(info.Length() < 1)) { |
| 585 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 612 throwMinimumArityError(exceptionState, 1, info.Length()); |
| 586 return; | 613 return; |
| 587 } | 614 } |
| 615 |
| 588 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 616 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 617 |
| 618 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 589 ScriptValue callback; | 619 ScriptValue callback; |
| 590 ScriptValue thisArg; | 620 ScriptValue thisArg; |
| 591 { | 621 { |
| 592 if (!info[0]->IsFunction()) { | 622 if (!info[0]->IsFunction()) { |
| 593 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 623 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 594 return; | 624 return; |
| 595 } | 625 } |
| 596 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 626 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
| 597 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 627 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| 598 } | 628 } |
| 599 ScriptState* scriptState = ScriptState::forReceiverObject(info); | |
| 600 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); | 629 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder())
, callback, thisArg, exceptionState); |
| 601 if (exceptionState.hadException()) { | 630 if (exceptionState.hadException()) { |
| 602 return; | 631 return; |
| 603 } | 632 } |
| 604 } | 633 } |
| 605 | 634 |
| 606 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 635 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 607 { | 636 { |
| 608 TestInterface5ImplementationV8Internal::forEachMethod(info); | 637 TestInterface5ImplementationV8Internal::forEachMethod(info); |
| 609 } | 638 } |
| 610 | 639 |
| 611 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 640 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 612 { | 641 { |
| 613 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 642 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 643 |
| 614 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); | 644 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
| 615 } | 645 } |
| 616 | 646 |
| 617 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 647 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 618 { | 648 { |
| 619 TestInterface5ImplementationV8Internal::toStringMethod(info); | 649 TestInterface5ImplementationV8Internal::toStringMethod(info); |
| 620 } | 650 } |
| 621 | 651 |
| 622 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 652 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 623 { | 653 { |
| 624 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface5", info.Holder(), info.GetIsolate()); | 654 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface5", "iterator"); |
| 655 |
| 625 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 656 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 657 |
| 626 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 658 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
| 627 Iterator* result = impl->iterator(scriptState, exceptionState); | 659 Iterator* result = impl->iterator(scriptState, exceptionState); |
| 628 if (exceptionState.hadException()) { | 660 if (exceptionState.hadException()) { |
| 629 return; | 661 return; |
| 630 } | 662 } |
| 631 v8SetReturnValue(info, result); | 663 v8SetReturnValue(info, result); |
| 632 } | 664 } |
| 633 | 665 |
| 634 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 666 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 635 { | 667 { |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 949 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV
8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; |
| 918 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); | 950 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodC
onfiguration); |
| 919 } | 951 } |
| 920 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { | 952 if (executionContext && (executionContext->isDocument() || executionContext-
>isServiceWorkerGlobalScope())) { |
| 921 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; | 953 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpo
sedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInter
face5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback
, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype}; |
| 922 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); | 954 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet
hodMethodConfiguration); |
| 923 } | 955 } |
| 924 } | 956 } |
| 925 | 957 |
| 926 } // namespace blink | 958 } // namespace blink |
| OLD | NEW |