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