OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "HTMLNames.h" | 10 #include "HTMLNames.h" |
(...skipping 5519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5530 | 5530 |
5531 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5531 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
5532 { | 5532 { |
5533 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5533 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5534 TestObjectV8Internal::nodeFilterMethodMethod(info); | 5534 TestObjectV8Internal::nodeFilterMethodMethod(info); |
5535 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5535 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5536 } | 5536 } |
5537 | 5537 |
5538 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5538 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
5539 { | 5539 { |
| 5540 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
od", "TestObject", info.Holder(), info.GetIsolate()); |
| 5541 if (UNLIKELY(info.Length() < 3)) { |
| 5542 v8SetReturnValue(info, ScriptPromise::rejectWithArityTypeError(exception
State, 3, info.Length()).v8Value()); |
| 5543 return; |
| 5544 } |
5540 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5545 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5541 v8SetReturnValue(info, impl->promiseMethod().v8Value()); | 5546 V8TRYCATCH_EXCEPTION_VOID_PROMISE(int, arg1, toInt32(info[0], exceptionState
), info, exceptionState); |
| 5547 V8TRYCATCH_VOID_PROMISE(Dictionary, arg2, Dictionary(info[1], info.GetIsolat
e()), info); |
| 5548 if (!arg2.isUndefinedOrNull() && !arg2.isObject()) { |
| 5549 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object."); |
| 5550 v8SetReturnValue(info, exceptionState.rejectedPromise().v8Value()); |
| 5551 return; |
| 5552 } |
| 5553 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID_PROMISE(V8StringResource<>, arg3, info[
2], info); |
| 5554 V8TRYCATCH_VOID_PROMISE(Vector<String>, variadic, toNativeArguments<String>(
info, 3), info); |
| 5555 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val
ue()); |
5542 } | 5556 } |
5543 | 5557 |
5544 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | 5558 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
5545 { | 5559 { |
5546 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5560 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5547 TestObjectV8Internal::promiseMethodMethod(info); | 5561 TestObjectV8Internal::promiseMethodMethod(info); |
5548 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5562 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5549 } | 5563 } |
5550 | 5564 |
| 5565 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 5566 { |
| 5567 if (UNLIKELY(info.Length() < 1)) { |
| 5568 v8SetReturnValue(info, ScriptPromise::rejectWithArityTypeErrorForMethod(
"promiseMethodWithoutExceptionState", "TestObject", 1, info.Length(), info.GetIs
olate()).v8Value()); |
| 5569 return; |
| 5570 } |
| 5571 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5572 V8TRYCATCH_VOID_PROMISE(Dictionary, arg1, Dictionary(info[0], info.GetIsolat
e()), info); |
| 5573 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { |
| 5574 v8SetReturnValue(info, ScriptPromise::rejectWithTypeError(ExceptionMessa
ges::failedToExecute("promiseMethodWithoutExceptionState", "TestObject", "parame
ter 1 ('arg1') is not an object."), info.GetIsolate()).v8Value()); |
| 5575 return; |
| 5576 } |
| 5577 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); |
| 5578 } |
| 5579 |
| 5580 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 5581 { |
| 5582 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5583 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); |
| 5584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5585 } |
| 5586 |
5551 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5587 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
5552 { | 5588 { |
5553 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5589 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5554 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); | 5590 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); |
5555 } | 5591 } |
5556 | 5592 |
5557 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 5593 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
5558 { | 5594 { |
5559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5560 TestObjectV8Internal::serializedScriptValueMethodMethod(info); | 5596 TestObjectV8Internal::serializedScriptValueMethodMethod(info); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5659 | 5695 |
5660 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 5696 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
5661 { | 5697 { |
5662 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); | 5698 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); |
5663 if (UNLIKELY(info.Length() < 1)) { | 5699 if (UNLIKELY(info.Length() < 1)) { |
5664 throwArityTypeError(exceptionState, 1, info.Length()); | 5700 throwArityTypeError(exceptionState, 1, info.Length()); |
5665 return; | 5701 return; |
5666 } | 5702 } |
5667 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5703 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5668 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptVal
ue::create(info[0], 0, 0, exceptionState, info.GetIsolate()); | 5704 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptVal
ue::create(info[0], 0, 0, exceptionState, info.GetIsolate()); |
5669 if (exceptionState.throwIfNeeded()) | 5705 if (exceptionState.hadException()) { |
| 5706 exceptionState.throwIfNeeded(); |
5670 return; | 5707 return; |
| 5708 } |
5671 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); | 5709 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); |
5672 } | 5710 } |
5673 | 5711 |
5674 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 5712 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
5675 { | 5713 { |
5676 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5714 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5677 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); | 5715 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); |
5678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5716 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5679 } | 5717 } |
5680 | 5718 |
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7318 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7356 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7319 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); | 7357 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); |
7320 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7358 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7321 } | 7359 } |
7322 | 7360 |
7323 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7361 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
7324 { | 7362 { |
7325 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 7363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
7326 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7364 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7327 impl->raisesExceptionVoidMethod(exceptionState); | 7365 impl->raisesExceptionVoidMethod(exceptionState); |
7328 if (exceptionState.throwIfNeeded()) | 7366 if (exceptionState.hadException()) { |
| 7367 exceptionState.throwIfNeeded(); |
7329 return; | 7368 return; |
| 7369 } |
7330 } | 7370 } |
7331 | 7371 |
7332 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7372 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
7333 { | 7373 { |
7334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7335 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); | 7375 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); |
7336 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7337 } | 7377 } |
7338 | 7378 |
7339 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7379 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7340 { | 7380 { |
7341 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); | 7381 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); |
7342 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7382 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7343 String result = impl->raisesExceptionStringMethod(exceptionState); | 7383 String result = impl->raisesExceptionStringMethod(exceptionState); |
7344 if (exceptionState.throwIfNeeded()) | 7384 if (exceptionState.hadException()) { |
| 7385 exceptionState.throwIfNeeded(); |
7345 return; | 7386 return; |
| 7387 } |
7346 v8SetReturnValueString(info, result, info.GetIsolate()); | 7388 v8SetReturnValueString(info, result, info.GetIsolate()); |
7347 } | 7389 } |
7348 | 7390 |
7349 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7391 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
7350 { | 7392 { |
7351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7352 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); | 7394 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); |
7353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7395 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7354 } | 7396 } |
7355 | 7397 |
7356 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 7398 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
7357 { | 7399 { |
7358 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7400 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7359 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7401 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7360 if (UNLIKELY(info.Length() <= 0)) { | 7402 if (UNLIKELY(info.Length() <= 0)) { |
7361 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | 7403 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); |
7362 if (exceptionState.throwIfNeeded()) | 7404 if (exceptionState.hadException()) { |
| 7405 exceptionState.throwIfNeeded(); |
7363 return; | 7406 return; |
| 7407 } |
7364 return; | 7408 return; |
7365 } | 7409 } |
7366 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt
ate), exceptionState); | 7410 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt
ate), exceptionState); |
7367 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); | 7411 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); |
7368 if (exceptionState.throwIfNeeded()) | 7412 if (exceptionState.hadException()) { |
| 7413 exceptionState.throwIfNeeded(); |
7369 return; | 7414 return; |
| 7415 } |
7370 } | 7416 } |
7371 | 7417 |
7372 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 7418 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
7373 { | 7419 { |
7374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7375 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); | 7421 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); |
7376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7377 } | 7423 } |
7378 | 7424 |
7379 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 7425 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
7380 { | 7426 { |
7381 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); | 7427 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); |
7382 if (UNLIKELY(info.Length() < 1)) { | 7428 if (UNLIKELY(info.Length() < 1)) { |
7383 throwArityTypeError(exceptionState, 1, info.Length()); | 7429 throwArityTypeError(exceptionState, 1, info.Length()); |
7384 return; | 7430 return; |
7385 } | 7431 } |
7386 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7432 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7387 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 7433 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
7388 exceptionState.throwTypeError("The callback provided as parameter 1 is n
ot a function."); | 7434 exceptionState.throwTypeError("The callback provided as parameter 1 is n
ot a function."); |
7389 exceptionState.throwIfNeeded(); | 7435 exceptionState.throwIfNeeded(); |
7390 return; | 7436 return; |
7391 } | 7437 } |
7392 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter
face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in
fo.GetIsolate())); | 7438 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter
face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in
fo.GetIsolate())); |
7393 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); | 7439 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); |
7394 if (exceptionState.throwIfNeeded()) | 7440 if (exceptionState.hadException()) { |
| 7441 exceptionState.throwIfNeeded(); |
7395 return; | 7442 return; |
| 7443 } |
7396 } | 7444 } |
7397 | 7445 |
7398 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 7446 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
7399 { | 7447 { |
7400 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7448 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7401 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 7449 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); |
7402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7450 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7403 } | 7451 } |
7404 | 7452 |
7405 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 7453 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
7406 { | 7454 { |
7407 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 7455 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); |
7408 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7456 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7409 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; | 7457 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; |
7410 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 7458 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
7411 if (!info[0]->IsFunction()) { | 7459 if (!info[0]->IsFunction()) { |
7412 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 7460 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
7413 exceptionState.throwIfNeeded(); | 7461 exceptionState.throwIfNeeded(); |
7414 return; | 7462 return; |
7415 } | 7463 } |
7416 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H
andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); | 7464 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H
andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); |
7417 } | 7465 } |
7418 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); | 7466 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); |
7419 if (exceptionState.throwIfNeeded()) | 7467 if (exceptionState.hadException()) { |
| 7468 exceptionState.throwIfNeeded(); |
7420 return; | 7469 return; |
| 7470 } |
7421 } | 7471 } |
7422 | 7472 |
7423 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 7473 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
7424 { | 7474 { |
7425 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7475 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7426 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 7476 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); |
7427 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7477 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7428 } | 7478 } |
7429 | 7479 |
7430 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 7480 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
7431 { | 7481 { |
7432 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 7482 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
7433 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7483 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7434 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); | 7484 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); |
7435 if (exceptionState.throwIfNeeded()) | 7485 if (exceptionState.hadException()) { |
| 7486 exceptionState.throwIfNeeded(); |
7436 return; | 7487 return; |
| 7488 } |
7437 v8SetReturnValue(info, result.release()); | 7489 v8SetReturnValue(info, result.release()); |
7438 } | 7490 } |
7439 | 7491 |
7440 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 7492 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
7441 { | 7493 { |
7442 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7494 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7443 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); | 7495 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); |
7444 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7445 } | 7497 } |
7446 | 7498 |
7447 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 7499 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
7448 { | 7500 { |
7449 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | 7501 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); |
7450 if (UNLIKELY(info.Length() < 1)) { | 7502 if (UNLIKELY(info.Length() < 1)) { |
7451 throwArityTypeError(exceptionState, 1, info.Length()); | 7503 throwArityTypeError(exceptionState, 1, info.Length()); |
7452 return; | 7504 return; |
7453 } | 7505 } |
7454 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7506 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7455 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); | 7507 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
7456 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 7508 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
7457 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(scriptContext
, longArg, exceptionState); | 7509 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(scriptContext
, longArg, exceptionState); |
7458 if (exceptionState.throwIfNeeded()) | 7510 if (exceptionState.hadException()) { |
| 7511 exceptionState.throwIfNeeded(); |
7459 return; | 7512 return; |
| 7513 } |
7460 } | 7514 } |
7461 | 7515 |
7462 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 7516 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
7463 { | 7517 { |
7464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7518 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7465 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); | 7519 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); |
7466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7520 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7467 } | 7521 } |
7468 | 7522 |
7469 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7523 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7869 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri
ngArgMethodCallback, 0, 1}, | 7923 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri
ngArgMethodCallback, 0, 1}, |
7870 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
SequenceTestInterfaceEmptyArgMethodCallback, 0, 1}, | 7924 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
SequenceTestInterfaceEmptyArgMethodCallback, 0, 1}, |
7871 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe
stInterfaceEmptyOrNullArgMethodCallback, 0, 1}, | 7925 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe
stInterfaceEmptyOrNullArgMethodCallback, 0, 1}, |
7872 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC
allbackInterfaceArgMethodCallback, 0, 1}, | 7926 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC
allbackInterfaceArgMethodCallback, 0, 1}, |
7873 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet
hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0}, | 7927 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet
hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0}, |
7874 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho
dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1}, | 7928 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho
dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1}, |
7875 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0}
, | 7929 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0}
, |
7876 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC
allback, 0, 1}, | 7930 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC
allback, 0, 1}, |
7877 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0
, 0}, | 7931 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0
, 0}, |
7878 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0
, 0}, | 7932 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0
, 0}, |
7879 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 0}, | 7933 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 4}, |
| 7934 {"promiseMethodWithoutExceptionState", TestObjectV8Internal::promiseMethodWi
thoutExceptionStateMethodCallback, 0, 1}, |
7880 {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueM
ethodMethodCallback, 0, 0}, | 7935 {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueM
ethodMethodCallback, 0, 0}, |
7881 {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodC
allback, 0, 0}, | 7936 {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodC
allback, 0, 0}, |
7882 {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMet
hodCallback, 0, 1}, | 7937 {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMet
hodCallback, 0, 1}, |
7883 {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListener
ArgMethodCallback, 0, 1}, | 7938 {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListener
ArgMethodCallback, 0, 1}, |
7884 {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMet
hodCallback, 0, 1}, | 7939 {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMet
hodCallback, 0, 1}, |
7885 {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCal
lback, 0, 1}, | 7940 {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCal
lback, 0, 1}, |
7886 {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSeria
lizedScriptValueArgMethodCallback, 0, 1}, | 7941 {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSeria
lizedScriptValueArgMethodCallback, 0, 1}, |
7887 {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSReso
lverArgMethodCallback, 0, 1}, | 7942 {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSReso
lverArgMethodCallback, 0, 1}, |
7888 {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictiona
rySequenceArgMethodCallback, 0, 1}, | 7943 {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictiona
rySequenceArgMethodCallback, 0, 1}, |
7889 {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLong
ArgMethodCallback, 0, 2}, | 7944 {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLong
ArgMethodCallback, 0, 2}, |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8140 fromInternalPointer(object)->deref(); | 8195 fromInternalPointer(object)->deref(); |
8141 } | 8196 } |
8142 | 8197 |
8143 template<> | 8198 template<> |
8144 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 8199 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
8145 { | 8200 { |
8146 return toV8(impl, creationContext, isolate); | 8201 return toV8(impl, creationContext, isolate); |
8147 } | 8202 } |
8148 | 8203 |
8149 } // namespace WebCore | 8204 } // namespace WebCore |
OLD | NEW |