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 5663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5674 | 5674 |
5675 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 5675 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
5676 { | 5676 { |
5677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5678 TestObjectV8Internal::nodeFilterMethodMethod(info); | 5678 TestObjectV8Internal::nodeFilterMethodMethod(info); |
5679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5680 } | 5680 } |
5681 | 5681 |
5682 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 5682 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
5683 { | 5683 { |
| 5684 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
od", "TestObject", info.Holder(), info.GetIsolate()); |
| 5685 if (UNLIKELY(info.Length() < 3)) { |
| 5686 v8SetReturnValue(info, ScriptPromise::rejectWithArityTypeError(exception
State, 3, info.Length()).v8Value()); |
| 5687 return; |
| 5688 } |
5684 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5689 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5685 v8SetReturnValue(info, impl->promiseMethod().v8Value()); | 5690 TONATIVE_VOID_EXCEPTIONSTATE_ASYNC(int, arg1, toInt32(info[0], exceptionStat
e), exceptionState, info); |
| 5691 TONATIVE_VOID_ASYNC(Dictionary, arg2, Dictionary(info[1], info.GetIsolate())
, info); |
| 5692 if (!arg2.isUndefinedOrNull() && !arg2.isObject()) { |
| 5693 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object."); |
| 5694 v8SetReturnValue(info, exceptionState.reject().v8Value()); |
| 5695 return; |
| 5696 } |
| 5697 TOSTRING_VOID_ASYNC(V8StringResource<>, arg3, info[2], info); |
| 5698 TONATIVE_VOID_ASYNC(Vector<String>, variadic, toNativeArguments<String>(info
, 3), info); |
| 5699 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val
ue()); |
5686 } | 5700 } |
5687 | 5701 |
5688 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | 5702 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
5689 { | 5703 { |
5690 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5691 TestObjectV8Internal::promiseMethodMethod(info); | 5705 TestObjectV8Internal::promiseMethodMethod(info); |
5692 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5693 } | 5707 } |
5694 | 5708 |
| 5709 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 5710 { |
| 5711 if (UNLIKELY(info.Length() < 1)) { |
| 5712 v8SetReturnValue(info, ScriptPromise::rejectWithArityTypeErrorForMethod(
"promiseMethodWithoutExceptionState", "TestObject", 1, info.Length(), info.GetIs
olate()).v8Value()); |
| 5713 return; |
| 5714 } |
| 5715 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 5716 TONATIVE_VOID_ASYNC(Dictionary, arg1, Dictionary(info[0], info.GetIsolate())
, info); |
| 5717 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { |
| 5718 v8SetReturnValue(info, ScriptPromise::rejectWithTypeError(ExceptionMessa
ges::failedToExecute("promiseMethodWithoutExceptionState", "TestObject", "parame
ter 1 ('arg1') is not an object."), info.GetIsolate()).v8Value()); |
| 5719 return; |
| 5720 } |
| 5721 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); |
| 5722 } |
| 5723 |
| 5724 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 5725 { |
| 5726 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 5727 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); |
| 5728 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 5729 } |
| 5730 |
5695 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 5731 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
5696 { | 5732 { |
5697 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5733 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5698 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); | 5734 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize
dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso
late()))); |
5699 } | 5735 } |
5700 | 5736 |
5701 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 5737 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
5702 { | 5738 { |
5703 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5704 TestObjectV8Internal::serializedScriptValueMethodMethod(info); | 5740 TestObjectV8Internal::serializedScriptValueMethodMethod(info); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5803 | 5839 |
5804 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 5840 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
5805 { | 5841 { |
5806 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); | 5842 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS
erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); |
5807 if (UNLIKELY(info.Length() < 1)) { | 5843 if (UNLIKELY(info.Length() < 1)) { |
5808 throwArityTypeError(exceptionState, 1, info.Length()); | 5844 throwArityTypeError(exceptionState, 1, info.Length()); |
5809 return; | 5845 return; |
5810 } | 5846 } |
5811 TestObject* impl = V8TestObject::toNative(info.Holder()); | 5847 TestObject* impl = V8TestObject::toNative(info.Holder()); |
5812 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptVal
ue::create(info[0], 0, 0, exceptionState, info.GetIsolate()); | 5848 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptVal
ue::create(info[0], 0, 0, exceptionState, info.GetIsolate()); |
5813 if (exceptionState.throwIfNeeded()) | 5849 if (exceptionState.hadException()) { |
| 5850 exceptionState.throwIfNeeded(); |
5814 return; | 5851 return; |
| 5852 } |
5815 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); | 5853 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); |
5816 } | 5854 } |
5817 | 5855 |
5818 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 5856 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
5819 { | 5857 { |
5820 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5858 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5821 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); | 5859 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); |
5822 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 5860 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
5823 } | 5861 } |
5824 | 5862 |
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7521 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7484 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); | 7522 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe
thodMethodForMainWorld(info); |
7485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7523 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7486 } | 7524 } |
7487 | 7525 |
7488 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7526 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
7489 { | 7527 { |
7490 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); | 7528 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
7491 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7529 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7492 impl->raisesExceptionVoidMethod(exceptionState); | 7530 impl->raisesExceptionVoidMethod(exceptionState); |
7493 if (exceptionState.throwIfNeeded()) | 7531 if (exceptionState.hadException()) { |
| 7532 exceptionState.throwIfNeeded(); |
7494 return; | 7533 return; |
| 7534 } |
7495 } | 7535 } |
7496 | 7536 |
7497 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7537 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
7498 { | 7538 { |
7499 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7539 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7500 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); | 7540 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); |
7501 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7502 } | 7542 } |
7503 | 7543 |
7504 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7544 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7505 { | 7545 { |
7506 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); | 7546 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); |
7507 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7547 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7508 String result = impl->raisesExceptionStringMethod(exceptionState); | 7548 String result = impl->raisesExceptionStringMethod(exceptionState); |
7509 if (exceptionState.throwIfNeeded()) | 7549 if (exceptionState.hadException()) { |
| 7550 exceptionState.throwIfNeeded(); |
7510 return; | 7551 return; |
| 7552 } |
7511 v8SetReturnValueString(info, result, info.GetIsolate()); | 7553 v8SetReturnValueString(info, result, info.GetIsolate()); |
7512 } | 7554 } |
7513 | 7555 |
7514 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7556 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
7515 { | 7557 { |
7516 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7558 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7517 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); | 7559 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); |
7518 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7560 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7519 } | 7561 } |
7520 | 7562 |
7521 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 7563 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
7522 { | 7564 { |
7523 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7565 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7524 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7566 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7525 if (UNLIKELY(info.Length() <= 0)) { | 7567 if (UNLIKELY(info.Length() <= 0)) { |
7526 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | 7568 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); |
7527 if (exceptionState.throwIfNeeded()) | 7569 if (exceptionState.hadException()) { |
| 7570 exceptionState.throwIfNeeded(); |
7528 return; | 7571 return; |
| 7572 } |
7529 return; | 7573 return; |
7530 } | 7574 } |
7531 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptio
nState), exceptionState); | 7575 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptio
nState), exceptionState); |
7532 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); | 7576 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); |
7533 if (exceptionState.throwIfNeeded()) | 7577 if (exceptionState.hadException()) { |
| 7578 exceptionState.throwIfNeeded(); |
7534 return; | 7579 return; |
| 7580 } |
7535 } | 7581 } |
7536 | 7582 |
7537 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 7583 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
7538 { | 7584 { |
7539 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7585 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7540 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); | 7586 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); |
7541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7587 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7542 } | 7588 } |
7543 | 7589 |
7544 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 7590 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
7545 { | 7591 { |
7546 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); | 7592 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); |
7547 if (UNLIKELY(info.Length() < 1)) { | 7593 if (UNLIKELY(info.Length() < 1)) { |
7548 throwArityTypeError(exceptionState, 1, info.Length()); | 7594 throwArityTypeError(exceptionState, 1, info.Length()); |
7549 return; | 7595 return; |
7550 } | 7596 } |
7551 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7597 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7552 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 7598 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
7553 exceptionState.throwTypeError("The callback provided as parameter 1 is n
ot a function."); | 7599 exceptionState.throwTypeError("The callback provided as parameter 1 is n
ot a function."); |
7554 exceptionState.throwIfNeeded(); | 7600 exceptionState.throwIfNeeded(); |
7555 return; | 7601 return; |
7556 } | 7602 } |
7557 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter
face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in
fo.GetIsolate())); | 7603 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter
face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in
fo.GetIsolate())); |
7558 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); | 7604 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); |
7559 if (exceptionState.throwIfNeeded()) | 7605 if (exceptionState.hadException()) { |
| 7606 exceptionState.throwIfNeeded(); |
7560 return; | 7607 return; |
| 7608 } |
7561 } | 7609 } |
7562 | 7610 |
7563 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 7611 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
7564 { | 7612 { |
7565 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7613 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7566 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 7614 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); |
7567 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7615 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7568 } | 7616 } |
7569 | 7617 |
7570 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 7618 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
7571 { | 7619 { |
7572 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 7620 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); |
7573 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7621 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7574 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; | 7622 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; |
7575 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 7623 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
7576 if (!info[0]->IsFunction()) { | 7624 if (!info[0]->IsFunction()) { |
7577 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 7625 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
7578 exceptionState.throwIfNeeded(); | 7626 exceptionState.throwIfNeeded(); |
7579 return; | 7627 return; |
7580 } | 7628 } |
7581 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H
andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); | 7629 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H
andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate())); |
7582 } | 7630 } |
7583 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); | 7631 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); |
7584 if (exceptionState.throwIfNeeded()) | 7632 if (exceptionState.hadException()) { |
| 7633 exceptionState.throwIfNeeded(); |
7585 return; | 7634 return; |
| 7635 } |
7586 } | 7636 } |
7587 | 7637 |
7588 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 7638 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
7589 { | 7639 { |
7590 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7640 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7591 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 7641 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); |
7592 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7642 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7593 } | 7643 } |
7594 | 7644 |
7595 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) | 7645 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
7596 { | 7646 { |
7597 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); | 7647 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate(
)); |
7598 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7648 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7599 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); | 7649 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV
oidMethod(exceptionState); |
7600 if (exceptionState.throwIfNeeded()) | 7650 if (exceptionState.hadException()) { |
| 7651 exceptionState.throwIfNeeded(); |
7601 return; | 7652 return; |
| 7653 } |
7602 v8SetReturnValue(info, result.release()); | 7654 v8SetReturnValue(info, result.release()); |
7603 } | 7655 } |
7604 | 7656 |
7605 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) | 7657 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
7606 { | 7658 { |
7607 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7659 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7608 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); | 7660 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info
); |
7609 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7661 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7610 } | 7662 } |
7611 | 7663 |
7612 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 7664 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
7613 { | 7665 { |
7614 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); | 7666 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe
cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf
o.GetIsolate()); |
7615 if (UNLIKELY(info.Length() < 1)) { | 7667 if (UNLIKELY(info.Length() < 1)) { |
7616 throwArityTypeError(exceptionState, 1, info.Length()); | 7668 throwArityTypeError(exceptionState, 1, info.Length()); |
7617 return; | 7669 return; |
7618 } | 7670 } |
7619 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7671 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7620 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState),
exceptionState); | 7672 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState),
exceptionState); |
7621 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 7673 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
7622 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(scriptContext
, longArg, exceptionState); | 7674 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(scriptContext
, longArg, exceptionState); |
7623 if (exceptionState.throwIfNeeded()) | 7675 if (exceptionState.hadException()) { |
| 7676 exceptionState.throwIfNeeded(); |
7624 return; | 7677 return; |
| 7678 } |
7625 } | 7679 } |
7626 | 7680 |
7627 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) | 7681 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba
ck(const v8::FunctionCallbackInfo<v8::Value>& info) |
7628 { | 7682 { |
7629 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
7630 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); | 7684 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA
rgMethod(info); |
7631 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
7632 } | 7686 } |
7633 | 7687 |
7634 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7688 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8074 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri
ngArgMethodCallback, 0, 1}, | 8128 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri
ngArgMethodCallback, 0, 1}, |
8075 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
SequenceTestInterfaceEmptyArgMethodCallback, 0, 1}, | 8129 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
SequenceTestInterfaceEmptyArgMethodCallback, 0, 1}, |
8076 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe
stInterfaceEmptyOrNullArgMethodCallback, 0, 1}, | 8130 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe
stInterfaceEmptyOrNullArgMethodCallback, 0, 1}, |
8077 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC
allbackInterfaceArgMethodCallback, 0, 1}, | 8131 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC
allbackInterfaceArgMethodCallback, 0, 1}, |
8078 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet
hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0}, | 8132 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet
hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0}, |
8079 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho
dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1}, | 8133 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho
dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1}, |
8080 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0}
, | 8134 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0}
, |
8081 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC
allback, 0, 1}, | 8135 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC
allback, 0, 1}, |
8082 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0
, 0}, | 8136 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0
, 0}, |
8083 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0
, 0}, | 8137 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0
, 0}, |
8084 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 0}, | 8138 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 4}, |
| 8139 {"promiseMethodWithoutExceptionState", TestObjectV8Internal::promiseMethodWi
thoutExceptionStateMethodCallback, 0, 1}, |
8085 {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueM
ethodMethodCallback, 0, 0}, | 8140 {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueM
ethodMethodCallback, 0, 0}, |
8086 {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodC
allback, 0, 0}, | 8141 {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodC
allback, 0, 0}, |
8087 {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMet
hodCallback, 0, 1}, | 8142 {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMet
hodCallback, 0, 1}, |
8088 {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListener
ArgMethodCallback, 0, 1}, | 8143 {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListener
ArgMethodCallback, 0, 1}, |
8089 {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMet
hodCallback, 0, 1}, | 8144 {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMet
hodCallback, 0, 1}, |
8090 {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCal
lback, 0, 1}, | 8145 {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCal
lback, 0, 1}, |
8091 {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSeria
lizedScriptValueArgMethodCallback, 0, 1}, | 8146 {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSeria
lizedScriptValueArgMethodCallback, 0, 1}, |
8092 {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSReso
lverArgMethodCallback, 0, 1}, | 8147 {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSReso
lverArgMethodCallback, 0, 1}, |
8093 {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictiona
rySequenceArgMethodCallback, 0, 1}, | 8148 {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictiona
rySequenceArgMethodCallback, 0, 1}, |
8094 {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLong
ArgMethodCallback, 0, 2}, | 8149 {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLong
ArgMethodCallback, 0, 2}, |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8348 fromInternalPointer(object)->deref(); | 8403 fromInternalPointer(object)->deref(); |
8349 } | 8404 } |
8350 | 8405 |
8351 template<> | 8406 template<> |
8352 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) | 8407 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea
tionContext, v8::Isolate* isolate) |
8353 { | 8408 { |
8354 return toV8(impl, creationContext, isolate); | 8409 return toV8(impl, creationContext, isolate); |
8355 } | 8410 } |
8356 | 8411 |
8357 } // namespace WebCore | 8412 } // namespace WebCore |
OLD | NEW |