OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 4706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4717 return; | 4717 return; |
4718 } | 4718 } |
4719 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4719 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
4720 V8TRYCATCH_VOID(int, longArg1, toInt32(info[0])); | 4720 V8TRYCATCH_VOID(int, longArg1, toInt32(info[0])); |
4721 V8TRYCATCH_VOID(int, longArg2, toInt32(info[1])); | 4721 V8TRYCATCH_VOID(int, longArg2, toInt32(info[1])); |
4722 imp->overloadedMethodA(longArg1, longArg2); | 4722 imp->overloadedMethodA(longArg1, longArg2); |
4723 } | 4723 } |
4724 | 4724 |
4725 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4725 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4726 { | 4726 { |
| 4727 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodA", "TestObjectPython", info.Holder(), info.GetIsolate()); |
4727 if (((info.Length() == 1))) { | 4728 if (((info.Length() == 1))) { |
4728 overloadedMethodA1Method(info); | 4729 overloadedMethodA1Method(info); |
4729 return; | 4730 return; |
4730 } | 4731 } |
4731 if (((info.Length() == 2))) { | 4732 if (((info.Length() == 2))) { |
4732 overloadedMethodA2Method(info); | 4733 overloadedMethodA2Method(info); |
4733 return; | 4734 return; |
4734 } | 4735 } |
4735 if (UNLIKELY(info.Length() < 1)) { | 4736 if (UNLIKELY(info.Length() < 1)) { |
4736 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4737 exceptionState.notEnoughArguments(1, info.Length()); |
4737 return; | 4738 return; |
4738 } | 4739 } |
4739 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodA", "Test
ObjectPython", "No function was found that matched the signature provided."), in
fo.GetIsolate()); | 4740 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4741 exceptionState.throwIfNeeded(); |
4740 } | 4742 } |
4741 | 4743 |
4742 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4744 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4743 { | 4745 { |
4744 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4746 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4745 TestObjectPythonV8Internal::overloadedMethodAMethod(info); | 4747 TestObjectPythonV8Internal::overloadedMethodAMethod(info); |
4746 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4748 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
4747 } | 4749 } |
4748 | 4750 |
4749 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4751 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 18 matching lines...) Expand all Loading... |
4768 if (UNLIKELY(info.Length() <= 1)) { | 4770 if (UNLIKELY(info.Length() <= 1)) { |
4769 imp->overloadedMethodB(longArg1); | 4771 imp->overloadedMethodB(longArg1); |
4770 return; | 4772 return; |
4771 } | 4773 } |
4772 V8TRYCATCH_VOID(int, longArg2, toInt32(info[1])); | 4774 V8TRYCATCH_VOID(int, longArg2, toInt32(info[1])); |
4773 imp->overloadedMethodB(longArg1, longArg2); | 4775 imp->overloadedMethodB(longArg1, longArg2); |
4774 } | 4776 } |
4775 | 4777 |
4776 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4778 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4777 { | 4779 { |
| 4780 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObjectPython", info.Holder(), info.GetIsolate()); |
4778 if (((info.Length() == 1))) { | 4781 if (((info.Length() == 1))) { |
4779 overloadedMethodB1Method(info); | 4782 overloadedMethodB1Method(info); |
4780 return; | 4783 return; |
4781 } | 4784 } |
4782 if (((info.Length() == 1)) || ((info.Length() == 2))) { | 4785 if (((info.Length() == 1)) || ((info.Length() == 2))) { |
4783 overloadedMethodB2Method(info); | 4786 overloadedMethodB2Method(info); |
4784 return; | 4787 return; |
4785 } | 4788 } |
4786 if (UNLIKELY(info.Length() < 1)) { | 4789 if (UNLIKELY(info.Length() < 1)) { |
4787 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4790 exceptionState.notEnoughArguments(1, info.Length()); |
4788 return; | 4791 return; |
4789 } | 4792 } |
4790 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodB", "Test
ObjectPython", "No function was found that matched the signature provided."), in
fo.GetIsolate()); | 4793 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4794 exceptionState.throwIfNeeded(); |
4791 } | 4795 } |
4792 | 4796 |
4793 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4797 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4794 { | 4798 { |
4795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4796 TestObjectPythonV8Internal::overloadedMethodBMethod(info); | 4800 TestObjectPythonV8Internal::overloadedMethodBMethod(info); |
4797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4801 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
4798 } | 4802 } |
4799 | 4803 |
4800 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4804 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 14 matching lines...) Expand all Loading... |
4815 return; | 4819 return; |
4816 } | 4820 } |
4817 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4821 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
4818 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); | 4822 V8TRYCATCH_VOID(int, longArg, toInt32(info[0])); |
4819 V8TRYCATCH_VOID(Vector<int>, longArgs, toNativeArguments<int>(info, 1)); | 4823 V8TRYCATCH_VOID(Vector<int>, longArgs, toNativeArguments<int>(info, 1)); |
4820 imp->overloadedMethodC(longArg, longArgs); | 4824 imp->overloadedMethodC(longArg, longArgs); |
4821 } | 4825 } |
4822 | 4826 |
4823 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4827 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4824 { | 4828 { |
| 4829 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodC", "TestObjectPython", info.Holder(), info.GetIsolate()); |
4825 if (((info.Length() == 1))) { | 4830 if (((info.Length() == 1))) { |
4826 overloadedMethodC1Method(info); | 4831 overloadedMethodC1Method(info); |
4827 return; | 4832 return; |
4828 } | 4833 } |
4829 if () { | 4834 if () { |
4830 overloadedMethodC2Method(info); | 4835 overloadedMethodC2Method(info); |
4831 return; | 4836 return; |
4832 } | 4837 } |
4833 if (UNLIKELY(info.Length() < 1)) { | 4838 if (UNLIKELY(info.Length() < 1)) { |
4834 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4839 exceptionState.notEnoughArguments(1, info.Length()); |
4835 return; | 4840 return; |
4836 } | 4841 } |
4837 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodC", "Test
ObjectPython", "No function was found that matched the signature provided."), in
fo.GetIsolate()); | 4842 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4843 exceptionState.throwIfNeeded(); |
4838 } | 4844 } |
4839 | 4845 |
4840 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4846 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4841 { | 4847 { |
4842 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4848 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4843 TestObjectPythonV8Internal::overloadedMethodCMethod(info); | 4849 TestObjectPythonV8Internal::overloadedMethodCMethod(info); |
4844 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4850 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
4845 } | 4851 } |
4846 | 4852 |
4847 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4853 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 13 matching lines...) Expand all Loading... |
4861 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4867 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); |
4862 return; | 4868 return; |
4863 } | 4869 } |
4864 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4870 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
4865 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8
TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); | 4871 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8
TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); |
4866 imp->overloadedMethodD(testInterfaceEmptyArg); | 4872 imp->overloadedMethodD(testInterfaceEmptyArg); |
4867 } | 4873 } |
4868 | 4874 |
4869 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4875 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4870 { | 4876 { |
| 4877 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodD", "TestObjectPython", info.Holder(), info.GetIsolate()); |
4871 if (((info.Length() == 1))) { | 4878 if (((info.Length() == 1))) { |
4872 overloadedMethodD1Method(info); | 4879 overloadedMethodD1Method(info); |
4873 return; | 4880 return; |
4874 } | 4881 } |
4875 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate(), worldType(info.GetIsolate()))))) { | 4882 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate(), worldType(info.GetIsolate()))))) { |
4876 overloadedMethodD2Method(info); | 4883 overloadedMethodD2Method(info); |
4877 return; | 4884 return; |
4878 } | 4885 } |
4879 if (UNLIKELY(info.Length() < 1)) { | 4886 if (UNLIKELY(info.Length() < 1)) { |
4880 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4887 exceptionState.notEnoughArguments(1, info.Length()); |
4881 return; | 4888 return; |
4882 } | 4889 } |
4883 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", "Test
ObjectPython", "No function was found that matched the signature provided."), in
fo.GetIsolate()); | 4890 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4891 exceptionState.throwIfNeeded(); |
4884 } | 4892 } |
4885 | 4893 |
4886 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4894 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4887 { | 4895 { |
4888 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4896 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4889 TestObjectPythonV8Internal::overloadedMethodDMethod(info); | 4897 TestObjectPythonV8Internal::overloadedMethodDMethod(info); |
4890 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4898 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
4891 } | 4899 } |
4892 | 4900 |
4893 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4901 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 13 matching lines...) Expand all Loading... |
4907 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4915 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); |
4908 return; | 4916 return; |
4909 } | 4917 } |
4910 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4918 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
4911 V8TRYCATCH_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, in
fo.GetIsolate())); | 4919 V8TRYCATCH_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, in
fo.GetIsolate())); |
4912 imp->overloadedMethodE(longArrayArg); | 4920 imp->overloadedMethodE(longArrayArg); |
4913 } | 4921 } |
4914 | 4922 |
4915 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4923 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4916 { | 4924 { |
| 4925 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodE", "TestObjectPython", info.Holder(), info.GetIsolate()); |
4917 if (((info.Length() == 1))) { | 4926 if (((info.Length() == 1))) { |
4918 overloadedMethodE1Method(info); | 4927 overloadedMethodE1Method(info); |
4919 return; | 4928 return; |
4920 } | 4929 } |
4921 if (((info.Length() == 1) && (info[0]->IsArray()))) { | 4930 if (((info.Length() == 1) && (info[0]->IsArray()))) { |
4922 overloadedMethodE2Method(info); | 4931 overloadedMethodE2Method(info); |
4923 return; | 4932 return; |
4924 } | 4933 } |
4925 if (UNLIKELY(info.Length() < 1)) { | 4934 if (UNLIKELY(info.Length() < 1)) { |
4926 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4935 exceptionState.notEnoughArguments(1, info.Length()); |
4927 return; | 4936 return; |
4928 } | 4937 } |
4929 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", "Test
ObjectPython", "No function was found that matched the signature provided."), in
fo.GetIsolate()); | 4938 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4939 exceptionState.throwIfNeeded(); |
4930 } | 4940 } |
4931 | 4941 |
4932 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4942 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4933 { | 4943 { |
4934 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4944 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4935 TestObjectPythonV8Internal::overloadedMethodEMethod(info); | 4945 TestObjectPythonV8Internal::overloadedMethodEMethod(info); |
4936 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4946 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
4937 } | 4947 } |
4938 | 4948 |
4939 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4949 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 13 matching lines...) Expand all Loading... |
4953 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4963 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); |
4954 return; | 4964 return; |
4955 } | 4965 } |
4956 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 4966 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
4957 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyNullableArg, V8TestIn
terfaceEmpty::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate(
))) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0)
; | 4967 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyNullableArg, V8TestIn
terfaceEmpty::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate(
))) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0)
; |
4958 imp->overloadedMethodF(testInterfaceEmptyNullableArg); | 4968 imp->overloadedMethodF(testInterfaceEmptyNullableArg); |
4959 } | 4969 } |
4960 | 4970 |
4961 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 4971 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
4962 { | 4972 { |
| 4973 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodF", "TestObjectPython", info.Holder(), info.GetIsolate()); |
4963 if (((info.Length() == 1))) { | 4974 if (((info.Length() == 1))) { |
4964 overloadedMethodF1Method(info); | 4975 overloadedMethodF1Method(info); |
4965 return; | 4976 return; |
4966 } | 4977 } |
4967 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::has
Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))))) { | 4978 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::has
Instance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))))) { |
4968 overloadedMethodF2Method(info); | 4979 overloadedMethodF2Method(info); |
4969 return; | 4980 return; |
4970 } | 4981 } |
4971 if (UNLIKELY(info.Length() < 1)) { | 4982 if (UNLIKELY(info.Length() < 1)) { |
4972 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", "
TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 4983 exceptionState.notEnoughArguments(1, info.Length()); |
4973 return; | 4984 return; |
4974 } | 4985 } |
4975 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", "Test
ObjectPython", "No function was found that matched the signature provided."), in
fo.GetIsolate()); | 4986 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 4987 exceptionState.throwIfNeeded(); |
4976 } | 4988 } |
4977 | 4989 |
4978 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 4990 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
4979 { | 4991 { |
4980 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 4992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
4981 TestObjectPythonV8Internal::overloadedMethodFMethod(info); | 4993 TestObjectPythonV8Internal::overloadedMethodFMethod(info); |
4982 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 4994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
4983 } | 4995 } |
4984 | 4996 |
4985 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 4997 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5109 throwTypeError(ExceptionMessages::failedToExecute("overloadedStaticMetho
d", "TestObjectPython", ExceptionMessages::notEnoughArguments(2, info.Length()))
, info.GetIsolate()); | 5121 throwTypeError(ExceptionMessages::failedToExecute("overloadedStaticMetho
d", "TestObjectPython", ExceptionMessages::notEnoughArguments(2, info.Length()))
, info.GetIsolate()); |
5110 return; | 5122 return; |
5111 } | 5123 } |
5112 V8TRYCATCH_VOID(int, longArg1, toInt32(info[0])); | 5124 V8TRYCATCH_VOID(int, longArg1, toInt32(info[0])); |
5113 V8TRYCATCH_VOID(int, longArg2, toInt32(info[1])); | 5125 V8TRYCATCH_VOID(int, longArg2, toInt32(info[1])); |
5114 TestObjectPython::overloadedStaticMethod(longArg1, longArg2); | 5126 TestObjectPython::overloadedStaticMethod(longArg1, longArg2); |
5115 } | 5127 } |
5116 | 5128 |
5117 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 5129 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
5118 { | 5130 { |
| 5131 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS
taticMethod", "TestObjectPython", info.Holder(), info.GetIsolate()); |
5119 if (((info.Length() == 1))) { | 5132 if (((info.Length() == 1))) { |
5120 overloadedStaticMethod1Method(info); | 5133 overloadedStaticMethod1Method(info); |
5121 return; | 5134 return; |
5122 } | 5135 } |
5123 if (((info.Length() == 2))) { | 5136 if (((info.Length() == 2))) { |
5124 overloadedStaticMethod2Method(info); | 5137 overloadedStaticMethod2Method(info); |
5125 return; | 5138 return; |
5126 } | 5139 } |
5127 if (UNLIKELY(info.Length() < 1)) { | 5140 if (UNLIKELY(info.Length() < 1)) { |
5128 throwTypeError(ExceptionMessages::failedToExecute("overloadedStaticMetho
d", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length()))
, info.GetIsolate()); | 5141 exceptionState.notEnoughArguments(1, info.Length()); |
5129 return; | 5142 return; |
5130 } | 5143 } |
5131 throwTypeError(ExceptionMessages::failedToExecute("overloadedStaticMethod",
"TestObjectPython", "No function was found that matched the signature provided."
), info.GetIsolate()); | 5144 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 5145 exceptionState.throwIfNeeded(); |
5132 } | 5146 } |
5133 | 5147 |
5134 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | 5148 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
5135 { | 5149 { |
5136 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 5150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
5137 TestObjectPythonV8Internal::overloadedStaticMethodMethod(info); | 5151 TestObjectPythonV8Internal::overloadedStaticMethodMethod(info); |
5138 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 5152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
5139 } | 5153 } |
5140 | 5154 |
5141 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 5155 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6541 fromInternalPointer(object)->deref(); | 6555 fromInternalPointer(object)->deref(); |
6542 } | 6556 } |
6543 | 6557 |
6544 template<> | 6558 template<> |
6545 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 6559 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
6546 { | 6560 { |
6547 return toV8(impl, creationContext, isolate); | 6561 return toV8(impl, creationContext, isolate); |
6548 } | 6562 } |
6549 | 6563 |
6550 } // namespace WebCore | 6564 } // namespace WebCore |
OLD | NEW |