| 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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
| 9 #include "V8TestInterface.h" | 9 #include "V8TestInterface.h" |
| 10 | 10 |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 | 795 |
| 796 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 796 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 797 { | 797 { |
| 798 if (UNLIKELY(info.Length() < 1)) { | 798 if (UNLIKELY(info.Length() < 1)) { |
| 799 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArg", "
TestInterface", 1, info.Length(), info.GetIsolate()); | 799 throwMinimumArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArg", "
TestInterface", 1, info.Length(), info.GetIsolate()); |
| 800 return; | 800 return; |
| 801 } | 801 } |
| 802 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 802 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 803 TestInterfaceEmpty* testInterfaceEmptyArg; | 803 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 804 { | 804 { |
| 805 v8::TryCatch block; | 805 V8TryPropagate block; |
| 806 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { | 806 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { |
| 807 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInt
erfaceEmptyArg", "TestInterface", "parameter 1 is not of type 'TestInterfaceEmpt
y'."), info.GetIsolate()); | 807 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInt
erfaceEmptyArg", "TestInterface", "parameter 1 is not of type 'TestInterfaceEmpt
y'."), info.GetIsolate()); |
| 808 block.ReThrow(); | |
| 809 return; | 808 return; |
| 810 } | 809 } |
| 811 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 810 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); |
| 812 } | 811 } |
| 813 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | 812 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| 814 } | 813 } |
| 815 | 814 |
| 816 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 815 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 817 { | 816 { |
| 818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 817 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 819 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod
(info); | 818 TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethod
(info); |
| 820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 819 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 821 } | 820 } |
| 822 | 821 |
| 823 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 822 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 824 { | 823 { |
| 825 if (UNLIKELY(info.Length() < 2)) { | 824 if (UNLIKELY(info.Length() < 2)) { |
| 826 throwMinimumArityTypeErrorForMethod("voidMethodDoubleArgFloatArg", "Test
Interface", 2, info.Length(), info.GetIsolate()); | 825 throwMinimumArityTypeErrorForMethod("voidMethodDoubleArgFloatArg", "Test
Interface", 2, info.Length(), info.GetIsolate()); |
| 827 return; | 826 return; |
| 828 } | 827 } |
| 829 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 828 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 830 double doubleArg; | 829 double doubleArg; |
| 831 float floatArg; | 830 float floatArg; |
| 832 { | 831 { |
| 833 v8::TryCatch block; | 832 V8TryPropagate block; |
| 834 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | 833 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); |
| 835 if (!std::isfinite(doubleArg)) { | 834 if (!std::isfinite(doubleArg)) { |
| 836 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleA
rgFloatArg", "TestInterface", "double parameter 1 is non-finite."), info.GetIsol
ate()); | 835 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleA
rgFloatArg", "TestInterface", "double parameter 1 is non-finite."), info.GetIsol
ate()); |
| 837 block.ReThrow(); | |
| 838 return; | 836 return; |
| 839 } | 837 } |
| 840 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[1]->NumberValue
())); | 838 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[1]->NumberValue
())); |
| 841 if (!std::isfinite(floatArg)) { | 839 if (!std::isfinite(floatArg)) { |
| 842 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleA
rgFloatArg", "TestInterface", "float parameter 2 is non-finite."), info.GetIsola
te()); | 840 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleA
rgFloatArg", "TestInterface", "float parameter 2 is non-finite."), info.GetIsola
te()); |
| 843 block.ReThrow(); | |
| 844 return; | 841 return; |
| 845 } | 842 } |
| 846 } | 843 } |
| 847 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 844 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
| 848 } | 845 } |
| 849 | 846 |
| 850 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 847 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 851 { | 848 { |
| 852 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 849 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 853 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf
o); | 850 TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(inf
o); |
| 854 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 851 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 855 } | 852 } |
| 856 | 853 |
| 857 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 854 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 858 { | 855 { |
| 859 if (UNLIKELY(info.Length() < 2)) { | 856 if (UNLIKELY(info.Length() < 2)) { |
| 860 throwMinimumArityTypeErrorForMethod("voidMethodUnrestrictedDoubleArgUnre
strictedFloatArg", "TestInterface", 2, info.Length(), info.GetIsolate()); | 857 throwMinimumArityTypeErrorForMethod("voidMethodUnrestrictedDoubleArgUnre
strictedFloatArg", "TestInterface", 2, info.Length(), info.GetIsolate()); |
| 861 return; | 858 return; |
| 862 } | 859 } |
| 863 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 860 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 864 double unrestrictedDoubleArg; | 861 double unrestrictedDoubleArg; |
| 865 float unrestrictedFloatArg; | 862 float unrestrictedFloatArg; |
| 866 { | 863 { |
| 867 v8::TryCatch block; | 864 V8TryPropagate block; |
| 868 TONATIVE_VOID_INTERNAL(unrestrictedDoubleArg, static_cast<double>(info[0
]->NumberValue())); | 865 TONATIVE_VOID_INTERNAL(unrestrictedDoubleArg, static_cast<double>(info[0
]->NumberValue())); |
| 869 TONATIVE_VOID_INTERNAL(unrestrictedFloatArg, static_cast<float>(info[1]-
>NumberValue())); | 866 TONATIVE_VOID_INTERNAL(unrestrictedFloatArg, static_cast<float>(info[1]-
>NumberValue())); |
| 870 } | 867 } |
| 871 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); | 868 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); |
| 872 } | 869 } |
| 873 | 870 |
| 874 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 871 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 875 { | 872 { |
| 876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 873 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 877 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest
rictedFloatArgMethod(info); | 874 TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrest
rictedFloatArgMethod(info); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 { | 918 { |
| 922 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC
omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 919 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC
omplexMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
| 923 if (UNLIKELY(info.Length() < 2)) { | 920 if (UNLIKELY(info.Length() < 2)) { |
| 924 throwMinimumArityTypeError(exceptionState, 2, info.Length()); | 921 throwMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 925 return; | 922 return; |
| 926 } | 923 } |
| 927 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 924 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 928 V8StringResource<> strArg; | 925 V8StringResource<> strArg; |
| 929 TestInterfaceEmpty* testInterfaceEmptyArg; | 926 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 930 { | 927 { |
| 931 v8::TryCatch block; | 928 V8TryPropagate block; |
| 932 TOSTRING_VOID_INTERNAL(strArg, info[0]); | 929 TOSTRING_VOID_INTERNAL(strArg, info[0]); |
| 933 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf
o.GetIsolate())) { | 930 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], inf
o.GetIsolate())) { |
| 934 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); | 931 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter
faceEmpty'."); |
| 935 exceptionState.throwIfNeeded(); | 932 exceptionState.throwIfNeeded(); |
| 936 block.ReThrow(); | |
| 937 return; | 933 return; |
| 938 } | 934 } |
| 939 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[1])); | 935 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[1])); |
| 940 } | 936 } |
| 941 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; | 937 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate())
; |
| 942 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(scriptCont
ext, strArg, testInterfaceEmptyArg, exceptionState); | 938 RefPtr<TestInterfaceEmpty> result = impl->implementsComplexMethod(scriptCont
ext, strArg, testInterfaceEmptyArg, exceptionState); |
| 943 if (exceptionState.hadException()) { | 939 if (exceptionState.hadException()) { |
| 944 exceptionState.throwIfNeeded(); | 940 exceptionState.throwIfNeeded(); |
| 945 return; | 941 return; |
| 946 } | 942 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 1044 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 1049 { | 1045 { |
| 1050 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); | 1046 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
MethodLongArg", "TestInterface", info.Holder(), info.GetIsolate()); |
| 1051 if (UNLIKELY(info.Length() < 1)) { | 1047 if (UNLIKELY(info.Length() < 1)) { |
| 1052 throwMinimumArityTypeError(exceptionState, 1, info.Length()); | 1048 throwMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 1053 return; | 1049 return; |
| 1054 } | 1050 } |
| 1055 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 1051 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 1056 int longArg; | 1052 int longArg; |
| 1057 { | 1053 { |
| 1058 v8::TryCatch block; | 1054 V8TryPropagate block; |
| 1059 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 1055 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 1060 } | 1056 } |
| 1061 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); | 1057 TestPartialInterface::partialVoidMethodLongArg(*impl, longArg); |
| 1062 } | 1058 } |
| 1063 #endif // ENABLE(PARTIAL_CONDITION) | 1059 #endif // ENABLE(PARTIAL_CONDITION) |
| 1064 | 1060 |
| 1065 #if ENABLE(PARTIAL_CONDITION) | 1061 #if ENABLE(PARTIAL_CONDITION) |
| 1066 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 1062 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 1067 { | 1063 { |
| 1068 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 1064 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1097 #if ENABLE(PARTIAL_CONDITION) | 1093 #if ENABLE(PARTIAL_CONDITION) |
| 1098 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 1094 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 1099 { | 1095 { |
| 1100 if (UNLIKELY(info.Length() < 1)) { | 1096 if (UNLIKELY(info.Length() < 1)) { |
| 1101 throwMinimumArityTypeErrorForMethod("partialVoidMethodPartialCallbackTyp
eArg", "TestInterface", 1, info.Length(), info.GetIsolate()); | 1097 throwMinimumArityTypeErrorForMethod("partialVoidMethodPartialCallbackTyp
eArg", "TestInterface", 1, info.Length(), info.GetIsolate()); |
| 1102 return; | 1098 return; |
| 1103 } | 1099 } |
| 1104 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 1100 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 1105 ScriptValue partialCallbackTypeArg; | 1101 ScriptValue partialCallbackTypeArg; |
| 1106 { | 1102 { |
| 1107 v8::TryCatch block; | 1103 V8TryPropagate block; |
| 1108 TONATIVE_VOID_INTERNAL(partialCallbackTypeArg, ScriptValue(ScriptState::
current(info.GetIsolate()), info[0])); | 1104 TONATIVE_VOID_INTERNAL(partialCallbackTypeArg, ScriptValue(ScriptState::
current(info.GetIsolate()), info[0])); |
| 1109 } | 1105 } |
| 1110 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial
CallbackTypeArg); | 1106 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial
CallbackTypeArg); |
| 1111 } | 1107 } |
| 1112 #endif // ENABLE(PARTIAL_CONDITION) | 1108 #endif // ENABLE(PARTIAL_CONDITION) |
| 1113 | 1109 |
| 1114 #if ENABLE(PARTIAL_CONDITION) | 1110 #if ENABLE(PARTIAL_CONDITION) |
| 1115 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 1111 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 1116 { | 1112 { |
| 1117 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 1113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 } | 1505 } |
| 1510 | 1506 |
| 1511 template<> | 1507 template<> |
| 1512 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle
<v8::Object> creationContext, v8::Isolate* isolate) | 1508 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle
<v8::Object> creationContext, v8::Isolate* isolate) |
| 1513 { | 1509 { |
| 1514 return toV8(impl, creationContext, isolate); | 1510 return toV8(impl, creationContext, isolate); |
| 1515 } | 1511 } |
| 1516 | 1512 |
| 1517 } // namespace WebCore | 1513 } // namespace WebCore |
| 1518 #endif // ENABLE(CONDITION) | 1514 #endif // ENABLE(CONDITION) |
| OLD | NEW |