Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp

Issue 2301993002: binding: Introduces ExceptionToPromiseScope. (Closed)
Patch Set: Addressed review comments (rename, empty line). Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "V8TestObject.h" 7 #include "V8TestObject.h"
8 8
9 #include "bindings/core/v8/ArrayBufferOrArrayBufferViewOrDictionary.h" 9 #include "bindings/core/v8/ArrayBufferOrArrayBufferViewOrDictionary.h"
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 4826 matching lines...) Expand 10 before | Expand all | Expand 10 after
4837 4837
4838 void enumForPrivateScriptAttributeSetterCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 4838 void enumForPrivateScriptAttributeSetterCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4839 { 4839 {
4840 v8::Local<v8::Value> v8Value = info[0]; 4840 v8::Local<v8::Value> v8Value = info[0];
4841 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); 4841 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info);
4842 } 4842 }
4843 4843
4844 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 4844 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
4845 { 4845 {
4846 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4846 TestObject* impl = V8TestObject::toImpl(info.Holder());
4847
4847 impl->unscopeableVoidMethod(); 4848 impl->unscopeableVoidMethod();
4848 } 4849 }
4849 4850
4850 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 4851 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4851 { 4852 {
4852 TestObjectV8Internal::unscopeableVoidMethodMethod(info); 4853 TestObjectV8Internal::unscopeableVoidMethodMethod(info);
4853 } 4854 }
4854 4855
4855 static void unscopeableRuntimeEnabledVoidMethodMethod(const v8::FunctionCallback Info<v8::Value>& info) 4856 static void unscopeableRuntimeEnabledVoidMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
4856 { 4857 {
4857 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4858 TestObject* impl = V8TestObject::toImpl(info.Holder());
4859
4858 impl->unscopeableRuntimeEnabledVoidMethod(); 4860 impl->unscopeableRuntimeEnabledVoidMethod();
4859 } 4861 }
4860 4862
4861 static void unscopeableRuntimeEnabledVoidMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 4863 static void unscopeableRuntimeEnabledVoidMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
4862 { 4864 {
4863 TestObjectV8Internal::unscopeableRuntimeEnabledVoidMethodMethod(info); 4865 TestObjectV8Internal::unscopeableRuntimeEnabledVoidMethodMethod(info);
4864 } 4866 }
4865 4867
4866 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4868 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4867 { 4869 {
4868 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4870 TestObject* impl = V8TestObject::toImpl(info.Holder());
4871
4869 impl->voidMethod(); 4872 impl->voidMethod();
4870 } 4873 }
4871 4874
4872 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4875 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4873 { 4876 {
4874 TestObjectV8Internal::voidMethodMethod(info); 4877 TestObjectV8Internal::voidMethodMethod(info);
4875 } 4878 }
4876 4879
4877 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 4880 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4878 { 4881 {
4879 TestObject::staticVoidMethod(); 4882 TestObject::staticVoidMethod();
4880 } 4883 }
4881 4884
4882 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4885 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4883 { 4886 {
4884 TestObjectV8Internal::staticVoidMethodMethod(info); 4887 TestObjectV8Internal::staticVoidMethodMethod(info);
4885 } 4888 }
4886 4889
4887 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4890 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4888 { 4891 {
4889 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4892 TestObject* impl = V8TestObject::toImpl(info.Holder());
4893
4890 v8SetReturnValue(info, v8DateOrNaN(info.GetIsolate(), impl->dateMethod())); 4894 v8SetReturnValue(info, v8DateOrNaN(info.GetIsolate(), impl->dateMethod()));
4891 } 4895 }
4892 4896
4893 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4897 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4894 { 4898 {
4895 TestObjectV8Internal::dateMethodMethod(info); 4899 TestObjectV8Internal::dateMethodMethod(info);
4896 } 4900 }
4897 4901
4898 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4902 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4899 { 4903 {
4900 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4904 TestObject* impl = V8TestObject::toImpl(info.Holder());
4905
4901 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate()); 4906 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate());
4902 } 4907 }
4903 4908
4904 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 4909 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
4905 { 4910 {
4906 TestObjectV8Internal::stringMethodMethod(info); 4911 TestObjectV8Internal::stringMethodMethod(info);
4907 } 4912 }
4908 4913
4909 static void byteStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 4914 static void byteStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4910 { 4915 {
4911 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4916 TestObject* impl = V8TestObject::toImpl(info.Holder());
4917
4912 v8SetReturnValueString(info, impl->byteStringMethod(), info.GetIsolate()); 4918 v8SetReturnValueString(info, impl->byteStringMethod(), info.GetIsolate());
4913 } 4919 }
4914 4920
4915 static void byteStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 4921 static void byteStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4916 { 4922 {
4917 TestObjectV8Internal::byteStringMethodMethod(info); 4923 TestObjectV8Internal::byteStringMethodMethod(info);
4918 } 4924 }
4919 4925
4920 static void usvStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o) 4926 static void usvStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o)
4921 { 4927 {
4922 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4928 TestObject* impl = V8TestObject::toImpl(info.Holder());
4929
4923 v8SetReturnValueString(info, impl->usvStringMethod(), info.GetIsolate()); 4930 v8SetReturnValueString(info, impl->usvStringMethod(), info.GetIsolate());
4924 } 4931 }
4925 4932
4926 static void usvStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info) 4933 static void usvStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4927 { 4934 {
4928 TestObjectV8Internal::usvStringMethodMethod(info); 4935 TestObjectV8Internal::usvStringMethodMethod(info);
4929 } 4936 }
4930 4937
4931 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 4938 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
4932 { 4939 {
4933 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4940 TestObject* impl = V8TestObject::toImpl(info.Holder());
4941
4934 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod( ))); 4942 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod( )));
4935 } 4943 }
4936 4944
4937 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 4945 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
4938 { 4946 {
4939 TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info); 4947 TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info);
4940 } 4948 }
4941 4949
4942 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4950 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4943 { 4951 {
4944 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4952 TestObject* impl = V8TestObject::toImpl(info.Holder());
4953
4945 v8SetReturnValueBool(info, impl->booleanMethod()); 4954 v8SetReturnValueBool(info, impl->booleanMethod());
4946 } 4955 }
4947 4956
4948 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info) 4957 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
4949 { 4958 {
4950 TestObjectV8Internal::booleanMethodMethod(info); 4959 TestObjectV8Internal::booleanMethodMethod(info);
4951 } 4960 }
4952 4961
4953 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4962 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4954 { 4963 {
4955 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4964 TestObject* impl = V8TestObject::toImpl(info.Holder());
4965
4956 v8SetReturnValueInt(info, impl->byteMethod()); 4966 v8SetReturnValueInt(info, impl->byteMethod());
4957 } 4967 }
4958 4968
4959 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4969 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4960 { 4970 {
4961 TestObjectV8Internal::byteMethodMethod(info); 4971 TestObjectV8Internal::byteMethodMethod(info);
4962 } 4972 }
4963 4973
4964 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4974 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4965 { 4975 {
4966 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4976 TestObject* impl = V8TestObject::toImpl(info.Holder());
4977
4967 v8SetReturnValue(info, impl->doubleMethod()); 4978 v8SetReturnValue(info, impl->doubleMethod());
4968 } 4979 }
4969 4980
4970 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info) 4981 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
4971 { 4982 {
4972 TestObjectV8Internal::doubleMethodMethod(info); 4983 TestObjectV8Internal::doubleMethodMethod(info);
4973 } 4984 }
4974 4985
4975 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4986 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4976 { 4987 {
4977 TestObject* impl = V8TestObject::toImpl(info.Holder()); 4988 TestObject* impl = V8TestObject::toImpl(info.Holder());
4989
4978 v8SetReturnValue(info, impl->floatMethod()); 4990 v8SetReturnValue(info, impl->floatMethod());
4979 } 4991 }
4980 4992
4981 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4993 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4982 { 4994 {
4983 TestObjectV8Internal::floatMethodMethod(info); 4995 TestObjectV8Internal::floatMethodMethod(info);
4984 } 4996 }
4985 4997
4986 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4998 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4987 { 4999 {
4988 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5000 TestObject* impl = V8TestObject::toImpl(info.Holder());
5001
4989 v8SetReturnValueInt(info, impl->longMethod()); 5002 v8SetReturnValueInt(info, impl->longMethod());
4990 } 5003 }
4991 5004
4992 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 5005 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4993 { 5006 {
4994 TestObjectV8Internal::longMethodMethod(info); 5007 TestObjectV8Internal::longMethodMethod(info);
4995 } 5008 }
4996 5009
4997 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 5010 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4998 { 5011 {
4999 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5012 TestObject* impl = V8TestObject::toImpl(info.Holder());
5013
5000 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod())); 5014 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod()));
5001 } 5015 }
5002 5016
5003 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 5017 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
5004 { 5018 {
5005 TestObjectV8Internal::longLongMethodMethod(info); 5019 TestObjectV8Internal::longLongMethodMethod(info);
5006 } 5020 }
5007 5021
5008 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5022 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5009 { 5023 {
5010 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5024 TestObject* impl = V8TestObject::toImpl(info.Holder());
5025
5011 v8SetReturnValueUnsigned(info, impl->octetMethod()); 5026 v8SetReturnValueUnsigned(info, impl->octetMethod());
5012 } 5027 }
5013 5028
5014 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 5029 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5015 { 5030 {
5016 TestObjectV8Internal::octetMethodMethod(info); 5031 TestObjectV8Internal::octetMethodMethod(info);
5017 } 5032 }
5018 5033
5019 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5034 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5020 { 5035 {
5021 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5036 TestObject* impl = V8TestObject::toImpl(info.Holder());
5037
5022 v8SetReturnValueInt(info, impl->shortMethod()); 5038 v8SetReturnValueInt(info, impl->shortMethod());
5023 } 5039 }
5024 5040
5025 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 5041 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5026 { 5042 {
5027 TestObjectV8Internal::shortMethodMethod(info); 5043 TestObjectV8Internal::shortMethodMethod(info);
5028 } 5044 }
5029 5045
5030 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5046 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5031 { 5047 {
5032 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5048 TestObject* impl = V8TestObject::toImpl(info.Holder());
5049
5033 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod()); 5050 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod());
5034 } 5051 }
5035 5052
5036 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5053 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5037 { 5054 {
5038 TestObjectV8Internal::unsignedLongMethodMethod(info); 5055 TestObjectV8Internal::unsignedLongMethodMethod(info);
5039 } 5056 }
5040 5057
5041 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 5058 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
5042 { 5059 {
5043 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5060 TestObject* impl = V8TestObject::toImpl(info.Holder());
5061
5044 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod())); 5062 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod()));
5045 } 5063 }
5046 5064
5047 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 5065 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
5048 { 5066 {
5049 TestObjectV8Internal::unsignedLongLongMethodMethod(info); 5067 TestObjectV8Internal::unsignedLongLongMethodMethod(info);
5050 } 5068 }
5051 5069
5052 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5070 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5053 { 5071 {
5054 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5072 TestObject* impl = V8TestObject::toImpl(info.Holder());
5073
5055 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod()); 5074 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod());
5056 } 5075 }
5057 5076
5058 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 5077 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
5059 { 5078 {
5060 TestObjectV8Internal::unsignedShortMethodMethod(info); 5079 TestObjectV8Internal::unsignedShortMethodMethod(info);
5061 } 5080 }
5062 5081
5063 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5082 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5064 { 5083 {
5065 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD ateArg", "TestObject", info.Holder(), info.GetIsolate()); 5084 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDateArg");
5085
5086 TestObject* impl = V8TestObject::toImpl(info.Holder());
5087
5066 if (UNLIKELY(info.Length() < 1)) { 5088 if (UNLIKELY(info.Length() < 1)) {
5067 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5089 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5068 return; 5090 return;
5069 } 5091 }
5070 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5092
5071 double dateArg; 5093 double dateArg;
5072 { 5094 dateArg = toCoreDate(info.GetIsolate(), info[0], exceptionState);
5073 dateArg = toCoreDate(info.GetIsolate(), info[0], exceptionState); 5095 if (exceptionState.hadException())
5074 if (exceptionState.hadException()) 5096 return;
5075 return; 5097
5076 }
5077 impl->voidMethodDateArg(dateArg); 5098 impl->voidMethodDateArg(dateArg);
5078 } 5099 }
5079 5100
5080 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5101 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5081 { 5102 {
5082 TestObjectV8Internal::voidMethodDateArgMethod(info); 5103 TestObjectV8Internal::voidMethodDateArgMethod(info);
5083 } 5104 }
5084 5105
5085 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5106 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5086 { 5107 {
5108 TestObject* impl = V8TestObject::toImpl(info.Holder());
5109
5087 if (UNLIKELY(info.Length() < 1)) { 5110 if (UNLIKELY(info.Length() < 1)) {
5088 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodS tringArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()) ))); 5111 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodStringArg", "TestObject", ExceptionMessages::notEnough Arguments(1, info.Length())));
5089 return; 5112 return;
5090 } 5113 }
5091 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5114
5092 V8StringResource<> stringArg; 5115 V8StringResource<> stringArg;
5093 { 5116 stringArg = info[0];
5094 stringArg = info[0]; 5117 if (!stringArg.prepare())
5095 if (!stringArg.prepare()) 5118 return;
5096 return; 5119
5097 }
5098 impl->voidMethodStringArg(stringArg); 5120 impl->voidMethodStringArg(stringArg);
5099 } 5121 }
5100 5122
5101 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 5123 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
5102 { 5124 {
5103 TestObjectV8Internal::voidMethodStringArgMethod(info); 5125 TestObjectV8Internal::voidMethodStringArgMethod(info);
5104 } 5126 }
5105 5127
5106 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 5128 static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5107 { 5129 {
5108 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB yteStringArg", "TestObject", info.Holder(), info.GetIsolate()); 5130 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodByteStringArg");
5131
5132 TestObject* impl = V8TestObject::toImpl(info.Holder());
5133
5109 if (UNLIKELY(info.Length() < 1)) { 5134 if (UNLIKELY(info.Length() < 1)) {
5110 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5135 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5111 return; 5136 return;
5112 } 5137 }
5113 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5138
5114 V8StringResource<> stringArg; 5139 V8StringResource<> stringArg;
5115 { 5140 stringArg = toByteString(info.GetIsolate(), info[0], exceptionState);
5116 stringArg = toByteString(info.GetIsolate(), info[0], exceptionState); 5141 if (exceptionState.hadException())
5117 if (exceptionState.hadException()) 5142 return;
5118 return; 5143
5119 }
5120 impl->voidMethodByteStringArg(stringArg); 5144 impl->voidMethodByteStringArg(stringArg);
5121 } 5145 }
5122 5146
5123 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 5147 static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5124 { 5148 {
5125 TestObjectV8Internal::voidMethodByteStringArgMethod(info); 5149 TestObjectV8Internal::voidMethodByteStringArgMethod(info);
5126 } 5150 }
5127 5151
5128 static void voidMethodUSVStringArgMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 5152 static void voidMethodUSVStringArgMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
5129 { 5153 {
5130 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU SVStringArg", "TestObject", info.Holder(), info.GetIsolate()); 5154 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodUSVStringArg");
5155
5156 TestObject* impl = V8TestObject::toImpl(info.Holder());
5157
5131 if (UNLIKELY(info.Length() < 1)) { 5158 if (UNLIKELY(info.Length() < 1)) {
5132 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5159 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5133 return; 5160 return;
5134 } 5161 }
5135 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5162
5136 V8StringResource<> usvStringArg; 5163 V8StringResource<> usvStringArg;
5137 { 5164 usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState);
5138 usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState); 5165 if (exceptionState.hadException())
5139 if (exceptionState.hadException()) 5166 return;
5140 return; 5167
5141 }
5142 impl->voidMethodUSVStringArg(usvStringArg); 5168 impl->voidMethodUSVStringArg(usvStringArg);
5143 } 5169 }
5144 5170
5145 static void voidMethodUSVStringArgMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 5171 static void voidMethodUSVStringArgMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
5146 { 5172 {
5147 TestObjectV8Internal::voidMethodUSVStringArgMethod(info); 5173 TestObjectV8Internal::voidMethodUSVStringArgMethod(info);
5148 } 5174 }
5149 5175
5150 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 5176 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5151 { 5177 {
5152 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD OMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); 5178 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDOMTimeStampArg");
5179
5180 TestObject* impl = V8TestObject::toImpl(info.Holder());
5181
5153 if (UNLIKELY(info.Length() < 1)) { 5182 if (UNLIKELY(info.Length() < 1)) {
5154 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5183 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5155 return; 5184 return;
5156 } 5185 }
5157 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5186
5158 unsigned long long domTimeStampArg; 5187 unsigned long long domTimeStampArg;
5159 { 5188 domTimeStampArg = toUInt64(info.GetIsolate(), info[0], NormalConversion, exc eptionState);
5160 domTimeStampArg = toUInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState); 5189 if (exceptionState.hadException())
5161 if (exceptionState.hadException()) 5190 return;
5162 return; 5191
5163 }
5164 impl->voidMethodDOMTimeStampArg(domTimeStampArg); 5192 impl->voidMethodDOMTimeStampArg(domTimeStampArg);
5165 } 5193 }
5166 5194
5167 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 5195 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5168 { 5196 {
5169 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); 5197 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info);
5170 } 5198 }
5171 5199
5172 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 5200 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
5173 { 5201 {
5174 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB ooleanArg", "TestObject", info.Holder(), info.GetIsolate()); 5202 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodBooleanArg");
5203
5204 TestObject* impl = V8TestObject::toImpl(info.Holder());
5205
5175 if (UNLIKELY(info.Length() < 1)) { 5206 if (UNLIKELY(info.Length() < 1)) {
5176 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5207 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5177 return; 5208 return;
5178 } 5209 }
5179 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5210
5180 bool booleanArg; 5211 bool booleanArg;
5181 { 5212 booleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState);
5182 booleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); 5213 if (exceptionState.hadException())
5183 if (exceptionState.hadException()) 5214 return;
5184 return; 5215
5185 }
5186 impl->voidMethodBooleanArg(booleanArg); 5216 impl->voidMethodBooleanArg(booleanArg);
5187 } 5217 }
5188 5218
5189 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 5219 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5190 { 5220 {
5191 TestObjectV8Internal::voidMethodBooleanArgMethod(info); 5221 TestObjectV8Internal::voidMethodBooleanArgMethod(info);
5192 } 5222 }
5193 5223
5194 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5224 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5195 { 5225 {
5196 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB yteArg", "TestObject", info.Holder(), info.GetIsolate()); 5226 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodByteArg");
5227
5228 TestObject* impl = V8TestObject::toImpl(info.Holder());
5229
5197 if (UNLIKELY(info.Length() < 1)) { 5230 if (UNLIKELY(info.Length() < 1)) {
5198 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5231 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5199 return; 5232 return;
5200 } 5233 }
5201 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5234
5202 int byteArg; 5235 int byteArg;
5203 { 5236 byteArg = toInt8(info.GetIsolate(), info[0], NormalConversion, exceptionStat e);
5204 byteArg = toInt8(info.GetIsolate(), info[0], NormalConversion, exception State); 5237 if (exceptionState.hadException())
5205 if (exceptionState.hadException()) 5238 return;
5206 return; 5239
5207 }
5208 impl->voidMethodByteArg(byteArg); 5240 impl->voidMethodByteArg(byteArg);
5209 } 5241 }
5210 5242
5211 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5243 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5212 { 5244 {
5213 TestObjectV8Internal::voidMethodByteArgMethod(info); 5245 TestObjectV8Internal::voidMethodByteArgMethod(info);
5214 } 5246 }
5215 5247
5216 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5248 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5217 { 5249 {
5218 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArg", "TestObject", info.Holder(), info.GetIsolate()); 5250 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDoubleArg");
5251
5252 TestObject* impl = V8TestObject::toImpl(info.Holder());
5253
5219 if (UNLIKELY(info.Length() < 1)) { 5254 if (UNLIKELY(info.Length() < 1)) {
5220 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5255 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5221 return; 5256 return;
5222 } 5257 }
5223 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5258
5224 double doubleArg; 5259 double doubleArg;
5225 { 5260 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
5226 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 5261 if (exceptionState.hadException())
5227 if (exceptionState.hadException()) 5262 return;
5228 return; 5263
5229 }
5230 impl->voidMethodDoubleArg(doubleArg); 5264 impl->voidMethodDoubleArg(doubleArg);
5231 } 5265 }
5232 5266
5233 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 5267 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
5234 { 5268 {
5235 TestObjectV8Internal::voidMethodDoubleArgMethod(info); 5269 TestObjectV8Internal::voidMethodDoubleArgMethod(info);
5236 } 5270 }
5237 5271
5238 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5272 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5239 { 5273 {
5240 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodF loatArg", "TestObject", info.Holder(), info.GetIsolate()); 5274 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodFloatArg");
5275
5276 TestObject* impl = V8TestObject::toImpl(info.Holder());
5277
5241 if (UNLIKELY(info.Length() < 1)) { 5278 if (UNLIKELY(info.Length() < 1)) {
5242 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5279 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5243 return; 5280 return;
5244 } 5281 }
5245 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5282
5246 float floatArg; 5283 float floatArg;
5247 { 5284 floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState);
5248 floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState) ; 5285 if (exceptionState.hadException())
5249 if (exceptionState.hadException()) 5286 return;
5250 return; 5287
5251 }
5252 impl->voidMethodFloatArg(floatArg); 5288 impl->voidMethodFloatArg(floatArg);
5253 } 5289 }
5254 5290
5255 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5291 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5256 { 5292 {
5257 TestObjectV8Internal::voidMethodFloatArgMethod(info); 5293 TestObjectV8Internal::voidMethodFloatArgMethod(info);
5258 } 5294 }
5259 5295
5260 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5296 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5261 { 5297 {
5262 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArg", "TestObject", info.Holder(), info.GetIsolate()); 5298 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodLongArg");
5299
5300 TestObject* impl = V8TestObject::toImpl(info.Holder());
5301
5263 if (UNLIKELY(info.Length() < 1)) { 5302 if (UNLIKELY(info.Length() < 1)) {
5264 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5303 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5265 return; 5304 return;
5266 } 5305 }
5267 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5306
5268 int longArg; 5307 int longArg;
5269 { 5308 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
5270 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 5309 if (exceptionState.hadException())
5271 if (exceptionState.hadException()) 5310 return;
5272 return; 5311
5273 }
5274 impl->voidMethodLongArg(longArg); 5312 impl->voidMethodLongArg(longArg);
5275 } 5313 }
5276 5314
5277 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5315 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5278 { 5316 {
5279 TestObjectV8Internal::voidMethodLongArgMethod(info); 5317 TestObjectV8Internal::voidMethodLongArgMethod(info);
5280 } 5318 }
5281 5319
5282 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 5320 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5283 { 5321 {
5284 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongLongArg", "TestObject", info.Holder(), info.GetIsolate()); 5322 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodLongLongArg");
5323
5324 TestObject* impl = V8TestObject::toImpl(info.Holder());
5325
5285 if (UNLIKELY(info.Length() < 1)) { 5326 if (UNLIKELY(info.Length() < 1)) {
5286 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5327 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5287 return; 5328 return;
5288 } 5329 }
5289 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5330
5290 long long longLongArg; 5331 long long longLongArg;
5291 { 5332 longLongArg = toInt64(info.GetIsolate(), info[0], NormalConversion, exceptio nState);
5292 longLongArg = toInt64(info.GetIsolate(), info[0], NormalConversion, exce ptionState); 5333 if (exceptionState.hadException())
5293 if (exceptionState.hadException()) 5334 return;
5294 return; 5335
5295 }
5296 impl->voidMethodLongLongArg(longLongArg); 5336 impl->voidMethodLongLongArg(longLongArg);
5297 } 5337 }
5298 5338
5299 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 5339 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5300 { 5340 {
5301 TestObjectV8Internal::voidMethodLongLongArgMethod(info); 5341 TestObjectV8Internal::voidMethodLongLongArgMethod(info);
5302 } 5342 }
5303 5343
5304 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5344 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5305 { 5345 {
5306 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO ctetArg", "TestObject", info.Holder(), info.GetIsolate()); 5346 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodOctetArg");
5347
5348 TestObject* impl = V8TestObject::toImpl(info.Holder());
5349
5307 if (UNLIKELY(info.Length() < 1)) { 5350 if (UNLIKELY(info.Length() < 1)) {
5308 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5351 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5309 return; 5352 return;
5310 } 5353 }
5311 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5354
5312 unsigned octetArg; 5355 unsigned octetArg;
5313 { 5356 octetArg = toUInt8(info.GetIsolate(), info[0], NormalConversion, exceptionSt ate);
5314 octetArg = toUInt8(info.GetIsolate(), info[0], NormalConversion, excepti onState); 5357 if (exceptionState.hadException())
5315 if (exceptionState.hadException()) 5358 return;
5316 return; 5359
5317 }
5318 impl->voidMethodOctetArg(octetArg); 5360 impl->voidMethodOctetArg(octetArg);
5319 } 5361 }
5320 5362
5321 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5363 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5322 { 5364 {
5323 TestObjectV8Internal::voidMethodOctetArgMethod(info); 5365 TestObjectV8Internal::voidMethodOctetArgMethod(info);
5324 } 5366 }
5325 5367
5326 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5368 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5327 { 5369 {
5328 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS hortArg", "TestObject", info.Holder(), info.GetIsolate()); 5370 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodShortArg");
5371
5372 TestObject* impl = V8TestObject::toImpl(info.Holder());
5373
5329 if (UNLIKELY(info.Length() < 1)) { 5374 if (UNLIKELY(info.Length() < 1)) {
5330 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5375 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5331 return; 5376 return;
5332 } 5377 }
5333 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5378
5334 int shortArg; 5379 int shortArg;
5335 { 5380 shortArg = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionSt ate);
5336 shortArg = toInt16(info.GetIsolate(), info[0], NormalConversion, excepti onState); 5381 if (exceptionState.hadException())
5337 if (exceptionState.hadException()) 5382 return;
5338 return; 5383
5339 }
5340 impl->voidMethodShortArg(shortArg); 5384 impl->voidMethodShortArg(shortArg);
5341 } 5385 }
5342 5386
5343 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5387 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5344 { 5388 {
5345 TestObjectV8Internal::voidMethodShortArgMethod(info); 5389 TestObjectV8Internal::voidMethodShortArgMethod(info);
5346 } 5390 }
5347 5391
5348 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 5392 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5349 { 5393 {
5350 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); 5394 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodUnsignedLongArg");
5395
5396 TestObject* impl = V8TestObject::toImpl(info.Holder());
5397
5351 if (UNLIKELY(info.Length() < 1)) { 5398 if (UNLIKELY(info.Length() < 1)) {
5352 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5399 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5353 return; 5400 return;
5354 } 5401 }
5355 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5402
5356 unsigned unsignedLongArg; 5403 unsigned unsignedLongArg;
5357 { 5404 unsignedLongArg = toUInt32(info.GetIsolate(), info[0], NormalConversion, exc eptionState);
5358 unsignedLongArg = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); 5405 if (exceptionState.hadException())
5359 if (exceptionState.hadException()) 5406 return;
5360 return; 5407
5361 }
5362 impl->voidMethodUnsignedLongArg(unsignedLongArg); 5408 impl->voidMethodUnsignedLongArg(unsignedLongArg);
5363 } 5409 }
5364 5410
5365 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 5411 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5366 { 5412 {
5367 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); 5413 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info);
5368 } 5414 }
5369 5415
5370 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 5416 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
5371 { 5417 {
5372 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); 5418 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodUnsignedLongLongArg");
5419
5420 TestObject* impl = V8TestObject::toImpl(info.Holder());
5421
5373 if (UNLIKELY(info.Length() < 1)) { 5422 if (UNLIKELY(info.Length() < 1)) {
5374 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5423 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5375 return; 5424 return;
5376 } 5425 }
5377 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5426
5378 unsigned long long unsignedLongLongArg; 5427 unsigned long long unsignedLongLongArg;
5379 { 5428 unsignedLongLongArg = toUInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState);
5380 unsignedLongLongArg = toUInt64(info.GetIsolate(), info[0], NormalConvers ion, exceptionState); 5429 if (exceptionState.hadException())
5381 if (exceptionState.hadException()) 5430 return;
5382 return; 5431
5383 }
5384 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); 5432 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg);
5385 } 5433 }
5386 5434
5387 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 5435 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
5388 { 5436 {
5389 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); 5437 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info);
5390 } 5438 }
5391 5439
5392 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 5440 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
5393 { 5441 {
5394 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); 5442 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodUnsignedShortArg");
5443
5444 TestObject* impl = V8TestObject::toImpl(info.Holder());
5445
5395 if (UNLIKELY(info.Length() < 1)) { 5446 if (UNLIKELY(info.Length() < 1)) {
5396 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 5447 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5397 return; 5448 return;
5398 } 5449 }
5399 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5450
5400 unsigned unsignedShortArg; 5451 unsigned unsignedShortArg;
5401 { 5452 unsignedShortArg = toUInt16(info.GetIsolate(), info[0], NormalConversion, ex ceptionState);
5402 unsignedShortArg = toUInt16(info.GetIsolate(), info[0], NormalConversion , exceptionState); 5453 if (exceptionState.hadException())
5403 if (exceptionState.hadException()) 5454 return;
5404 return; 5455
5405 }
5406 impl->voidMethodUnsignedShortArg(unsignedShortArg); 5456 impl->voidMethodUnsignedShortArg(unsignedShortArg);
5407 } 5457 }
5408 5458
5409 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 5459 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
5410 { 5460 {
5411 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); 5461 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info);
5412 } 5462 }
5413 5463
5414 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5464 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5415 { 5465 {
5416 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5466 TestObject* impl = V8TestObject::toImpl(info.Holder());
5467
5417 v8SetReturnValue(info, impl->testInterfaceEmptyMethod()); 5468 v8SetReturnValue(info, impl->testInterfaceEmptyMethod());
5418 } 5469 }
5419 5470
5420 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 5471 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
5421 { 5472 {
5422 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info); 5473 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info);
5423 } 5474 }
5424 5475
5425 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 5476 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
5426 { 5477 {
5478 TestObject* impl = V8TestObject::toImpl(info.Holder());
5479
5427 if (UNLIKELY(info.Length() < 1)) { 5480 if (UNLIKELY(info.Length() < 1)) {
5428 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodT estInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments(1, in fo.Length())))); 5481 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestInterfaceEmptyArg", "TestObject", ExceptionMessage s::notEnoughArguments(1, info.Length())));
5429 return; 5482 return;
5430 } 5483 }
5431 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5484
5432 TestInterfaceEmpty* testInterfaceEmptyArg; 5485 TestInterfaceEmpty* testInterfaceEmptyArg;
5433 { 5486 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[0]);
5434 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 5487 if (!testInterfaceEmptyArg) {
5435 if (!testInterfaceEmptyArg) { 5488 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."));
5436 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); 5489
5437 return; 5490 return;
5438 }
5439 } 5491 }
5492
5440 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 5493 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
5441 } 5494 }
5442 5495
5443 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 5496 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
5444 { 5497 {
5445 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); 5498 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
5446 } 5499 }
5447 5500
5448 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 5501 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
5449 { 5502 {
5450 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); 5503 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodLongArgTestInterfaceEmptyArg");
5504
5505 TestObject* impl = V8TestObject::toImpl(info.Holder());
5506
5451 if (UNLIKELY(info.Length() < 2)) { 5507 if (UNLIKELY(info.Length() < 2)) {
5452 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 5508 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
5453 return; 5509 return;
5454 } 5510 }
5455 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5511
5456 int longArg; 5512 int longArg;
5457 TestInterfaceEmpty* testInterfaceEmptyArg; 5513 TestInterfaceEmpty* testInterfaceEmptyArg;
5458 { 5514 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
5459 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 5515 if (exceptionState.hadException())
5460 if (exceptionState.hadException()) 5516 return;
5461 return; 5517
5462 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[1]); 5518 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[1]);
5463 if (!testInterfaceEmptyArg) { 5519 if (!testInterfaceEmptyArg) {
5464 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'."); 5520 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'.");
5465 return; 5521
5466 } 5522 return;
5467 } 5523 }
5524
5468 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg) ; 5525 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg) ;
5469 } 5526 }
5470 5527
5471 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 5528 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
5472 { 5529 {
5473 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); 5530 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info);
5474 } 5531 }
5475 5532
5476 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 5533 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
5477 { 5534 {
5478 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5535 TestObject* impl = V8TestObject::toImpl(info.Holder());
5536
5479 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value()); 5537 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value());
5480 } 5538 }
5481 5539
5482 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 5540 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
5483 { 5541 {
5484 TestObjectV8Internal::voidCallbackFunctionMethodMethod(info); 5542 TestObjectV8Internal::voidCallbackFunctionMethodMethod(info);
5485 } 5543 }
5486 5544
5487 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info) 5545 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
5488 { 5546 {
5489 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5547 TestObject* impl = V8TestObject::toImpl(info.Holder());
5548
5490 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Val ue()); 5549 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Val ue());
5491 } 5550 }
5492 5551
5493 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 5552 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
5494 { 5553 {
5495 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info); 5554 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info);
5496 } 5555 }
5497 5556
5498 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info) 5557 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
5499 { 5558 {
5559 TestObject* impl = V8TestObject::toImpl(info.Holder());
5560
5500 if (UNLIKELY(info.Length() < 1)) { 5561 if (UNLIKELY(info.Length() < 1)) {
5501 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodV oidCallbackFunctionArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())))); 5562 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodVoidCallbackFunctionArg", "TestObject", ExceptionMessa ges::notEnoughArguments(1, info.Length())));
5502 return; 5563 return;
5503 } 5564 }
5504 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5565
5505 ScriptValue voidCallbackFunctionArg; 5566 ScriptValue voidCallbackFunctionArg;
5506 { 5567 if (!info[0]->IsFunction()) {
5507 if (!info[0]->IsFunction()) { 5568 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodVoidCallbackFunctionArg", "TestObject", "The callback provided as parameter 1 is not a function."));
5508 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodVoidCallbackFunctionArg", "TestObject", "The callb ack provided as parameter 1 is not a function.")); 5569
5509 return; 5570 return;
5510 }
5511 voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsola te()), info[0]);
5512 } 5571 }
5572 voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsolate() ), info[0]);
5573
5513 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg); 5574 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg);
5514 } 5575 }
5515 5576
5516 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 5577 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
5517 { 5578 {
5518 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info); 5579 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info);
5519 } 5580 }
5520 5581
5521 static void voidMethodOptionalVoidCallbackFunctionArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info) 5582 static void voidMethodOptionalVoidCallbackFunctionArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
5522 { 5583 {
5523 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5584 TestObject* impl = V8TestObject::toImpl(info.Holder());
5585
5524 ScriptValue voidCallbackFunctionArg; 5586 ScriptValue voidCallbackFunctionArg;
5525 { 5587 int numArgsPassed = info.Length();
5526 int numArgsPassed = info.Length(); 5588 while (numArgsPassed > 0) {
5527 while (numArgsPassed > 0) { 5589 if (!info[numArgsPassed - 1]->IsUndefined())
5528 if (!info[numArgsPassed - 1]->IsUndefined()) 5590 break;
5529 break; 5591 --numArgsPassed;
5530 --numArgsPassed;
5531 }
5532 if (UNLIKELY(numArgsPassed <= 0)) {
5533 impl->voidMethodOptionalVoidCallbackFunctionArg();
5534 return;
5535 }
5536 if (!info[0]->IsFunction()) {
5537 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodOptionalVoidCallbackFunctionArg", "TestObject", "T he callback provided as parameter 1 is not a function."));
5538 return;
5539 }
5540 voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsola te()), info[0]);
5541 } 5592 }
5593 if (UNLIKELY(numArgsPassed <= 0)) {
5594 impl->voidMethodOptionalVoidCallbackFunctionArg();
5595 return;
5596 }
5597 if (!info[0]->IsFunction()) {
5598 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodOptionalVoidCallbackFunctionArg", "TestObject", "The c allback provided as parameter 1 is not a function."));
5599
5600 return;
5601 }
5602 voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsolate() ), info[0]);
5603
5542 impl->voidMethodOptionalVoidCallbackFunctionArg(voidCallbackFunctionArg); 5604 impl->voidMethodOptionalVoidCallbackFunctionArg(voidCallbackFunctionArg);
5543 } 5605 }
5544 5606
5545 static void voidMethodOptionalVoidCallbackFunctionArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 5607 static void voidMethodOptionalVoidCallbackFunctionArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
5546 { 5608 {
5547 TestObjectV8Internal::voidMethodOptionalVoidCallbackFunctionArgMethod(info); 5609 TestObjectV8Internal::voidMethodOptionalVoidCallbackFunctionArgMethod(info);
5548 } 5610 }
5549 5611
5550 static void voidMethodNullableVoidCallbackFunctionArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info) 5612 static void voidMethodNullableVoidCallbackFunctionArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
5551 { 5613 {
5614 TestObject* impl = V8TestObject::toImpl(info.Holder());
5615
5552 if (UNLIKELY(info.Length() < 1)) { 5616 if (UNLIKELY(info.Length() < 1)) {
5553 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodN ullableVoidCallbackFunctionArg", "TestObject", ExceptionMessages::notEnoughArgum ents(1, info.Length())))); 5617 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodNullableVoidCallbackFunctionArg", "TestObject", Except ionMessages::notEnoughArguments(1, info.Length())));
5554 return; 5618 return;
5555 } 5619 }
5556 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5620
5557 ScriptValue voidCallbackFunctionArg; 5621 ScriptValue voidCallbackFunctionArg;
5558 { 5622 if (!info[0]->IsFunction() && !info[0]->IsNull()) {
5559 if (!info[0]->IsFunction() && !info[0]->IsNull()) { 5623 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodNullableVoidCallbackFunctionArg", "TestObject", "The c allback provided as parameter 1 is not a function."));
5560 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodNullableVoidCallbackFunctionArg", "TestObject", "T he callback provided as parameter 1 is not a function.")); 5624
5561 return; 5625 return;
5562 }
5563 voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsola te()), info[0]);
5564 } 5626 }
5627 voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsolate() ), info[0]);
5628
5565 impl->voidMethodNullableVoidCallbackFunctionArg(voidCallbackFunctionArg); 5629 impl->voidMethodNullableVoidCallbackFunctionArg(voidCallbackFunctionArg);
5566 } 5630 }
5567 5631
5568 static void voidMethodNullableVoidCallbackFunctionArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 5632 static void voidMethodNullableVoidCallbackFunctionArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
5569 { 5633 {
5570 TestObjectV8Internal::voidMethodNullableVoidCallbackFunctionArgMethod(info); 5634 TestObjectV8Internal::voidMethodNullableVoidCallbackFunctionArgMethod(info);
5571 } 5635 }
5572 5636
5573 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function CallbackInfo<v8::Value>& info) 5637 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function CallbackInfo<v8::Value>& info)
5574 { 5638 {
5639 TestObject* impl = V8TestObject::toImpl(info.Holder());
5640
5575 if (UNLIKELY(info.Length() < 1)) { 5641 if (UNLIKELY(info.Length() < 1)) {
5576 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodA nyCallbackFunctionOptionalAnyArg", "TestObject", ExceptionMessages::notEnoughArg uments(1, info.Length())))); 5642 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", Exce ptionMessages::notEnoughArguments(1, info.Length())));
5577 return; 5643 return;
5578 } 5644 }
5579 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5645
5580 ScriptValue anyCallbackFunctionOptionalAnyArgArg; 5646 ScriptValue anyCallbackFunctionOptionalAnyArgArg;
5581 { 5647 if (!info[0]->IsFunction()) {
5582 if (!info[0]->IsFunction()) { 5648 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", "The callback provided as parameter 1 is not a function."));
5583 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", "The callback provided as parameter 1 is not a function.")); 5649
5584 return; 5650 return;
5585 }
5586 anyCallbackFunctionOptionalAnyArgArg = ScriptValue(ScriptState::current( info.GetIsolate()), info[0]);
5587 } 5651 }
5652 anyCallbackFunctionOptionalAnyArgArg = ScriptValue(ScriptState::current(info .GetIsolate()), info[0]);
5653
5588 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona lAnyArgArg); 5654 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona lAnyArgArg);
5589 } 5655 }
5590 5656
5591 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info) 5657 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info)
5592 { 5658 {
5593 TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info ); 5659 TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info );
5594 } 5660 }
5595 5661
5596 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5662 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5597 { 5663 {
5598 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5664 TestObject* impl = V8TestObject::toImpl(info.Holder());
5665
5599 v8SetReturnValue(info, impl->anyMethod().v8Value()); 5666 v8SetReturnValue(info, impl->anyMethod().v8Value());
5600 } 5667 }
5601 5668
5602 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5669 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5603 { 5670 {
5604 TestObjectV8Internal::anyMethodMethod(info); 5671 TestObjectV8Internal::anyMethodMethod(info);
5605 } 5672 }
5606 5673
5607 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5674 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5608 { 5675 {
5676 TestObject* impl = V8TestObject::toImpl(info.Holder());
5677
5609 if (UNLIKELY(info.Length() < 1)) { 5678 if (UNLIKELY(info.Length() < 1)) {
5610 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodE ventTargetArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Leng th())))); 5679 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodEventTargetArg", "TestObject", ExceptionMessages::notE noughArguments(1, info.Length())));
5611 return; 5680 return;
5612 } 5681 }
5613 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5682
5614 EventTarget* eventTargetArg; 5683 EventTarget* eventTargetArg;
5615 { 5684 eventTargetArg = toEventTarget(info.GetIsolate(), info[0]);
5616 eventTargetArg = toEventTarget(info.GetIsolate(), info[0]); 5685 if (!eventTargetArg) {
5617 if (!eventTargetArg) { 5686 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodEventTargetArg", "TestObject", "parameter 1 is not of type 'EventTarget'."));
5618 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodEventTargetArg", "TestObject", "parameter 1 is not of type 'EventTarget'.")); 5687
5619 return; 5688 return;
5620 }
5621 } 5689 }
5690
5622 impl->voidMethodEventTargetArg(eventTargetArg); 5691 impl->voidMethodEventTargetArg(eventTargetArg);
5623 } 5692 }
5624 5693
5625 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 5694 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
5626 { 5695 {
5627 TestObjectV8Internal::voidMethodEventTargetArgMethod(info); 5696 TestObjectV8Internal::voidMethodEventTargetArgMethod(info);
5628 } 5697 }
5629 5698
5630 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 5699 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5631 { 5700 {
5701 TestObject* impl = V8TestObject::toImpl(info.Holder());
5702
5632 if (UNLIKELY(info.Length() < 1)) { 5703 if (UNLIKELY(info.Length() < 1)) {
5633 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodA nyArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())))) ; 5704 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodAnyArg", "TestObject", ExceptionMessages::notEnoughArg uments(1, info.Length())));
5634 return; 5705 return;
5635 } 5706 }
5636 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5707
5637 ScriptValue anyArg; 5708 ScriptValue anyArg;
5638 { 5709 anyArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
5639 anyArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); 5710
5640 }
5641 impl->voidMethodAnyArg(anyArg); 5711 impl->voidMethodAnyArg(anyArg);
5642 } 5712 }
5643 5713
5644 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5714 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5645 { 5715 {
5646 TestObjectV8Internal::voidMethodAnyArgMethod(info); 5716 TestObjectV8Internal::voidMethodAnyArgMethod(info);
5647 } 5717 }
5648 5718
5649 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5719 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5650 { 5720 {
5721 TestObject* impl = V8TestObject::toImpl(info.Holder());
5722
5651 if (UNLIKELY(info.Length() < 1)) { 5723 if (UNLIKELY(info.Length() < 1)) {
5652 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodA ttrArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()))) ); 5724 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodAttrArg", "TestObject", ExceptionMessages::notEnoughAr guments(1, info.Length())));
5653 return; 5725 return;
5654 } 5726 }
5655 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5727
5656 Attr* attrArg; 5728 Attr* attrArg;
5657 { 5729 attrArg = V8Attr::toImplWithTypeCheck(info.GetIsolate(), info[0]);
5658 attrArg = V8Attr::toImplWithTypeCheck(info.GetIsolate(), info[0]); 5730 if (!attrArg) {
5659 if (!attrArg) { 5731 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodAttrArg", "TestObject", "parameter 1 is not of type 'A ttr'."));
5660 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodAttrArg", "TestObject", "parameter 1 is not of typ e 'Attr'.")); 5732
5661 return; 5733 return;
5662 }
5663 } 5734 }
5735
5664 impl->voidMethodAttrArg(attrArg); 5736 impl->voidMethodAttrArg(attrArg);
5665 } 5737 }
5666 5738
5667 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5739 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5668 { 5740 {
5669 TestObjectV8Internal::voidMethodAttrArgMethod(info); 5741 TestObjectV8Internal::voidMethodAttrArgMethod(info);
5670 } 5742 }
5671 5743
5672 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 5744 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5673 { 5745 {
5746 TestObject* impl = V8TestObject::toImpl(info.Holder());
5747
5674 if (UNLIKELY(info.Length() < 1)) { 5748 if (UNLIKELY(info.Length() < 1)) {
5675 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodD ocumentArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length( ))))); 5749 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodDocumentArg", "TestObject", ExceptionMessages::notEnou ghArguments(1, info.Length())));
5676 return; 5750 return;
5677 } 5751 }
5678 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5752
5679 Document* documentArg; 5753 Document* documentArg;
5680 { 5754 documentArg = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]);
5681 documentArg = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0] ); 5755 if (!documentArg) {
5682 if (!documentArg) { 5756 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodDocumentArg", "TestObject", "parameter 1 is not of typ e 'Document'."));
5683 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodDocumentArg", "TestObject", "parameter 1 is not of type 'Document'.")); 5757
5684 return; 5758 return;
5685 }
5686 } 5759 }
5760
5687 impl->voidMethodDocumentArg(documentArg); 5761 impl->voidMethodDocumentArg(documentArg);
5688 } 5762 }
5689 5763
5690 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 5764 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5691 { 5765 {
5692 TestObjectV8Internal::voidMethodDocumentArgMethod(info); 5766 TestObjectV8Internal::voidMethodDocumentArgMethod(info);
5693 } 5767 }
5694 5768
5695 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 5769 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5696 { 5770 {
5771 TestObject* impl = V8TestObject::toImpl(info.Holder());
5772
5697 if (UNLIKELY(info.Length() < 1)) { 5773 if (UNLIKELY(info.Length() < 1)) {
5698 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodD ocumentTypeArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())))); 5774 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodDocumentTypeArg", "TestObject", ExceptionMessages::not EnoughArguments(1, info.Length())));
5699 return; 5775 return;
5700 } 5776 }
5701 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5777
5702 DocumentType* documentTypeArg; 5778 DocumentType* documentTypeArg;
5703 { 5779 documentTypeArg = V8DocumentType::toImplWithTypeCheck(info.GetIsolate(), inf o[0]);
5704 documentTypeArg = V8DocumentType::toImplWithTypeCheck(info.GetIsolate(), info[0]); 5780 if (!documentTypeArg) {
5705 if (!documentTypeArg) { 5781 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodDocumentTypeArg", "TestObject", "parameter 1 is not of type 'DocumentType'."));
5706 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodDocumentTypeArg", "TestObject", "parameter 1 is no t of type 'DocumentType'.")); 5782
5707 return; 5783 return;
5708 }
5709 } 5784 }
5785
5710 impl->voidMethodDocumentTypeArg(documentTypeArg); 5786 impl->voidMethodDocumentTypeArg(documentTypeArg);
5711 } 5787 }
5712 5788
5713 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 5789 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5714 { 5790 {
5715 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info); 5791 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info);
5716 } 5792 }
5717 5793
5718 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 5794 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
5719 { 5795 {
5796 TestObject* impl = V8TestObject::toImpl(info.Holder());
5797
5720 if (UNLIKELY(info.Length() < 1)) { 5798 if (UNLIKELY(info.Length() < 1)) {
5721 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodE lementArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )))); 5799 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodElementArg", "TestObject", ExceptionMessages::notEnoug hArguments(1, info.Length())));
5722 return; 5800 return;
5723 } 5801 }
5724 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5802
5725 Element* elementArg; 5803 Element* elementArg;
5726 { 5804 elementArg = V8Element::toImplWithTypeCheck(info.GetIsolate(), info[0]);
5727 elementArg = V8Element::toImplWithTypeCheck(info.GetIsolate(), info[0]); 5805 if (!elementArg) {
5728 if (!elementArg) { 5806 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodElementArg", "TestObject", "parameter 1 is not of type 'Element'."));
5729 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodElementArg", "TestObject", "parameter 1 is not of type 'Element'.")); 5807
5730 return; 5808 return;
5731 }
5732 } 5809 }
5810
5733 impl->voidMethodElementArg(elementArg); 5811 impl->voidMethodElementArg(elementArg);
5734 } 5812 }
5735 5813
5736 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 5814 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5737 { 5815 {
5738 TestObjectV8Internal::voidMethodElementArgMethod(info); 5816 TestObjectV8Internal::voidMethodElementArgMethod(info);
5739 } 5817 }
5740 5818
5741 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5819 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5742 { 5820 {
5821 TestObject* impl = V8TestObject::toImpl(info.Holder());
5822
5743 if (UNLIKELY(info.Length() < 1)) { 5823 if (UNLIKELY(info.Length() < 1)) {
5744 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodN odeArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()))) ); 5824 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodNodeArg", "TestObject", ExceptionMessages::notEnoughAr guments(1, info.Length())));
5745 return; 5825 return;
5746 } 5826 }
5747 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5827
5748 Node* nodeArg; 5828 Node* nodeArg;
5749 { 5829 nodeArg = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]);
5750 nodeArg = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); 5830 if (!nodeArg) {
5751 if (!nodeArg) { 5831 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodNodeArg", "TestObject", "parameter 1 is not of type 'N ode'."));
5752 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodNodeArg", "TestObject", "parameter 1 is not of typ e 'Node'.")); 5832
5753 return; 5833 return;
5754 }
5755 } 5834 }
5835
5756 impl->voidMethodNodeArg(nodeArg); 5836 impl->voidMethodNodeArg(nodeArg);
5757 } 5837 }
5758 5838
5759 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5839 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5760 { 5840 {
5761 TestObjectV8Internal::voidMethodNodeArgMethod(info); 5841 TestObjectV8Internal::voidMethodNodeArgMethod(info);
5762 } 5842 }
5763 5843
5764 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 5844 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5765 { 5845 {
5766 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5846 TestObject* impl = V8TestObject::toImpl(info.Holder());
5847
5767 v8SetReturnValue(info, impl->arrayBufferMethod()); 5848 v8SetReturnValue(info, impl->arrayBufferMethod());
5768 } 5849 }
5769 5850
5770 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 5851 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5771 { 5852 {
5772 TestObjectV8Internal::arrayBufferMethodMethod(info); 5853 TestObjectV8Internal::arrayBufferMethodMethod(info);
5773 } 5854 }
5774 5855
5775 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 5856 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5776 { 5857 {
5777 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5858 TestObject* impl = V8TestObject::toImpl(info.Holder());
5859
5778 v8SetReturnValue(info, impl->arrayBufferViewMethod()); 5860 v8SetReturnValue(info, impl->arrayBufferViewMethod());
5779 } 5861 }
5780 5862
5781 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 5863 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5782 { 5864 {
5783 TestObjectV8Internal::arrayBufferViewMethodMethod(info); 5865 TestObjectV8Internal::arrayBufferViewMethodMethod(info);
5784 } 5866 }
5785 5867
5786 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5868 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5787 { 5869 {
5788 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5870 TestObject* impl = V8TestObject::toImpl(info.Holder());
5871
5789 v8SetReturnValue(info, impl->float32ArrayMethod()); 5872 v8SetReturnValue(info, impl->float32ArrayMethod());
5790 } 5873 }
5791 5874
5792 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 5875 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5793 { 5876 {
5794 TestObjectV8Internal::float32ArrayMethodMethod(info); 5877 TestObjectV8Internal::float32ArrayMethodMethod(info);
5795 } 5878 }
5796 5879
5797 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 5880 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5798 { 5881 {
5799 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5882 TestObject* impl = V8TestObject::toImpl(info.Holder());
5883
5800 v8SetReturnValue(info, impl->int32ArrayMethod()); 5884 v8SetReturnValue(info, impl->int32ArrayMethod());
5801 } 5885 }
5802 5886
5803 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5887 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5804 { 5888 {
5805 TestObjectV8Internal::int32ArrayMethodMethod(info); 5889 TestObjectV8Internal::int32ArrayMethodMethod(info);
5806 } 5890 }
5807 5891
5808 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 5892 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5809 { 5893 {
5810 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5894 TestObject* impl = V8TestObject::toImpl(info.Holder());
5895
5811 v8SetReturnValue(info, impl->uint8ArrayMethod()); 5896 v8SetReturnValue(info, impl->uint8ArrayMethod());
5812 } 5897 }
5813 5898
5814 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5899 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5815 { 5900 {
5816 TestObjectV8Internal::uint8ArrayMethodMethod(info); 5901 TestObjectV8Internal::uint8ArrayMethodMethod(info);
5817 } 5902 }
5818 5903
5819 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 5904 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5820 { 5905 {
5906 TestObject* impl = V8TestObject::toImpl(info.Holder());
5907
5821 if (UNLIKELY(info.Length() < 1)) { 5908 if (UNLIKELY(info.Length() < 1)) {
5822 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodA rrayBufferArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Leng th())))); 5909 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodArrayBufferArg", "TestObject", ExceptionMessages::notE noughArguments(1, info.Length())));
5823 return; 5910 return;
5824 } 5911 }
5825 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5912
5826 TestArrayBuffer* arrayBufferArg; 5913 TestArrayBuffer* arrayBufferArg;
5827 { 5914 arrayBufferArg = info[0]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local< v8::ArrayBuffer>::Cast(info[0])) : 0;
5828 arrayBufferArg = info[0]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Lo cal<v8::ArrayBuffer>::Cast(info[0])) : 0; 5915 if (!arrayBufferArg) {
5829 if (!arrayBufferArg) { 5916 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodArrayBufferArg", "TestObject", "parameter 1 is not of type 'ArrayBuffer'."));
5830 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodArrayBufferArg", "TestObject", "parameter 1 is not of type 'ArrayBuffer'.")); 5917
5831 return; 5918 return;
5832 }
5833 } 5919 }
5920
5834 impl->voidMethodArrayBufferArg(arrayBufferArg); 5921 impl->voidMethodArrayBufferArg(arrayBufferArg);
5835 } 5922 }
5836 5923
5837 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 5924 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
5838 { 5925 {
5839 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info); 5926 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info);
5840 } 5927 }
5841 5928
5842 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 5929 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
5843 { 5930 {
5931 TestObject* impl = V8TestObject::toImpl(info.Holder());
5932
5844 if (UNLIKELY(info.Length() < 1)) { 5933 if (UNLIKELY(info.Length() < 1)) {
5845 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodA rrayBufferOrNullArg", "TestObject", ExceptionMessages::notEnoughArguments(1, inf o.Length())))); 5934 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodArrayBufferOrNullArg", "TestObject", ExceptionMessages ::notEnoughArguments(1, info.Length())));
5846 return; 5935 return;
5847 } 5936 }
5848 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5937
5849 TestArrayBuffer* arrayBufferArg; 5938 TestArrayBuffer* arrayBufferArg;
5850 { 5939 arrayBufferArg = info[0]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local< v8::ArrayBuffer>::Cast(info[0])) : 0;
5851 arrayBufferArg = info[0]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Lo cal<v8::ArrayBuffer>::Cast(info[0])) : 0; 5940 if (!arrayBufferArg && !isUndefinedOrNull(info[0])) {
5852 if (!arrayBufferArg && !isUndefinedOrNull(info[0])) { 5941 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodArrayBufferOrNullArg", "TestObject", "parameter 1 is n ot of type 'ArrayBuffer'."));
5853 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodArrayBufferOrNullArg", "TestObject", "parameter 1 is not of type 'ArrayBuffer'.")); 5942
5854 return; 5943 return;
5855 }
5856 } 5944 }
5945
5857 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); 5946 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg);
5858 } 5947 }
5859 5948
5860 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 5949 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
5861 { 5950 {
5862 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); 5951 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info);
5863 } 5952 }
5864 5953
5865 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 5954 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5866 { 5955 {
5956 TestObject* impl = V8TestObject::toImpl(info.Holder());
5957
5867 if (UNLIKELY(info.Length() < 1)) { 5958 if (UNLIKELY(info.Length() < 1)) {
5868 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodA rrayBufferViewArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info. Length())))); 5959 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodArrayBufferViewArg", "TestObject", ExceptionMessages:: notEnoughArguments(1, info.Length())));
5869 return; 5960 return;
5870 } 5961 }
5871 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5962
5872 TestArrayBufferView* arrayBufferViewArg; 5963 TestArrayBufferView* arrayBufferViewArg;
5873 { 5964 arrayBufferViewArg = info[0]->IsArrayBufferView() ? V8ArrayBufferView::toImp l(v8::Local<v8::ArrayBufferView>::Cast(info[0])) : 0;
5874 arrayBufferViewArg = info[0]->IsArrayBufferView() ? V8ArrayBufferView::t oImpl(v8::Local<v8::ArrayBufferView>::Cast(info[0])) : 0; 5965 if (!arrayBufferViewArg) {
5875 if (!arrayBufferViewArg) { 5966 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodArrayBufferViewArg", "TestObject", "parameter 1 is not of type 'ArrayBufferView'."));
5876 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodArrayBufferViewArg", "TestObject", "parameter 1 is not of type 'ArrayBufferView'.")); 5967
5877 return; 5968 return;
5878 }
5879 } 5969 }
5970
5880 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); 5971 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg);
5881 } 5972 }
5882 5973
5883 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 5974 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
5884 { 5975 {
5885 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); 5976 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info);
5886 } 5977 }
5887 5978
5888 static void voidMethodFlexibleArrayBufferViewArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 5979 static void voidMethodFlexibleArrayBufferViewArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
5889 { 5980 {
5981 TestObject* impl = V8TestObject::toImpl(info.Holder());
5982
5890 if (UNLIKELY(info.Length() < 1)) { 5983 if (UNLIKELY(info.Length() < 1)) {
5891 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodF lexibleArrayBufferViewArg", "TestObject", ExceptionMessages::notEnoughArguments( 1, info.Length())))); 5984 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodFlexibleArrayBufferViewArg", "TestObject", ExceptionMe ssages::notEnoughArguments(1, info.Length())));
5892 return; 5985 return;
5893 } 5986 }
5894 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5987
5895 FlexibleArrayBufferView arrayBufferViewArg; 5988 FlexibleArrayBufferView arrayBufferViewArg;
5896 { 5989 toFlexibleArrayBufferView(info.GetIsolate(), info[0], arrayBufferViewArg, al locateFlexibleArrayBufferViewStorage(info[0]));
5897 toFlexibleArrayBufferView(info.GetIsolate(), info[0], arrayBufferViewArg , allocateFlexibleArrayBufferViewStorage(info[0])); 5990 if (!arrayBufferViewArg) {
5898 if (!arrayBufferViewArg) { 5991 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodFlexibleArrayBufferViewArg", "TestObject", "parameter 1 is not of type 'ArrayBufferView'."));
5899 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodFlexibleArrayBufferViewArg", "TestObject", "parame ter 1 is not of type 'ArrayBufferView'.")); 5992
5900 return; 5993 return;
5901 }
5902 } 5994 }
5995
5903 impl->voidMethodFlexibleArrayBufferViewArg(arrayBufferViewArg); 5996 impl->voidMethodFlexibleArrayBufferViewArg(arrayBufferViewArg);
5904 } 5997 }
5905 5998
5906 static void voidMethodFlexibleArrayBufferViewArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 5999 static void voidMethodFlexibleArrayBufferViewArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
5907 { 6000 {
5908 TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethod(info); 6001 TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethod(info);
5909 } 6002 }
5910 6003
5911 static void voidMethodFlexibleArrayBufferViewTypedArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info) 6004 static void voidMethodFlexibleArrayBufferViewTypedArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
5912 { 6005 {
6006 TestObject* impl = V8TestObject::toImpl(info.Holder());
6007
5913 if (UNLIKELY(info.Length() < 1)) { 6008 if (UNLIKELY(info.Length() < 1)) {
5914 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodF lexibleArrayBufferViewTypedArg", "TestObject", ExceptionMessages::notEnoughArgum ents(1, info.Length())))); 6009 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodFlexibleArrayBufferViewTypedArg", "TestObject", Except ionMessages::notEnoughArguments(1, info.Length())));
5915 return; 6010 return;
5916 } 6011 }
5917 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6012
5918 FlexibleFloat32ArrayView typedArrayBufferViewArg; 6013 FlexibleFloat32ArrayView typedArrayBufferViewArg;
5919 { 6014 toFlexibleArrayBufferView(info.GetIsolate(), info[0], typedArrayBufferViewAr g, allocateFlexibleArrayBufferViewStorage(info[0]));
5920 toFlexibleArrayBufferView(info.GetIsolate(), info[0], typedArrayBufferVi ewArg, allocateFlexibleArrayBufferViewStorage(info[0])); 6015 if (!typedArrayBufferViewArg) {
5921 if (!typedArrayBufferViewArg) { 6016 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodFlexibleArrayBufferViewTypedArg", "TestObject", "param eter 1 is not of type 'Float32Array'."));
5922 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodFlexibleArrayBufferViewTypedArg", "TestObject", "p arameter 1 is not of type 'Float32Array'.")); 6017
5923 return; 6018 return;
5924 }
5925 } 6019 }
6020
5926 impl->voidMethodFlexibleArrayBufferViewTypedArg(typedArrayBufferViewArg); 6021 impl->voidMethodFlexibleArrayBufferViewTypedArg(typedArrayBufferViewArg);
5927 } 6022 }
5928 6023
5929 static void voidMethodFlexibleArrayBufferViewTypedArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 6024 static void voidMethodFlexibleArrayBufferViewTypedArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
5930 { 6025 {
5931 TestObjectV8Internal::voidMethodFlexibleArrayBufferViewTypedArgMethod(info); 6026 TestObjectV8Internal::voidMethodFlexibleArrayBufferViewTypedArgMethod(info);
5932 } 6027 }
5933 6028
5934 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 6029 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5935 { 6030 {
6031 TestObject* impl = V8TestObject::toImpl(info.Holder());
6032
5936 if (UNLIKELY(info.Length() < 1)) { 6033 if (UNLIKELY(info.Length() < 1)) {
5937 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodF loat32ArrayArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Len gth())))); 6034 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodFloat32ArrayArg", "TestObject", ExceptionMessages::not EnoughArguments(1, info.Length())));
5938 return; 6035 return;
5939 } 6036 }
5940 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6037
5941 DOMFloat32Array* float32ArrayArg; 6038 DOMFloat32Array* float32ArrayArg;
5942 { 6039 float32ArrayArg = info[0]->IsFloat32Array() ? V8Float32Array::toImpl(v8::Loc al<v8::Float32Array>::Cast(info[0])) : 0;
5943 float32ArrayArg = info[0]->IsFloat32Array() ? V8Float32Array::toImpl(v8: :Local<v8::Float32Array>::Cast(info[0])) : 0; 6040 if (!float32ArrayArg) {
5944 if (!float32ArrayArg) { 6041 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodFloat32ArrayArg", "TestObject", "parameter 1 is not of type 'Float32Array'."));
5945 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodFloat32ArrayArg", "TestObject", "parameter 1 is no t of type 'Float32Array'.")); 6042
5946 return; 6043 return;
5947 }
5948 } 6044 }
6045
5949 impl->voidMethodFloat32ArrayArg(float32ArrayArg); 6046 impl->voidMethodFloat32ArrayArg(float32ArrayArg);
5950 } 6047 }
5951 6048
5952 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 6049 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5953 { 6050 {
5954 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info); 6051 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info);
5955 } 6052 }
5956 6053
5957 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6054 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5958 { 6055 {
6056 TestObject* impl = V8TestObject::toImpl(info.Holder());
6057
5959 if (UNLIKELY(info.Length() < 1)) { 6058 if (UNLIKELY(info.Length() < 1)) {
5960 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodI nt32ArrayArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Lengt h())))); 6059 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodInt32ArrayArg", "TestObject", ExceptionMessages::notEn oughArguments(1, info.Length())));
5961 return; 6060 return;
5962 } 6061 }
5963 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6062
5964 DOMInt32Array* int32ArrayArg; 6063 DOMInt32Array* int32ArrayArg;
5965 { 6064 int32ArrayArg = info[0]->IsInt32Array() ? V8Int32Array::toImpl(v8::Local<v8: :Int32Array>::Cast(info[0])) : 0;
5966 int32ArrayArg = info[0]->IsInt32Array() ? V8Int32Array::toImpl(v8::Local <v8::Int32Array>::Cast(info[0])) : 0; 6065 if (!int32ArrayArg) {
5967 if (!int32ArrayArg) { 6066 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodInt32ArrayArg", "TestObject", "parameter 1 is not of t ype 'Int32Array'."));
5968 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodInt32ArrayArg", "TestObject", "parameter 1 is not of type 'Int32Array'.")); 6067
5969 return; 6068 return;
5970 }
5971 } 6069 }
6070
5972 impl->voidMethodInt32ArrayArg(int32ArrayArg); 6071 impl->voidMethodInt32ArrayArg(int32ArrayArg);
5973 } 6072 }
5974 6073
5975 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 6074 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5976 { 6075 {
5977 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info); 6076 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info);
5978 } 6077 }
5979 6078
5980 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6079 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5981 { 6080 {
6081 TestObject* impl = V8TestObject::toImpl(info.Holder());
6082
5982 if (UNLIKELY(info.Length() < 1)) { 6083 if (UNLIKELY(info.Length() < 1)) {
5983 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodU int8ArrayArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Lengt h())))); 6084 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodUint8ArrayArg", "TestObject", ExceptionMessages::notEn oughArguments(1, info.Length())));
5984 return; 6085 return;
5985 } 6086 }
5986 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6087
5987 DOMUint8Array* uint8ArrayArg; 6088 DOMUint8Array* uint8ArrayArg;
5988 { 6089 uint8ArrayArg = info[0]->IsUint8Array() ? V8Uint8Array::toImpl(v8::Local<v8: :Uint8Array>::Cast(info[0])) : 0;
5989 uint8ArrayArg = info[0]->IsUint8Array() ? V8Uint8Array::toImpl(v8::Local <v8::Uint8Array>::Cast(info[0])) : 0; 6090 if (!uint8ArrayArg) {
5990 if (!uint8ArrayArg) { 6091 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodUint8ArrayArg", "TestObject", "parameter 1 is not of t ype 'Uint8Array'."));
5991 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodUint8ArrayArg", "TestObject", "parameter 1 is not of type 'Uint8Array'.")); 6092
5992 return; 6093 return;
5993 }
5994 } 6094 }
6095
5995 impl->voidMethodUint8ArrayArg(uint8ArrayArg); 6096 impl->voidMethodUint8ArrayArg(uint8ArrayArg);
5996 } 6097 }
5997 6098
5998 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 6099 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5999 { 6100 {
6000 TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info); 6101 TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info);
6001 } 6102 }
6002 6103
6003 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o) 6104 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o)
6004 { 6105 {
6005 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6106 TestObject* impl = V8TestObject::toImpl(info.Holder());
6107
6006 v8SetReturnValue(info, toV8(impl->longArrayMethod(), info.Holder(), info.Get Isolate())); 6108 v8SetReturnValue(info, toV8(impl->longArrayMethod(), info.Holder(), info.Get Isolate()));
6007 } 6109 }
6008 6110
6009 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6111 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6010 { 6112 {
6011 TestObjectV8Internal::longArrayMethodMethod(info); 6113 TestObjectV8Internal::longArrayMethodMethod(info);
6012 } 6114 }
6013 6115
6014 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 6116 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6015 { 6117 {
6016 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6118 TestObject* impl = V8TestObject::toImpl(info.Holder());
6119
6017 v8SetReturnValue(info, toV8(impl->stringArrayMethod(), info.Holder(), info.G etIsolate())); 6120 v8SetReturnValue(info, toV8(impl->stringArrayMethod(), info.Holder(), info.G etIsolate()));
6018 } 6121 }
6019 6122
6020 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 6123 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6021 { 6124 {
6022 TestObjectV8Internal::stringArrayMethodMethod(info); 6125 TestObjectV8Internal::stringArrayMethodMethod(info);
6023 } 6126 }
6024 6127
6025 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 6128 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
6026 { 6129 {
6027 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6130 TestObject* impl = V8TestObject::toImpl(info.Holder());
6131
6028 v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayMethod(), info.Hold er(), info.GetIsolate())); 6132 v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayMethod(), info.Hold er(), info.GetIsolate()));
6029 } 6133 }
6030 6134
6031 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 6135 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
6032 { 6136 {
6033 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); 6137 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info);
6034 } 6138 }
6035 6139
6036 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 6140 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
6037 { 6141 {
6038 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); 6142 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodArrayLongArg");
6143
6144 TestObject* impl = V8TestObject::toImpl(info.Holder());
6145
6039 if (UNLIKELY(info.Length() < 1)) { 6146 if (UNLIKELY(info.Length() < 1)) {
6040 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6147 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6041 return; 6148 return;
6042 } 6149 }
6043 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6150
6044 Vector<int> arrayLongArg; 6151 Vector<int> arrayLongArg;
6045 { 6152 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), excep tionState);
6046 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), e xceptionState); 6153 if (exceptionState.hadException())
6047 if (exceptionState.hadException()) 6154 return;
6048 return; 6155
6049 }
6050 impl->voidMethodArrayLongArg(arrayLongArg); 6156 impl->voidMethodArrayLongArg(arrayLongArg);
6051 } 6157 }
6052 6158
6053 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 6159 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
6054 { 6160 {
6055 TestObjectV8Internal::voidMethodArrayLongArgMethod(info); 6161 TestObjectV8Internal::voidMethodArrayLongArgMethod(info);
6056 } 6162 }
6057 6163
6058 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 6164 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
6059 { 6165 {
6060 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayStringArg", "TestObject", info.Holder(), info.GetIsolate()); 6166 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodArrayStringArg");
6167
6168 TestObject* impl = V8TestObject::toImpl(info.Holder());
6169
6061 if (UNLIKELY(info.Length() < 1)) { 6170 if (UNLIKELY(info.Length() < 1)) {
6062 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6171 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6063 return; 6172 return;
6064 } 6173 }
6065 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6174
6066 Vector<String> arrayStringArg; 6175 Vector<String> arrayStringArg;
6067 { 6176 arrayStringArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState);
6068 arrayStringArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate (), exceptionState); 6177 if (exceptionState.hadException())
6069 if (exceptionState.hadException()) 6178 return;
6070 return; 6179
6071 }
6072 impl->voidMethodArrayStringArg(arrayStringArg); 6180 impl->voidMethodArrayStringArg(arrayStringArg);
6073 } 6181 }
6074 6182
6075 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 6183 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
6076 { 6184 {
6077 TestObjectV8Internal::voidMethodArrayStringArgMethod(info); 6185 TestObjectV8Internal::voidMethodArrayStringArgMethod(info);
6078 } 6186 }
6079 6187
6080 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 6188 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
6081 { 6189 {
6082 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); 6190 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodArrayTestInterfaceEmptyArg");
6191
6192 TestObject* impl = V8TestObject::toImpl(info.Holder());
6193
6083 if (UNLIKELY(info.Length() < 1)) { 6194 if (UNLIKELY(info.Length() < 1)) {
6084 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6195 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6085 return; 6196 return;
6086 } 6197 }
6087 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6198
6088 HeapVector<Member<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg; 6199 HeapVector<Member<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg;
6089 { 6200 arrayTestInterfaceEmptyArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0 ], 1, info.GetIsolate(), exceptionState));
6090 arrayTestInterfaceEmptyArg = (toMemberNativeArray<TestInterfaceEmpty>(in fo[0], 1, info.GetIsolate(), exceptionState)); 6201 if (exceptionState.hadException())
6091 if (exceptionState.hadException()) 6202 return;
6092 return; 6203
6093 }
6094 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); 6204 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg);
6095 } 6205 }
6096 6206
6097 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 6207 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
6098 { 6208 {
6099 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); 6209 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info);
6100 } 6210 }
6101 6211
6102 static void voidMethodNullableArrayLongArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 6212 static void voidMethodNullableArrayLongArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
6103 { 6213 {
6104 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodN ullableArrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); 6214 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodNullableArrayLongArg");
6215
6216 TestObject* impl = V8TestObject::toImpl(info.Holder());
6217
6105 if (UNLIKELY(info.Length() < 1)) { 6218 if (UNLIKELY(info.Length() < 1)) {
6106 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6219 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6107 return; 6220 return;
6108 } 6221 }
6109 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6222
6110 Nullable<Vector<int>> arrayLongArg; 6223 Nullable<Vector<int>> arrayLongArg;
6111 { 6224 if (!isUndefinedOrNull(info[0])) {
6112 if (!isUndefinedOrNull(info[0])) { 6225 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), e xceptionState);
6113 arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate( ), exceptionState); 6226 if (exceptionState.hadException())
6114 if (exceptionState.hadException()) 6227 return;
6115 return;
6116 }
6117 } 6228 }
6229
6118 impl->voidMethodNullableArrayLongArg(arrayLongArg); 6230 impl->voidMethodNullableArrayLongArg(arrayLongArg);
6119 } 6231 }
6120 6232
6121 static void voidMethodNullableArrayLongArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 6233 static void voidMethodNullableArrayLongArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6122 { 6234 {
6123 TestObjectV8Internal::voidMethodNullableArrayLongArgMethod(info); 6235 TestObjectV8Internal::voidMethodNullableArrayLongArgMethod(info);
6124 } 6236 }
6125 6237
6126 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 6238 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6127 { 6239 {
6128 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6240 TestObject* impl = V8TestObject::toImpl(info.Holder());
6241
6129 v8SetReturnValue(info, toV8(impl->longSequenceMethod(), info.Holder(), info. GetIsolate())); 6242 v8SetReturnValue(info, toV8(impl->longSequenceMethod(), info.Holder(), info. GetIsolate()));
6130 } 6243 }
6131 6244
6132 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 6245 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
6133 { 6246 {
6134 TestObjectV8Internal::longSequenceMethodMethod(info); 6247 TestObjectV8Internal::longSequenceMethodMethod(info);
6135 } 6248 }
6136 6249
6137 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 6250 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
6138 { 6251 {
6139 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6252 TestObject* impl = V8TestObject::toImpl(info.Holder());
6253
6140 v8SetReturnValue(info, toV8(impl->stringSequenceMethod(), info.Holder(), inf o.GetIsolate())); 6254 v8SetReturnValue(info, toV8(impl->stringSequenceMethod(), info.Holder(), inf o.GetIsolate()));
6141 } 6255 }
6142 6256
6143 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6257 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6144 { 6258 {
6145 TestObjectV8Internal::stringSequenceMethodMethod(info); 6259 TestObjectV8Internal::stringSequenceMethodMethod(info);
6146 } 6260 }
6147 6261
6148 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info) 6262 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
6149 { 6263 {
6150 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6264 TestObject* impl = V8TestObject::toImpl(info.Holder());
6265
6151 v8SetReturnValue(info, toV8(impl->testInterfaceEmptySequenceMethod(), info.H older(), info.GetIsolate())); 6266 v8SetReturnValue(info, toV8(impl->testInterfaceEmptySequenceMethod(), info.H older(), info.GetIsolate()));
6152 } 6267 }
6153 6268
6154 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 6269 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
6155 { 6270 {
6156 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); 6271 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info);
6157 } 6272 }
6158 6273
6159 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 6274 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
6160 { 6275 {
6161 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS equenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); 6276 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodSequenceLongArg");
6277
6278 TestObject* impl = V8TestObject::toImpl(info.Holder());
6279
6162 if (UNLIKELY(info.Length() < 1)) { 6280 if (UNLIKELY(info.Length() < 1)) {
6163 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6281 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6164 return; 6282 return;
6165 } 6283 }
6166 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6284
6167 Vector<int> longSequenceArg; 6285 Vector<int> longSequenceArg;
6168 { 6286 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), ex ceptionState);
6169 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate() , exceptionState); 6287 if (exceptionState.hadException())
6170 if (exceptionState.hadException()) 6288 return;
6171 return; 6289
6172 }
6173 impl->voidMethodSequenceLongArg(longSequenceArg); 6290 impl->voidMethodSequenceLongArg(longSequenceArg);
6174 } 6291 }
6175 6292
6176 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 6293 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
6177 { 6294 {
6178 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); 6295 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info);
6179 } 6296 }
6180 6297
6181 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 6298 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
6182 { 6299 {
6183 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS equenceStringArg", "TestObject", info.Holder(), info.GetIsolate()); 6300 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodSequenceStringArg");
6301
6302 TestObject* impl = V8TestObject::toImpl(info.Holder());
6303
6184 if (UNLIKELY(info.Length() < 1)) { 6304 if (UNLIKELY(info.Length() < 1)) {
6185 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6305 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6186 return; 6306 return;
6187 } 6307 }
6188 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6308
6189 Vector<String> stringSequenceArg; 6309 Vector<String> stringSequenceArg;
6190 { 6310 stringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate( ), exceptionState);
6191 stringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsol ate(), exceptionState); 6311 if (exceptionState.hadException())
6192 if (exceptionState.hadException()) 6312 return;
6193 return; 6313
6194 }
6195 impl->voidMethodSequenceStringArg(stringSequenceArg); 6314 impl->voidMethodSequenceStringArg(stringSequenceArg);
6196 } 6315 }
6197 6316
6198 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 6317 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
6199 { 6318 {
6200 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); 6319 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info);
6201 } 6320 }
6202 6321
6203 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 6322 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
6204 { 6323 {
6205 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS equenceTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); 6324 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodSequenceTestInterfaceEmptyArg");
6325
6326 TestObject* impl = V8TestObject::toImpl(info.Holder());
6327
6206 if (UNLIKELY(info.Length() < 1)) { 6328 if (UNLIKELY(info.Length() < 1)) {
6207 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6329 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6208 return; 6330 return;
6209 } 6331 }
6210 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6332
6211 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptySequenceArg; 6333 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptySequenceArg;
6212 { 6334 testInterfaceEmptySequenceArg = (toMemberNativeArray<TestInterfaceEmpty>(inf o[0], 1, info.GetIsolate(), exceptionState));
6213 testInterfaceEmptySequenceArg = (toMemberNativeArray<TestInterfaceEmpty> (info[0], 1, info.GetIsolate(), exceptionState)); 6335 if (exceptionState.hadException())
6214 if (exceptionState.hadException()) 6336 return;
6215 return; 6337
6216 }
6217 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg) ; 6338 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg) ;
6218 } 6339 }
6219 6340
6220 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 6341 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
6221 { 6342 {
6222 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); 6343 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info);
6223 } 6344 }
6224 6345
6225 static void voidMethodSequenceSequenceDOMStringArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 6346 static void voidMethodSequenceSequenceDOMStringArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
6226 { 6347 {
6227 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS equenceSequenceDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); 6348 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodSequenceSequenceDOMStringArg");
6349
6350 TestObject* impl = V8TestObject::toImpl(info.Holder());
6351
6228 if (UNLIKELY(info.Length() < 1)) { 6352 if (UNLIKELY(info.Length() < 1)) {
6229 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6353 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6230 return; 6354 return;
6231 } 6355 }
6232 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6356
6233 Vector<Vector<String>> stringSequenceSequenceArg; 6357 Vector<Vector<String>> stringSequenceSequenceArg;
6234 { 6358 stringSequenceSequenceArg = toImplArray<Vector<Vector<String>>>(info[0], 1, info.GetIsolate(), exceptionState);
6235 stringSequenceSequenceArg = toImplArray<Vector<Vector<String>>>(info[0], 1, info.GetIsolate(), exceptionState); 6359 if (exceptionState.hadException())
6236 if (exceptionState.hadException()) 6360 return;
6237 return; 6361
6238 }
6239 impl->voidMethodSequenceSequenceDOMStringArg(stringSequenceSequenceArg); 6362 impl->voidMethodSequenceSequenceDOMStringArg(stringSequenceSequenceArg);
6240 } 6363 }
6241 6364
6242 static void voidMethodSequenceSequenceDOMStringArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 6365 static void voidMethodSequenceSequenceDOMStringArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
6243 { 6366 {
6244 TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethod(info); 6367 TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethod(info);
6245 } 6368 }
6246 6369
6247 static void voidMethodNullableSequenceLongArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info) 6370 static void voidMethodNullableSequenceLongArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
6248 { 6371 {
6249 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodN ullableSequenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); 6372 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodNullableSequenceLongArg");
6373
6374 TestObject* impl = V8TestObject::toImpl(info.Holder());
6375
6250 if (UNLIKELY(info.Length() < 1)) { 6376 if (UNLIKELY(info.Length() < 1)) {
6251 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6377 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6252 return; 6378 return;
6253 } 6379 }
6254 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6380
6255 Nullable<Vector<int>> longSequenceArg; 6381 Nullable<Vector<int>> longSequenceArg;
6256 { 6382 if (!isUndefinedOrNull(info[0])) {
6257 if (!isUndefinedOrNull(info[0])) { 6383 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate() , exceptionState);
6258 longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsola te(), exceptionState); 6384 if (exceptionState.hadException())
6259 if (exceptionState.hadException()) 6385 return;
6260 return;
6261 }
6262 } 6386 }
6387
6263 impl->voidMethodNullableSequenceLongArg(longSequenceArg); 6388 impl->voidMethodNullableSequenceLongArg(longSequenceArg);
6264 } 6389 }
6265 6390
6266 static void voidMethodNullableSequenceLongArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 6391 static void voidMethodNullableSequenceLongArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
6267 { 6392 {
6268 TestObjectV8Internal::voidMethodNullableSequenceLongArgMethod(info); 6393 TestObjectV8Internal::voidMethodNullableSequenceLongArgMethod(info);
6269 } 6394 }
6270 6395
6271 static void longFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 6396 static void longFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
6272 { 6397 {
6273 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6398 TestObject* impl = V8TestObject::toImpl(info.Holder());
6399
6274 v8SetReturnValue(info, freezeV8Object(toV8(impl->longFrozenArrayMethod(), in fo.Holder(), info.GetIsolate()), info.GetIsolate())); 6400 v8SetReturnValue(info, freezeV8Object(toV8(impl->longFrozenArrayMethod(), in fo.Holder(), info.GetIsolate()), info.GetIsolate()));
6275 } 6401 }
6276 6402
6277 static void longFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 6403 static void longFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
6278 { 6404 {
6279 TestObjectV8Internal::longFrozenArrayMethodMethod(info); 6405 TestObjectV8Internal::longFrozenArrayMethodMethod(info);
6280 } 6406 }
6281 6407
6282 static void voidMethodStringFrozenArrayMethodMethod(const v8::FunctionCallbackIn fo<v8::Value>& info) 6408 static void voidMethodStringFrozenArrayMethodMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
6283 { 6409 {
6284 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS tringFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); 6410 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodStringFrozenArrayMethod");
6411
6412 TestObject* impl = V8TestObject::toImpl(info.Holder());
6413
6285 if (UNLIKELY(info.Length() < 1)) { 6414 if (UNLIKELY(info.Length() < 1)) {
6286 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6415 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6287 return; 6416 return;
6288 } 6417 }
6289 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6418
6290 Vector<String> stringFrozenArrayArg; 6419 Vector<String> stringFrozenArrayArg;
6291 { 6420 stringFrozenArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsola te(), exceptionState);
6292 stringFrozenArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetI solate(), exceptionState); 6421 if (exceptionState.hadException())
6293 if (exceptionState.hadException()) 6422 return;
6294 return; 6423
6295 }
6296 impl->voidMethodStringFrozenArrayMethod(stringFrozenArrayArg); 6424 impl->voidMethodStringFrozenArrayMethod(stringFrozenArrayArg);
6297 } 6425 }
6298 6426
6299 static void voidMethodStringFrozenArrayMethodMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 6427 static void voidMethodStringFrozenArrayMethodMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
6300 { 6428 {
6301 TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethod(info); 6429 TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethod(info);
6302 } 6430 }
6303 6431
6304 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info) 6432 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info)
6305 { 6433 {
6306 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolat e()); 6434 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodTestInterfaceEmptyFrozenArrayMethod");
6435
6436 TestObject* impl = V8TestObject::toImpl(info.Holder());
6437
6307 if (UNLIKELY(info.Length() < 1)) { 6438 if (UNLIKELY(info.Length() < 1)) {
6308 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6439 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6309 return; 6440 return;
6310 } 6441 }
6311 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6442
6312 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyFrozenArrayArg; 6443 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyFrozenArrayArg;
6313 { 6444 testInterfaceEmptyFrozenArrayArg = (toMemberNativeArray<TestInterfaceEmpty>( info[0], 1, info.GetIsolate(), exceptionState));
6314 testInterfaceEmptyFrozenArrayArg = (toMemberNativeArray<TestInterfaceEmp ty>(info[0], 1, info.GetIsolate(), exceptionState)); 6445 if (exceptionState.hadException())
6315 if (exceptionState.hadException()) 6446 return;
6316 return; 6447
6317 }
6318 impl->voidMethodTestInterfaceEmptyFrozenArrayMethod(testInterfaceEmptyFrozen ArrayArg); 6448 impl->voidMethodTestInterfaceEmptyFrozenArrayMethod(testInterfaceEmptyFrozen ArrayArg);
6319 } 6449 }
6320 6450
6321 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info) 6451 static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
6322 { 6452 {
6323 TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(in fo); 6453 TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(in fo);
6324 } 6454 }
6325 6455
6326 static void nullableLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 6456 static void nullableLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6327 { 6457 {
6328 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6458 TestObject* impl = V8TestObject::toImpl(info.Holder());
6459
6329 Nullable<int> result = impl->nullableLongMethod(); 6460 Nullable<int> result = impl->nullableLongMethod();
6330 if (result.isNull()) 6461 if (result.isNull())
6331 v8SetReturnValueNull(info); 6462 v8SetReturnValueNull(info);
6332 else 6463 else
6333 v8SetReturnValueInt(info, result.get()); 6464 v8SetReturnValueInt(info, result.get());
6334 } 6465 }
6335 6466
6336 static void nullableLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 6467 static void nullableLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
6337 { 6468 {
6338 TestObjectV8Internal::nullableLongMethodMethod(info); 6469 TestObjectV8Internal::nullableLongMethodMethod(info);
6339 } 6470 }
6340 6471
6341 static void nullableStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 6472 static void nullableStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
6342 { 6473 {
6343 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6474 TestObject* impl = V8TestObject::toImpl(info.Holder());
6475
6344 v8SetReturnValueStringOrNull(info, impl->nullableStringMethod(), info.GetIso late()); 6476 v8SetReturnValueStringOrNull(info, impl->nullableStringMethod(), info.GetIso late());
6345 } 6477 }
6346 6478
6347 static void nullableStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6479 static void nullableStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6348 { 6480 {
6349 TestObjectV8Internal::nullableStringMethodMethod(info); 6481 TestObjectV8Internal::nullableStringMethodMethod(info);
6350 } 6482 }
6351 6483
6352 static void nullableTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 6484 static void nullableTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
6353 { 6485 {
6354 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6486 TestObject* impl = V8TestObject::toImpl(info.Holder());
6487
6355 v8SetReturnValue(info, impl->nullableTestInterfaceMethod()); 6488 v8SetReturnValue(info, impl->nullableTestInterfaceMethod());
6356 } 6489 }
6357 6490
6358 static void nullableTestInterfaceMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 6491 static void nullableTestInterfaceMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
6359 { 6492 {
6360 TestObjectV8Internal::nullableTestInterfaceMethodMethod(info); 6493 TestObjectV8Internal::nullableTestInterfaceMethodMethod(info);
6361 } 6494 }
6362 6495
6363 static void nullableLongSequenceMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 6496 static void nullableLongSequenceMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
6364 { 6497 {
6365 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6498 TestObject* impl = V8TestObject::toImpl(info.Holder());
6499
6366 Nullable<Vector<int>> result = impl->nullableLongSequenceMethod(); 6500 Nullable<Vector<int>> result = impl->nullableLongSequenceMethod();
6367 if (result.isNull()) 6501 if (result.isNull())
6368 v8SetReturnValueNull(info); 6502 v8SetReturnValueNull(info);
6369 else 6503 else
6370 v8SetReturnValue(info, toV8(result.get(), info.Holder(), info.GetIsolate ())); 6504 v8SetReturnValue(info, toV8(result.get(), info.Holder(), info.GetIsolate ()));
6371 } 6505 }
6372 6506
6373 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 6507 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
6374 { 6508 {
6375 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); 6509 TestObjectV8Internal::nullableLongSequenceMethodMethod(info);
6376 } 6510 }
6377 6511
6378 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 6512 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
6379 { 6513 {
6380 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6514 TestObject* impl = V8TestObject::toImpl(info.Holder());
6515
6381 TestInterfaceGarbageCollectedOrString result; 6516 TestInterfaceGarbageCollectedOrString result;
6382 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result); 6517 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result);
6383 v8SetReturnValue(info, result); 6518 v8SetReturnValue(info, result);
6384 } 6519 }
6385 6520
6386 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 6521 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
6387 { 6522 {
6388 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i nfo); 6523 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i nfo);
6389 } 6524 }
6390 6525
6391 static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info) 6526 static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
6392 { 6527 {
6393 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6528 TestObject* impl = V8TestObject::toImpl(info.Holder());
6529
6394 BooleanOrStringOrUnrestrictedDouble result; 6530 BooleanOrStringOrUnrestrictedDouble result;
6395 impl->booleanOrDOMStringOrUnrestrictedDoubleMethod(result); 6531 impl->booleanOrDOMStringOrUnrestrictedDoubleMethod(result);
6396 v8SetReturnValue(info, result); 6532 v8SetReturnValue(info, result);
6397 } 6533 }
6398 6534
6399 static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info) 6535 static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
6400 { 6536 {
6401 TestObjectV8Internal::booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(inf o); 6537 TestObjectV8Internal::booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(inf o);
6402 } 6538 }
6403 6539
6404 static void testInterfaceOrLongMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 6540 static void testInterfaceOrLongMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
6405 { 6541 {
6406 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6542 TestObject* impl = V8TestObject::toImpl(info.Holder());
6543
6407 TestInterfaceOrLong result; 6544 TestInterfaceOrLong result;
6408 impl->testInterfaceOrLongMethod(result); 6545 impl->testInterfaceOrLongMethod(result);
6409 v8SetReturnValue(info, result); 6546 v8SetReturnValue(info, result);
6410 } 6547 }
6411 6548
6412 static void testInterfaceOrLongMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 6549 static void testInterfaceOrLongMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
6413 { 6550 {
6414 TestObjectV8Internal::testInterfaceOrLongMethodMethod(info); 6551 TestObjectV8Internal::testInterfaceOrLongMethodMethod(info);
6415 } 6552 }
6416 6553
6417 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 6554 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
6418 { 6555 {
6419 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); 6556 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDoubleOrDOMStringArg");
6557
6558 TestObject* impl = V8TestObject::toImpl(info.Holder());
6559
6420 if (UNLIKELY(info.Length() < 1)) { 6560 if (UNLIKELY(info.Length() < 1)) {
6421 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6561 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6422 return; 6562 return;
6423 } 6563 }
6424 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6564
6425 DoubleOrString arg; 6565 DoubleOrString arg;
6426 { 6566 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversio nMode::NotNullable, exceptionState);
6427 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve rsionMode::NotNullable, exceptionState); 6567 if (exceptionState.hadException())
6428 if (exceptionState.hadException()) 6568 return;
6429 return; 6569
6430 }
6431 impl->voidMethodDoubleOrDOMStringArg(arg); 6570 impl->voidMethodDoubleOrDOMStringArg(arg);
6432 } 6571 }
6433 6572
6434 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 6573 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6435 { 6574 {
6436 TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethod(info); 6575 TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethod(info);
6437 } 6576 }
6438 6577
6439 static void voidMethodDoubleOrDOMStringOrNullArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 6578 static void voidMethodDoubleOrDOMStringOrNullArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
6440 { 6579 {
6441 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleOrDOMStringOrNullArg", "TestObject", info.Holder(), info.GetIsolate()); 6580 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDoubleOrDOMStringOrNullArg");
6581
6582 TestObject* impl = V8TestObject::toImpl(info.Holder());
6583
6442 if (UNLIKELY(info.Length() < 1)) { 6584 if (UNLIKELY(info.Length() < 1)) {
6443 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6585 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6444 return; 6586 return;
6445 } 6587 }
6446 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6588
6447 DoubleOrString arg; 6589 DoubleOrString arg;
6448 { 6590 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversio nMode::Nullable, exceptionState);
6449 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve rsionMode::Nullable, exceptionState); 6591 if (exceptionState.hadException())
6450 if (exceptionState.hadException()) 6592 return;
6451 return; 6593
6452 }
6453 impl->voidMethodDoubleOrDOMStringOrNullArg(arg); 6594 impl->voidMethodDoubleOrDOMStringOrNullArg(arg);
6454 } 6595 }
6455 6596
6456 static void voidMethodDoubleOrDOMStringOrNullArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 6597 static void voidMethodDoubleOrDOMStringOrNullArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
6457 { 6598 {
6458 TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethod(info); 6599 TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethod(info);
6459 } 6600 }
6460 6601
6461 static void voidMethodDoubleOrNullOrDOMStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 6602 static void voidMethodDoubleOrNullOrDOMStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
6462 { 6603 {
6463 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleOrNullOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); 6604 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDoubleOrNullOrDOMStringArg");
6605
6606 TestObject* impl = V8TestObject::toImpl(info.Holder());
6607
6464 if (UNLIKELY(info.Length() < 1)) { 6608 if (UNLIKELY(info.Length() < 1)) {
6465 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6609 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6466 return; 6610 return;
6467 } 6611 }
6468 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6612
6469 DoubleOrString arg; 6613 DoubleOrString arg;
6470 { 6614 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeCon versionMode::Nullable, exceptionState);
6471 V8DoubleOrNullOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTyp eConversionMode::Nullable, exceptionState); 6615 if (exceptionState.hadException())
6472 if (exceptionState.hadException()) 6616 return;
6473 return; 6617
6474 }
6475 impl->voidMethodDoubleOrNullOrDOMStringArg(arg); 6618 impl->voidMethodDoubleOrNullOrDOMStringArg(arg);
6476 } 6619 }
6477 6620
6478 static void voidMethodDoubleOrNullOrDOMStringArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 6621 static void voidMethodDoubleOrNullOrDOMStringArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
6479 { 6622 {
6480 TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethod(info); 6623 TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethod(info);
6481 } 6624 }
6482 6625
6483 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 6626 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
6484 { 6627 {
6485 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD OMStringOrArrayBufferOrArrayBufferViewArg", "TestObject", info.Holder(), info.Ge tIsolate()); 6628 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg");
6629
6630 TestObject* impl = V8TestObject::toImpl(info.Holder());
6631
6486 if (UNLIKELY(info.Length() < 1)) { 6632 if (UNLIKELY(info.Length() < 1)) {
6487 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6633 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6488 return; 6634 return;
6489 } 6635 }
6490 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6636
6491 StringOrArrayBufferOrArrayBufferView arg; 6637 StringOrArrayBufferOrArrayBufferView arg;
6492 { 6638 V8StringOrArrayBufferOrArrayBufferView::toImpl(info.GetIsolate(), info[0], a rg, UnionTypeConversionMode::NotNullable, exceptionState);
6493 V8StringOrArrayBufferOrArrayBufferView::toImpl(info.GetIsolate(), info[0 ], arg, UnionTypeConversionMode::NotNullable, exceptionState); 6639 if (exceptionState.hadException())
6494 if (exceptionState.hadException()) 6640 return;
6495 return; 6641
6496 }
6497 impl->voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg(arg); 6642 impl->voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg(arg);
6498 } 6643 }
6499 6644
6500 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 6645 static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
6501 { 6646 {
6502 TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMe thod(info); 6647 TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMe thod(info);
6503 } 6648 }
6504 6649
6505 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info) 6650 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info)
6506 { 6651 {
6507 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayBufferOrArrayBufferViewOrDictionaryArg", "TestObject", info.Holder(), info.G etIsolate()); 6652 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg");
6653
6654 TestObject* impl = V8TestObject::toImpl(info.Holder());
6655
6508 if (UNLIKELY(info.Length() < 1)) { 6656 if (UNLIKELY(info.Length() < 1)) {
6509 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6657 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6510 return; 6658 return;
6511 } 6659 }
6512 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6660
6513 ArrayBufferOrArrayBufferViewOrDictionary arg; 6661 ArrayBufferOrArrayBufferViewOrDictionary arg;
6514 { 6662 V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(info.GetIsolate(), info[0 ], arg, UnionTypeConversionMode::NotNullable, exceptionState);
6515 V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(info.GetIsolate(), in fo[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); 6663 if (exceptionState.hadException())
6516 if (exceptionState.hadException()) 6664 return;
6517 return; 6665
6518 }
6519 impl->voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg(arg); 6666 impl->voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg(arg);
6520 } 6667 }
6521 6668
6522 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 6669 static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
6523 { 6670 {
6524 TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgM ethod(info); 6671 TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgM ethod(info);
6525 } 6672 }
6526 6673
6527 static void voidMethodArrayOfDoubleOrDOMStringArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 6674 static void voidMethodArrayOfDoubleOrDOMStringArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
6528 { 6675 {
6529 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayOfDoubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); 6676 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodArrayOfDoubleOrDOMStringArg");
6677
6530 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6678 TestObject* impl = V8TestObject::toImpl(info.Holder());
6679
6531 HeapVector<DoubleOrString> arg; 6680 HeapVector<DoubleOrString> arg;
6532 { 6681 arg = toImplArguments<HeapVector<DoubleOrString>>(info, 0, exceptionState);
6533 arg = toImplArguments<HeapVector<DoubleOrString>>(info, 0, exceptionStat e); 6682 if (exceptionState.hadException())
6534 if (exceptionState.hadException()) 6683 return;
6535 return; 6684
6536 }
6537 impl->voidMethodArrayOfDoubleOrDOMStringArg(arg); 6685 impl->voidMethodArrayOfDoubleOrDOMStringArg(arg);
6538 } 6686 }
6539 6687
6540 static void voidMethodArrayOfDoubleOrDOMStringArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 6688 static void voidMethodArrayOfDoubleOrDOMStringArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
6541 { 6689 {
6542 TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethod(info); 6690 TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethod(info);
6543 } 6691 }
6544 6692
6545 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 6693 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
6546 { 6694 {
6695 TestObject* impl = V8TestObject::toImpl(info.Holder());
6696
6547 if (UNLIKELY(info.Length() < 1)) { 6697 if (UNLIKELY(info.Length() < 1)) {
6548 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodT estInterfaceEmptyOrNullArg", "TestObject", ExceptionMessages::notEnoughArguments (1, info.Length())))); 6698 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestInterfaceEmptyOrNullArg", "TestObject", ExceptionM essages::notEnoughArguments(1, info.Length())));
6549 return; 6699 return;
6550 } 6700 }
6551 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6701
6552 TestInterfaceEmpty* nullableTestInterfaceEmptyArg; 6702 TestInterfaceEmpty* nullableTestInterfaceEmptyArg;
6553 { 6703 nullableTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(in fo.GetIsolate(), info[0]);
6554 nullableTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[0]); 6704 if (!nullableTestInterfaceEmptyArg && !isUndefinedOrNull(info[0])) {
6555 if (!nullableTestInterfaceEmptyArg && !isUndefinedOrNull(info[0])) { 6705 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestInterfaceEmptyOrNullArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."));
6556 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestInterfaceEmptyOrNullArg", "TestObject", "param eter 1 is not of type 'TestInterfaceEmpty'.")); 6706
6557 return; 6707 return;
6558 }
6559 } 6708 }
6709
6560 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg); 6710 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg);
6561 } 6711 }
6562 6712
6563 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 6713 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
6564 { 6714 {
6565 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info); 6715 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info);
6566 } 6716 }
6567 6717
6568 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 6718 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6569 { 6719 {
6720 TestObject* impl = V8TestObject::toImpl(info.Holder());
6721
6570 if (UNLIKELY(info.Length() < 1)) { 6722 if (UNLIKELY(info.Length() < 1)) {
6571 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodT estCallbackInterfaceArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())))); 6723 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", ExceptionMess ages::notEnoughArguments(1, info.Length())));
6572 return; 6724 return;
6573 } 6725 }
6574 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6726
6575 TestCallbackInterface* testCallbackInterfaceArg; 6727 TestCallbackInterface* testCallbackInterfaceArg;
6576 { 6728 if (info.Length() <= 0 || !info[0]->IsFunction()) {
6577 if (info.Length() <= 0 || !info[0]->IsFunction()) { 6729 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."));
6578 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The call back provided as parameter 1 is not a function.")); 6730
6579 return; 6731 return;
6580 }
6581 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8: :Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
6582 } 6732 }
6733 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Fun ction>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
6734
6583 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg); 6735 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg);
6584 } 6736 }
6585 6737
6586 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 6738 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6587 { 6739 {
6588 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); 6740 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info);
6589 } 6741 }
6590 6742
6591 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC allbackInfo<v8::Value>& info) 6743 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
6592 { 6744 {
6593 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6745 TestObject* impl = V8TestObject::toImpl(info.Holder());
6746
6594 TestCallbackInterface* optionalTestCallbackInterfaceArg; 6747 TestCallbackInterface* optionalTestCallbackInterfaceArg;
6595 { 6748 if (!isUndefinedOrNull(info[0])) {
6596 if (!isUndefinedOrNull(info[0])) { 6749 if (!info[0]->IsFunction()) {
6597 if (!info[0]->IsFunction()) { 6750 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", " The callback provided as parameter 1 is not a function."));
6598 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMes sages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject ", "The callback provided as parameter 1 is not a function.")); 6751
6599 return; 6752 return;
6600 }
6601 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v 8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
6602 } else {
6603 optionalTestCallbackInterfaceArg = nullptr;
6604 } 6753 }
6754 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::L ocal<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
6755 } else {
6756 optionalTestCallbackInterfaceArg = nullptr;
6605 } 6757 }
6758
6606 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa ceArg); 6759 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa ceArg);
6607 } 6760 }
6608 6761
6609 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 6762 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
6610 { 6763 {
6611 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info) ; 6764 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info) ;
6612 } 6765 }
6613 6766
6614 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 6767 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
6615 { 6768 {
6769 TestObject* impl = V8TestObject::toImpl(info.Holder());
6770
6616 if (UNLIKELY(info.Length() < 1)) { 6771 if (UNLIKELY(info.Length() < 1)) {
6617 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodT estCallbackInterfaceOrNullArg", "TestObject", ExceptionMessages::notEnoughArgume nts(1, info.Length())))); 6772 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", Excepti onMessages::notEnoughArguments(1, info.Length())));
6618 return; 6773 return;
6619 } 6774 }
6620 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6775
6621 TestCallbackInterface* testCallbackInterfaceArg; 6776 TestCallbackInterface* testCallbackInterfaceArg;
6622 { 6777 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
6623 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { 6778 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The ca llback provided as parameter 1 is not a function."));
6624 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "Th e callback provided as parameter 1 is not a function.")); 6779
6625 return; 6780 return;
6626 }
6627 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI nterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(in fo.GetIsolate()));
6628 } 6781 }
6782 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInter face::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.G etIsolate()));
6783
6629 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg); 6784 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg);
6630 } 6785 }
6631 6786
6632 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 6787 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
6633 { 6788 {
6634 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); 6789 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info);
6635 } 6790 }
6636 6791
6637 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info ) 6792 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
6638 { 6793 {
6639 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6794 TestObject* impl = V8TestObject::toImpl(info.Holder());
6795
6640 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate()); 6796 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate());
6641 } 6797 }
6642 6798
6643 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 6799 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
6644 { 6800 {
6645 TestObjectV8Internal::testEnumMethodMethod(info); 6801 TestObjectV8Internal::testEnumMethodMethod(info);
6646 } 6802 }
6647 6803
6648 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 6804 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
6649 { 6805 {
6650 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estEnumArg", "TestObject", info.Holder(), info.GetIsolate()); 6806 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodTestEnumArg");
6807
6808 TestObject* impl = V8TestObject::toImpl(info.Holder());
6809
6651 if (UNLIKELY(info.Length() < 1)) { 6810 if (UNLIKELY(info.Length() < 1)) {
6652 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 6811 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6653 return; 6812 return;
6654 } 6813 }
6655 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6814
6656 V8StringResource<> testEnumTypeArg; 6815 V8StringResource<> testEnumTypeArg;
6657 { 6816 testEnumTypeArg = info[0];
6658 testEnumTypeArg = info[0]; 6817 if (!testEnumTypeArg.prepare())
6659 if (!testEnumTypeArg.prepare()) 6818 return;
6660 return; 6819 const char* validValues[] = {
6661 const char* validValues[] = { 6820 "",
6662 "", 6821 "EnumValue1",
6663 "EnumValue1", 6822 "EnumValue2",
6664 "EnumValue2", 6823 "EnumValue3",
6665 "EnumValue3", 6824 };
6666 }; 6825 if (!isValidEnum(testEnumTypeArg, validValues, WTF_ARRAY_LENGTH(validValues) , "TestEnum", exceptionState)) {
6667 if (!isValidEnum(testEnumTypeArg, validValues, WTF_ARRAY_LENGTH(validVal ues), "TestEnum", exceptionState)) { 6826 return;
6668 return;
6669 }
6670 } 6827 }
6828
6671 impl->voidMethodTestEnumArg(testEnumTypeArg); 6829 impl->voidMethodTestEnumArg(testEnumTypeArg);
6672 } 6830 }
6673 6831
6674 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 6832 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
6675 { 6833 {
6676 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); 6834 TestObjectV8Internal::voidMethodTestEnumArgMethod(info);
6677 } 6835 }
6678 6836
6679 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 6837 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
6680 { 6838 {
6681 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6839 TestObject* impl = V8TestObject::toImpl(info.Holder());
6840
6682 v8SetReturnValue(info, impl->dictionaryMethod()); 6841 v8SetReturnValue(info, impl->dictionaryMethod());
6683 } 6842 }
6684 6843
6685 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 6844 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
6686 { 6845 {
6687 TestObjectV8Internal::dictionaryMethodMethod(info); 6846 TestObjectV8Internal::dictionaryMethodMethod(info);
6688 } 6847 }
6689 6848
6690 static void testDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 6849 static void testDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
6691 { 6850 {
6692 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6851 TestObject* impl = V8TestObject::toImpl(info.Holder());
6852
6693 TestDictionary result; 6853 TestDictionary result;
6694 impl->testDictionaryMethod(result); 6854 impl->testDictionaryMethod(result);
6695 v8SetReturnValue(info, result); 6855 v8SetReturnValue(info, result);
6696 } 6856 }
6697 6857
6698 static void testDictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6858 static void testDictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6699 { 6859 {
6700 TestObjectV8Internal::testDictionaryMethodMethod(info); 6860 TestObjectV8Internal::testDictionaryMethodMethod(info);
6701 } 6861 }
6702 6862
6703 static void nullableTestDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6863 static void nullableTestDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6704 { 6864 {
6705 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6865 TestObject* impl = V8TestObject::toImpl(info.Holder());
6866
6706 Nullable<TestDictionary> result; 6867 Nullable<TestDictionary> result;
6707 impl->nullableTestDictionaryMethod(result); 6868 impl->nullableTestDictionaryMethod(result);
6708 if (result.isNull()) 6869 if (result.isNull())
6709 v8SetReturnValueNull(info); 6870 v8SetReturnValueNull(info);
6710 else 6871 else
6711 v8SetReturnValue(info, result.get()); 6872 v8SetReturnValue(info, result.get());
6712 } 6873 }
6713 6874
6714 static void nullableTestDictionaryMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 6875 static void nullableTestDictionaryMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
6715 { 6876 {
6716 TestObjectV8Internal::nullableTestDictionaryMethodMethod(info); 6877 TestObjectV8Internal::nullableTestDictionaryMethodMethod(info);
6717 } 6878 }
6718 6879
6719 static void passPermissiveDictionaryMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 6880 static void passPermissiveDictionaryMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
6720 { 6881 {
6721 ExceptionState exceptionState(ExceptionState::ExecutionContext, "passPermiss iveDictionaryMethod", "TestObject", info.Holder(), info.GetIsolate()); 6882 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "passPermissiveDictionaryMethod");
6883
6722 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6884 TestObject* impl = V8TestObject::toImpl(info.Holder());
6885
6723 TestDictionary arg; 6886 TestDictionary arg;
6724 { 6887 V8TestDictionary::toImpl(info.GetIsolate(), info[0], arg, exceptionState);
6725 V8TestDictionary::toImpl(info.GetIsolate(), info[0], arg, exceptionState ); 6888 if (exceptionState.hadException())
6726 if (exceptionState.hadException()) 6889 return;
6727 return; 6890
6728 }
6729 impl->passPermissiveDictionaryMethod(arg); 6891 impl->passPermissiveDictionaryMethod(arg);
6730 } 6892 }
6731 6893
6732 static void passPermissiveDictionaryMethodMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 6894 static void passPermissiveDictionaryMethodMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6733 { 6895 {
6734 TestObjectV8Internal::passPermissiveDictionaryMethodMethod(info); 6896 TestObjectV8Internal::passPermissiveDictionaryMethodMethod(info);
6735 } 6897 }
6736 6898
6737 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 6899 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
6738 { 6900 {
6739 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6901 TestObject* impl = V8TestObject::toImpl(info.Holder());
6902
6740 v8SetReturnValue(info, impl->nodeFilterMethod()); 6903 v8SetReturnValue(info, impl->nodeFilterMethod());
6741 } 6904 }
6742 6905
6743 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 6906 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
6744 { 6907 {
6745 TestObjectV8Internal::nodeFilterMethodMethod(info); 6908 TestObjectV8Internal::nodeFilterMethodMethod(info);
6746 } 6909 }
6747 6910
6748 static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value> & info, ExceptionState& exceptionState) 6911 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6749 { 6912 {
6913 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "promiseMethod");
6914 ScriptState* scriptState = ScriptState::forReceiverObject(info);
6915 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio nState);
6916
6917 TestObject* impl = V8TestObject::toImpl(info.Holder());
6918
6750 if (UNLIKELY(info.Length() < 3)) { 6919 if (UNLIKELY(info.Length() < 3)) {
6751 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length())); 6920 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(3, i nfo.Length()));
6752 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G etIsolate())).v8Value());
6753 return; 6921 return;
6754 } 6922 }
6755 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6923
6756 int arg1; 6924 int arg1;
6757 Dictionary arg2; 6925 Dictionary arg2;
6758 V8StringResource<> arg3; 6926 V8StringResource<> arg3;
6759 Vector<String> variadic; 6927 Vector<String> variadic;
6760 { 6928 arg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState) ;
6761 arg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSt ate); 6929 if (exceptionState.hadException())
6762 if (exceptionState.hadException()) 6930 return;
6763 return; 6931
6764 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { 6932 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) {
6765 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object ."); 6933 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object.");
6766 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in fo.GetIsolate())).v8Value()); 6934
6767 return; 6935 return;
6768 }
6769 arg2 = Dictionary(info[1], info.GetIsolate(), exceptionState);
6770 if (exceptionState.hadException())
6771 return;
6772 arg3 = info[2];
6773 if (!arg3.prepare(exceptionState))
6774 return;
6775 variadic = toImplArguments<Vector<String>>(info, 3, exceptionState);
6776 if (exceptionState.hadException())
6777 return;
6778 } 6936 }
6937 arg2 = Dictionary(info[1], info.GetIsolate(), exceptionState);
6938 if (exceptionState.hadException())
6939 return;
6940
6941 arg3 = info[2];
6942 if (!arg3.prepare(exceptionState))
6943 return;
6944
6945 variadic = toImplArguments<Vector<String>>(info, 3, exceptionState);
6946 if (exceptionState.hadException())
6947 return;
6948
6779 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val ue()); 6949 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val ue());
6780 } 6950 }
6781 6951
6782 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6783 {
6784 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth od", "TestObject", info.Holder(), info.GetIsolate());
6785 promiseMethodMethodPromise(info, exceptionState);
6786 if (exceptionState.hadException())
6787 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G etIsolate())).v8Value());
6788 }
6789
6790 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info) 6952 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
6791 { 6953 {
6792 TestObjectV8Internal::promiseMethodMethod(info); 6954 TestObjectV8Internal::promiseMethodMethod(info);
6793 } 6955 }
6794 6956
6795 static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCa llbackInfo<v8::Value>& info, ExceptionState& exceptionState)
6796 {
6797 if (UNLIKELY(info.Length() < 1)) {
6798 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6799 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G etIsolate())).v8Value());
6800 return;
6801 }
6802 TestObject* impl = V8TestObject::toImpl(info.Holder());
6803 Dictionary arg1;
6804 {
6805 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
6806 exceptionState.throwTypeError("parameter 1 ('arg1') is not an object .");
6807 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in fo.GetIsolate())).v8Value());
6808 return;
6809 }
6810 arg1 = Dictionary(info[0], info.GetIsolate(), exceptionState);
6811 if (exceptionState.hadException())
6812 return;
6813 }
6814 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu e());
6815 }
6816
6817 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 6957 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6818 { 6958 {
6819 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth odWithoutExceptionState", "TestObject", info.Holder(), info.GetIsolate()); 6959 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "promiseMethodWithoutExceptionState");
6820 promiseMethodWithoutExceptionStateMethodPromise(info, exceptionState); 6960 ScriptState* scriptState = ScriptState::forReceiverObject(info);
6961 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio nState);
6962
6963 TestObject* impl = V8TestObject::toImpl(info.Holder());
6964
6965 if (UNLIKELY(info.Length() < 1)) {
6966 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6967 return;
6968 }
6969
6970 Dictionary arg1;
6971 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
6972 exceptionState.throwTypeError("parameter 1 ('arg1') is not an object.");
6973
6974 return;
6975 }
6976 arg1 = Dictionary(info[0], info.GetIsolate(), exceptionState);
6821 if (exceptionState.hadException()) 6977 if (exceptionState.hadException())
6822 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G etIsolate())).v8Value()); 6978 return;
6979
6980 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu e());
6823 } 6981 }
6824 6982
6825 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 6983 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6826 { 6984 {
6827 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); 6985 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info);
6828 } 6986 }
6829 6987
6830 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 6988 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
6831 { 6989 {
6832 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6990 TestObject* impl = V8TestObject::toImpl(info.Holder());
6991
6833 v8SetReturnValue(info, v8Deserialize(info.GetIsolate(), impl->serializedScri ptValueMethod())); 6992 v8SetReturnValue(info, v8Deserialize(info.GetIsolate(), impl->serializedScri ptValueMethod()));
6834 } 6993 }
6835 6994
6836 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 6995 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
6837 { 6996 {
6838 TestObjectV8Internal::serializedScriptValueMethodMethod(info); 6997 TestObjectV8Internal::serializedScriptValueMethodMethod(info);
6839 } 6998 }
6840 6999
6841 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 7000 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
6842 { 7001 {
6843 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7002 TestObject* impl = V8TestObject::toImpl(info.Holder());
7003
6844 v8SetReturnValue(info, impl->xPathNSResolverMethod()); 7004 v8SetReturnValue(info, impl->xPathNSResolverMethod());
6845 } 7005 }
6846 7006
6847 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 7007 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
6848 { 7008 {
6849 TestObjectV8Internal::xPathNSResolverMethodMethod(info); 7009 TestObjectV8Internal::xPathNSResolverMethodMethod(info);
6850 } 7010 }
6851 7011
6852 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 7012 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6853 { 7013 {
6854 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD ictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); 7014 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDictionaryArg");
7015
7016 TestObject* impl = V8TestObject::toImpl(info.Holder());
7017
6855 if (UNLIKELY(info.Length() < 1)) { 7018 if (UNLIKELY(info.Length() < 1)) {
6856 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7019 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6857 return; 7020 return;
6858 } 7021 }
6859 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7022
6860 Dictionary dictionaryArg; 7023 Dictionary dictionaryArg;
6861 { 7024 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
6862 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 7025 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not an o bject.");
6863 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not an object."); 7026
6864 return; 7027 return;
6865 }
6866 dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState);
6867 if (exceptionState.hadException())
6868 return;
6869 } 7028 }
7029 dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState);
7030 if (exceptionState.hadException())
7031 return;
7032
6870 impl->voidMethodDictionaryArg(dictionaryArg); 7033 impl->voidMethodDictionaryArg(dictionaryArg);
6871 } 7034 }
6872 7035
6873 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 7036 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
6874 { 7037 {
6875 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); 7038 TestObjectV8Internal::voidMethodDictionaryArgMethod(info);
6876 } 7039 }
6877 7040
6878 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 7041 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6879 { 7042 {
7043 TestObject* impl = V8TestObject::toImpl(info.Holder());
7044
6880 if (UNLIKELY(info.Length() < 1)) { 7045 if (UNLIKELY(info.Length() < 1)) {
6881 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodN odeFilterArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Lengt h())))); 7046 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodNodeFilterArg", "TestObject", ExceptionMessages::notEn oughArguments(1, info.Length())));
6882 return; 7047 return;
6883 } 7048 }
6884 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7049
6885 NodeFilter* nodeFilterArg; 7050 NodeFilter* nodeFilterArg;
6886 { 7051 nodeFilterArg = toNodeFilter(info[0], info.Holder(), ScriptState::current(in fo.GetIsolate()));
6887 nodeFilterArg = toNodeFilter(info[0], info.Holder(), ScriptState::curren t(info.GetIsolate())); 7052
6888 }
6889 impl->voidMethodNodeFilterArg(nodeFilterArg); 7053 impl->voidMethodNodeFilterArg(nodeFilterArg);
6890 } 7054 }
6891 7055
6892 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 7056 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
6893 { 7057 {
6894 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); 7058 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info);
6895 } 7059 }
6896 7060
6897 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 7061 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
6898 { 7062 {
7063 TestObject* impl = V8TestObject::toImpl(info.Holder());
7064
6899 if (UNLIKELY(info.Length() < 1)) { 7065 if (UNLIKELY(info.Length() < 1)) {
6900 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodP romiseArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length() )))); 7066 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodPromiseArg", "TestObject", ExceptionMessages::notEnoug hArguments(1, info.Length())));
6901 return; 7067 return;
6902 } 7068 }
6903 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7069
6904 ScriptPromise promiseArg; 7070 ScriptPromise promiseArg;
6905 { 7071 promiseArg = ScriptPromise::cast(ScriptState::current(info.GetIsolate()), in fo[0]);
6906 promiseArg = ScriptPromise::cast(ScriptState::current(info.GetIsolate()) , info[0]); 7072 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) {
6907 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { 7073 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an object."));
6908 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseA rg') is not an object.")); 7074
6909 return; 7075 return;
6910 }
6911 } 7076 }
7077
6912 impl->voidMethodPromiseArg(promiseArg); 7078 impl->voidMethodPromiseArg(promiseArg);
6913 } 7079 }
6914 7080
6915 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 7081 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6916 { 7082 {
6917 TestObjectV8Internal::voidMethodPromiseArgMethod(info); 7083 TestObjectV8Internal::voidMethodPromiseArgMethod(info);
6918 } 7084 }
6919 7085
6920 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 7086 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6921 { 7087 {
6922 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS erializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); 7088 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodSerializedScriptValueArg");
7089
7090 TestObject* impl = V8TestObject::toImpl(info.Holder());
7091
6923 if (UNLIKELY(info.Length() < 1)) { 7092 if (UNLIKELY(info.Length() < 1)) {
6924 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7093 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6925 return; 7094 return;
6926 } 7095 }
6927 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7096
6928 RefPtr<SerializedScriptValue> serializedScriptValueArg; 7097 RefPtr<SerializedScriptValue> serializedScriptValueArg;
6929 { 7098 serializedScriptValueArg = SerializedScriptValue::serialize(info.GetIsolate( ), info[0], nullptr, nullptr, exceptionState);
6930 serializedScriptValueArg = SerializedScriptValue::serialize(info.GetIsol ate(), info[0], nullptr, nullptr, exceptionState); 7099 if (exceptionState.hadException())
6931 if (exceptionState.hadException()) 7100 return;
6932 return; 7101
6933 }
6934 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); 7102 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
6935 } 7103 }
6936 7104
6937 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 7105 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6938 { 7106 {
6939 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); 7107 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info);
6940 } 7108 }
6941 7109
6942 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 7110 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6943 { 7111 {
7112 TestObject* impl = V8TestObject::toImpl(info.Holder());
7113
6944 if (UNLIKELY(info.Length() < 1)) { 7114 if (UNLIKELY(info.Length() < 1)) {
6945 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodX PathNSResolverArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info. Length())))); 7115 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodXPathNSResolverArg", "TestObject", ExceptionMessages:: notEnoughArguments(1, info.Length())));
6946 return; 7116 return;
6947 } 7117 }
6948 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7118
6949 XPathNSResolver* xPathNSResolverArg; 7119 XPathNSResolver* xPathNSResolverArg;
6950 { 7120 xPathNSResolverArg = toXPathNSResolver(ScriptState::current(info.GetIsolate( )), info[0]);
6951 xPathNSResolverArg = toXPathNSResolver(ScriptState::current(info.GetIsol ate()), info[0]); 7121 if (!xPathNSResolverArg) {
6952 if (!xPathNSResolverArg) { 7122 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodXPathNSResolverArg", "TestObject", "parameter 1 is not of type 'XPathNSResolver'."));
6953 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodXPathNSResolverArg", "TestObject", "parameter 1 is not of type 'XPathNSResolver'.")); 7123
6954 return; 7124 return;
6955 }
6956 } 7125 }
7126
6957 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg); 7127 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg);
6958 } 7128 }
6959 7129
6960 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 7130 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
6961 { 7131 {
6962 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); 7132 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info);
6963 } 7133 }
6964 7134
6965 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 7135 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
6966 { 7136 {
6967 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD ictionarySequenceArg", "TestObject", info.Holder(), info.GetIsolate()); 7137 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDictionarySequenceArg");
7138
7139 TestObject* impl = V8TestObject::toImpl(info.Holder());
7140
6968 if (UNLIKELY(info.Length() < 1)) { 7141 if (UNLIKELY(info.Length() < 1)) {
6969 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7142 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6970 return; 7143 return;
6971 } 7144 }
6972 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7145
6973 Vector<Dictionary> dictionarySequenceArg; 7146 Vector<Dictionary> dictionarySequenceArg;
6974 { 7147 dictionarySequenceArg = toImplArray<Vector<Dictionary>>(info[0], 1, info.Get Isolate(), exceptionState);
6975 dictionarySequenceArg = toImplArray<Vector<Dictionary>>(info[0], 1, info .GetIsolate(), exceptionState); 7148 if (exceptionState.hadException())
6976 if (exceptionState.hadException()) 7149 return;
6977 return; 7150
6978 }
6979 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); 7151 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg);
6980 } 7152 }
6981 7153
6982 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 7154 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
6983 { 7155 {
6984 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); 7156 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info);
6985 } 7157 }
6986 7158
6987 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 7159 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
6988 { 7160 {
6989 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS tringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); 7161 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodStringArgLongArg");
7162
7163 TestObject* impl = V8TestObject::toImpl(info.Holder());
7164
6990 if (UNLIKELY(info.Length() < 2)) { 7165 if (UNLIKELY(info.Length() < 2)) {
6991 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 7166 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
6992 return; 7167 return;
6993 } 7168 }
6994 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7169
6995 V8StringResource<> stringArg; 7170 V8StringResource<> stringArg;
6996 int longArg; 7171 int longArg;
6997 { 7172 stringArg = info[0];
6998 stringArg = info[0]; 7173 if (!stringArg.prepare())
6999 if (!stringArg.prepare()) 7174 return;
7000 return; 7175
7001 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio nState); 7176 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionSta te);
7002 if (exceptionState.hadException()) 7177 if (exceptionState.hadException())
7003 return; 7178 return;
7004 } 7179
7005 impl->voidMethodStringArgLongArg(stringArg, longArg); 7180 impl->voidMethodStringArgLongArg(stringArg, longArg);
7006 } 7181 }
7007 7182
7008 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 7183 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
7009 { 7184 {
7010 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); 7185 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info);
7011 } 7186 }
7012 7187
7013 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 7188 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
7014 { 7189 {
7015 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7190 TestObject* impl = V8TestObject::toImpl(info.Holder());
7191
7016 V8StringResource<> optionalStringArg; 7192 V8StringResource<> optionalStringArg;
7017 { 7193 int numArgsPassed = info.Length();
7018 int numArgsPassed = info.Length(); 7194 while (numArgsPassed > 0) {
7019 while (numArgsPassed > 0) { 7195 if (!info[numArgsPassed - 1]->IsUndefined())
7020 if (!info[numArgsPassed - 1]->IsUndefined()) 7196 break;
7021 break; 7197 --numArgsPassed;
7022 --numArgsPassed;
7023 }
7024 if (UNLIKELY(numArgsPassed <= 0)) {
7025 impl->voidMethodOptionalStringArg();
7026 return;
7027 }
7028 optionalStringArg = info[0];
7029 if (!optionalStringArg.prepare())
7030 return;
7031 } 7198 }
7199 if (UNLIKELY(numArgsPassed <= 0)) {
7200 impl->voidMethodOptionalStringArg();
7201 return;
7202 }
7203 optionalStringArg = info[0];
7204 if (!optionalStringArg.prepare())
7205 return;
7206
7032 impl->voidMethodOptionalStringArg(optionalStringArg); 7207 impl->voidMethodOptionalStringArg(optionalStringArg);
7033 } 7208 }
7034 7209
7035 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 7210 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
7036 { 7211 {
7037 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); 7212 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info);
7038 } 7213 }
7039 7214
7040 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 7215 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
7041 { 7216 {
7042 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7217 TestObject* impl = V8TestObject::toImpl(info.Holder());
7218
7043 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; 7219 TestInterfaceEmpty* optionalTestInterfaceEmptyArg;
7044 { 7220 int numArgsPassed = info.Length();
7045 int numArgsPassed = info.Length(); 7221 while (numArgsPassed > 0) {
7046 while (numArgsPassed > 0) { 7222 if (!info[numArgsPassed - 1]->IsUndefined())
7047 if (!info[numArgsPassed - 1]->IsUndefined()) 7223 break;
7048 break; 7224 --numArgsPassed;
7049 --numArgsPassed;
7050 }
7051 if (UNLIKELY(numArgsPassed <= 0)) {
7052 impl->voidMethodOptionalTestInterfaceEmptyArg();
7053 return;
7054 }
7055 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[0]);
7056 if (!optionalTestInterfaceEmptyArg) {
7057 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodOptionalTestInterfaceEmptyArg", "TestObject", "par ameter 1 is not of type 'TestInterfaceEmpty'."));
7058 return;
7059 }
7060 } 7225 }
7226 if (UNLIKELY(numArgsPassed <= 0)) {
7227 impl->voidMethodOptionalTestInterfaceEmptyArg();
7228 return;
7229 }
7230 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(in fo.GetIsolate(), info[0]);
7231 if (!optionalTestInterfaceEmptyArg) {
7232 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodOptionalTestInterfaceEmptyArg", "TestObject", "paramet er 1 is not of type 'TestInterfaceEmpty'."));
7233
7234 return;
7235 }
7236
7061 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg) ; 7237 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg) ;
7062 } 7238 }
7063 7239
7064 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 7240 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
7065 { 7241 {
7066 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); 7242 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info);
7067 } 7243 }
7068 7244
7069 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 7245 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
7070 { 7246 {
7071 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); 7247 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodOptionalLongArg");
7248
7072 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7249 TestObject* impl = V8TestObject::toImpl(info.Holder());
7250
7073 int optionalLongArg; 7251 int optionalLongArg;
7074 { 7252 int numArgsPassed = info.Length();
7075 int numArgsPassed = info.Length(); 7253 while (numArgsPassed > 0) {
7076 while (numArgsPassed > 0) { 7254 if (!info[numArgsPassed - 1]->IsUndefined())
7077 if (!info[numArgsPassed - 1]->IsUndefined()) 7255 break;
7078 break; 7256 --numArgsPassed;
7079 --numArgsPassed;
7080 }
7081 if (UNLIKELY(numArgsPassed <= 0)) {
7082 impl->voidMethodOptionalLongArg();
7083 return;
7084 }
7085 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
7086 if (exceptionState.hadException())
7087 return;
7088 } 7257 }
7258 if (UNLIKELY(numArgsPassed <= 0)) {
7259 impl->voidMethodOptionalLongArg();
7260 return;
7261 }
7262 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exce ptionState);
7263 if (exceptionState.hadException())
7264 return;
7265
7089 impl->voidMethodOptionalLongArg(optionalLongArg); 7266 impl->voidMethodOptionalLongArg(optionalLongArg);
7090 } 7267 }
7091 7268
7092 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 7269 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
7093 { 7270 {
7094 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); 7271 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info);
7095 } 7272 }
7096 7273
7097 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 7274 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
7098 { 7275 {
7099 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); 7276 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "stringMethodOptionalLongArg");
7277
7100 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7278 TestObject* impl = V8TestObject::toImpl(info.Holder());
7279
7101 int optionalLongArg; 7280 int optionalLongArg;
7102 { 7281 int numArgsPassed = info.Length();
7103 int numArgsPassed = info.Length(); 7282 while (numArgsPassed > 0) {
7104 while (numArgsPassed > 0) { 7283 if (!info[numArgsPassed - 1]->IsUndefined())
7105 if (!info[numArgsPassed - 1]->IsUndefined()) 7284 break;
7106 break; 7285 --numArgsPassed;
7107 --numArgsPassed;
7108 }
7109 if (UNLIKELY(numArgsPassed <= 0)) {
7110 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), in fo.GetIsolate());
7111 return;
7112 }
7113 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
7114 if (exceptionState.hadException())
7115 return;
7116 } 7286 }
7287 if (UNLIKELY(numArgsPassed <= 0)) {
7288 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), info.G etIsolate());
7289 return;
7290 }
7291 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exce ptionState);
7292 if (exceptionState.hadException())
7293 return;
7294
7117 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA rg), info.GetIsolate()); 7295 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA rg), info.GetIsolate());
7118 } 7296 }
7119 7297
7120 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 7298 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
7121 { 7299 {
7122 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); 7300 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info);
7123 } 7301 }
7124 7302
7125 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 7303 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
7126 { 7304 {
7127 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); 7305 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "testInterfaceEmptyMethodOptionalLongArg");
7306
7128 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7307 TestObject* impl = V8TestObject::toImpl(info.Holder());
7308
7129 int optionalLongArg; 7309 int optionalLongArg;
7130 { 7310 int numArgsPassed = info.Length();
7131 int numArgsPassed = info.Length(); 7311 while (numArgsPassed > 0) {
7132 while (numArgsPassed > 0) { 7312 if (!info[numArgsPassed - 1]->IsUndefined())
7133 if (!info[numArgsPassed - 1]->IsUndefined()) 7313 break;
7134 break; 7314 --numArgsPassed;
7135 --numArgsPassed;
7136 }
7137 if (UNLIKELY(numArgsPassed <= 0)) {
7138 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg ());
7139 return;
7140 }
7141 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
7142 if (exceptionState.hadException())
7143 return;
7144 } 7315 }
7316 if (UNLIKELY(numArgsPassed <= 0)) {
7317 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg());
7318 return;
7319 }
7320 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exce ptionState);
7321 if (exceptionState.hadException())
7322 return;
7323
7145 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona lLongArg)); 7324 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona lLongArg));
7146 } 7325 }
7147 7326
7148 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 7327 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
7149 { 7328 {
7150 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); 7329 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info);
7151 } 7330 }
7152 7331
7153 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 7332 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
7154 { 7333 {
7155 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); 7334 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "longMethodOptionalLongArg");
7335
7156 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7336 TestObject* impl = V8TestObject::toImpl(info.Holder());
7337
7157 int optionalLongArg; 7338 int optionalLongArg;
7158 { 7339 int numArgsPassed = info.Length();
7159 int numArgsPassed = info.Length(); 7340 while (numArgsPassed > 0) {
7160 while (numArgsPassed > 0) { 7341 if (!info[numArgsPassed - 1]->IsUndefined())
7161 if (!info[numArgsPassed - 1]->IsUndefined()) 7342 break;
7162 break; 7343 --numArgsPassed;
7163 --numArgsPassed;
7164 }
7165 if (UNLIKELY(numArgsPassed <= 0)) {
7166 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg());
7167 return;
7168 }
7169 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
7170 if (exceptionState.hadException())
7171 return;
7172 } 7344 }
7345 if (UNLIKELY(numArgsPassed <= 0)) {
7346 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg());
7347 return;
7348 }
7349 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exce ptionState);
7350 if (exceptionState.hadException())
7351 return;
7352
7173 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); 7353 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg));
7174 } 7354 }
7175 7355
7176 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 7356 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
7177 { 7357 {
7178 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); 7358 TestObjectV8Internal::longMethodOptionalLongArgMethod(info);
7179 } 7359 }
7180 7360
7181 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info) 7361 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
7182 { 7362 {
7183 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); 7363 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodLongArgOptionalLongArg");
7364
7365 TestObject* impl = V8TestObject::toImpl(info.Holder());
7366
7184 if (UNLIKELY(info.Length() < 1)) { 7367 if (UNLIKELY(info.Length() < 1)) {
7185 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7368 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
7186 return; 7369 return;
7187 } 7370 }
7188 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7371
7189 int longArg; 7372 int longArg;
7190 int optionalLongArg; 7373 int optionalLongArg;
7191 { 7374 int numArgsPassed = info.Length();
7192 int numArgsPassed = info.Length(); 7375 while (numArgsPassed > 0) {
7193 while (numArgsPassed > 0) { 7376 if (!info[numArgsPassed - 1]->IsUndefined())
7194 if (!info[numArgsPassed - 1]->IsUndefined()) 7377 break;
7195 break; 7378 --numArgsPassed;
7196 --numArgsPassed;
7197 }
7198 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState);
7199 if (exceptionState.hadException())
7200 return;
7201 if (UNLIKELY(numArgsPassed <= 1)) {
7202 impl->voidMethodLongArgOptionalLongArg(longArg);
7203 return;
7204 }
7205 optionalLongArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState);
7206 if (exceptionState.hadException())
7207 return;
7208 } 7379 }
7380 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
7381 if (exceptionState.hadException())
7382 return;
7383
7384 if (UNLIKELY(numArgsPassed <= 1)) {
7385 impl->voidMethodLongArgOptionalLongArg(longArg);
7386 return;
7387 }
7388 optionalLongArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exce ptionState);
7389 if (exceptionState.hadException())
7390 return;
7391
7209 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); 7392 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg);
7210 } 7393 }
7211 7394
7212 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 7395 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
7213 { 7396 {
7214 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); 7397 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info);
7215 } 7398 }
7216 7399
7217 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 7400 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
7218 { 7401 {
7219 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol ate()); 7402 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodLongArgOptionalLongArgOptionalLongArg");
7403
7404 TestObject* impl = V8TestObject::toImpl(info.Holder());
7405
7220 if (UNLIKELY(info.Length() < 1)) { 7406 if (UNLIKELY(info.Length() < 1)) {
7221 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7407 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
7222 return; 7408 return;
7223 } 7409 }
7224 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7410
7225 int longArg; 7411 int longArg;
7226 int optionalLongArg1; 7412 int optionalLongArg1;
7227 int optionalLongArg2; 7413 int optionalLongArg2;
7228 { 7414 int numArgsPassed = info.Length();
7229 int numArgsPassed = info.Length(); 7415 while (numArgsPassed > 0) {
7230 while (numArgsPassed > 0) { 7416 if (!info[numArgsPassed - 1]->IsUndefined())
7231 if (!info[numArgsPassed - 1]->IsUndefined()) 7417 break;
7232 break; 7418 --numArgsPassed;
7233 --numArgsPassed;
7234 }
7235 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState);
7236 if (exceptionState.hadException())
7237 return;
7238 if (UNLIKELY(numArgsPassed <= 1)) {
7239 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg);
7240 return;
7241 }
7242 optionalLongArg1 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState);
7243 if (exceptionState.hadException())
7244 return;
7245 if (UNLIKELY(numArgsPassed <= 2)) {
7246 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optio nalLongArg1);
7247 return;
7248 }
7249 optionalLongArg2 = toInt32(info.GetIsolate(), info[2], NormalConversion, exceptionState);
7250 if (exceptionState.hadException())
7251 return;
7252 } 7419 }
7420 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
7421 if (exceptionState.hadException())
7422 return;
7423
7424 if (UNLIKELY(numArgsPassed <= 1)) {
7425 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg);
7426 return;
7427 }
7428 optionalLongArg1 = toInt32(info.GetIsolate(), info[1], NormalConversion, exc eptionState);
7429 if (exceptionState.hadException())
7430 return;
7431
7432 if (UNLIKELY(numArgsPassed <= 2)) {
7433 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalL ongArg1);
7434 return;
7435 }
7436 optionalLongArg2 = toInt32(info.GetIsolate(), info[2], NormalConversion, exc eptionState);
7437 if (exceptionState.hadException())
7438 return;
7439
7253 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA rg1, optionalLongArg2); 7440 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA rg1, optionalLongArg2);
7254 } 7441 }
7255 7442
7256 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 7443 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7257 { 7444 {
7258 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod( info); 7445 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod( info);
7259 } 7446 }
7260 7447
7261 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 7448 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
7262 { 7449 {
7263 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola te()); 7450 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodLongArgOptionalTestInterfaceEmptyArg");
7451
7452 TestObject* impl = V8TestObject::toImpl(info.Holder());
7453
7264 if (UNLIKELY(info.Length() < 1)) { 7454 if (UNLIKELY(info.Length() < 1)) {
7265 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7455 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
7266 return; 7456 return;
7267 } 7457 }
7268 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7458
7269 int longArg; 7459 int longArg;
7270 TestInterfaceEmpty* optionalTestInterfaceEmpty; 7460 TestInterfaceEmpty* optionalTestInterfaceEmpty;
7271 { 7461 int numArgsPassed = info.Length();
7272 int numArgsPassed = info.Length(); 7462 while (numArgsPassed > 0) {
7273 while (numArgsPassed > 0) { 7463 if (!info[numArgsPassed - 1]->IsUndefined())
7274 if (!info[numArgsPassed - 1]->IsUndefined()) 7464 break;
7275 break; 7465 --numArgsPassed;
7276 --numArgsPassed;
7277 }
7278 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState);
7279 if (exceptionState.hadException())
7280 return;
7281 if (UNLIKELY(numArgsPassed <= 1)) {
7282 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
7283 return;
7284 }
7285 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(i nfo.GetIsolate(), info[1]);
7286 if (!optionalTestInterfaceEmpty) {
7287 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'.");
7288 return;
7289 }
7290 } 7466 }
7467 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
7468 if (exceptionState.hadException())
7469 return;
7470
7471 if (UNLIKELY(numArgsPassed <= 1)) {
7472 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
7473 return;
7474 }
7475 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(info. GetIsolate(), info[1]);
7476 if (!optionalTestInterfaceEmpty) {
7477 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'.");
7478
7479 return;
7480 }
7481
7291 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn terfaceEmpty); 7482 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn terfaceEmpty);
7292 } 7483 }
7293 7484
7294 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 7485 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
7295 { 7486 {
7296 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i nfo); 7487 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i nfo);
7297 } 7488 }
7298 7489
7299 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 7490 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
7300 { 7491 {
7301 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola te()); 7492 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodTestInterfaceEmptyArgOptionalLongArg");
7493
7494 TestObject* impl = V8TestObject::toImpl(info.Holder());
7495
7302 if (UNLIKELY(info.Length() < 1)) { 7496 if (UNLIKELY(info.Length() < 1)) {
7303 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7497 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
7304 return; 7498 return;
7305 } 7499 }
7306 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7500
7307 TestInterfaceEmpty* optionalTestInterfaceEmpty; 7501 TestInterfaceEmpty* optionalTestInterfaceEmpty;
7308 int longArg; 7502 int longArg;
7309 { 7503 int numArgsPassed = info.Length();
7310 int numArgsPassed = info.Length(); 7504 while (numArgsPassed > 0) {
7311 while (numArgsPassed > 0) { 7505 if (!info[numArgsPassed - 1]->IsUndefined())
7312 if (!info[numArgsPassed - 1]->IsUndefined()) 7506 break;
7313 break; 7507 --numArgsPassed;
7314 --numArgsPassed;
7315 }
7316 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(i nfo.GetIsolate(), info[0]);
7317 if (!optionalTestInterfaceEmpty) {
7318 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceEmpty'.");
7319 return;
7320 }
7321 if (UNLIKELY(numArgsPassed <= 1)) {
7322 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInt erfaceEmpty);
7323 return;
7324 }
7325 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio nState);
7326 if (exceptionState.hadException())
7327 return;
7328 } 7508 }
7509 optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(info. GetIsolate(), info[0]);
7510 if (!optionalTestInterfaceEmpty) {
7511 exceptionState.throwTypeError("parameter 1 is not of type 'TestInterface Empty'.");
7512
7513 return;
7514 }
7515
7516 if (UNLIKELY(numArgsPassed <= 1)) {
7517 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfa ceEmpty);
7518 return;
7519 }
7520 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionSta te);
7521 if (exceptionState.hadException())
7522 return;
7523
7329 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm pty, longArg); 7524 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm pty, longArg);
7330 } 7525 }
7331 7526
7332 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 7527 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
7333 { 7528 {
7334 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i nfo); 7529 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i nfo);
7335 } 7530 }
7336 7531
7337 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 7532 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
7338 { 7533 {
7339 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO ptionalDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); 7534 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodOptionalDictionaryArg");
7535
7340 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7536 TestObject* impl = V8TestObject::toImpl(info.Holder());
7537
7341 Dictionary optionalDictionaryArg; 7538 Dictionary optionalDictionaryArg;
7342 { 7539 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
7343 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 7540 exceptionState.throwTypeError("parameter 1 ('optionalDictionaryArg') is not an object.");
7344 exceptionState.throwTypeError("parameter 1 ('optionalDictionaryArg') is not an object."); 7541
7345 return; 7542 return;
7346 }
7347 optionalDictionaryArg = Dictionary(info[0], info.GetIsolate(), exception State);
7348 if (exceptionState.hadException())
7349 return;
7350 } 7543 }
7544 optionalDictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionStat e);
7545 if (exceptionState.hadException())
7546 return;
7547
7351 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); 7548 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
7352 } 7549 }
7353 7550
7354 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 7551 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
7355 { 7552 {
7356 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); 7553 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info);
7357 } 7554 }
7358 7555
7359 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 7556 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
7360 { 7557 {
7361 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); 7558 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultByteStringArg");
7559
7362 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7560 TestObject* impl = V8TestObject::toImpl(info.Holder());
7561
7363 V8StringResource<> defaultByteStringArg; 7562 V8StringResource<> defaultByteStringArg;
7364 { 7563 if (!info[0]->IsUndefined()) {
7365 if (!info[0]->IsUndefined()) { 7564 defaultByteStringArg = toByteString(info.GetIsolate(), info[0], exceptio nState);
7366 defaultByteStringArg = toByteString(info.GetIsolate(), info[0], exce ptionState); 7565 if (exceptionState.hadException())
7367 if (exceptionState.hadException()) 7566 return;
7368 return; 7567 } else {
7369 } else { 7568 defaultByteStringArg = String("foo");
7370 defaultByteStringArg = String("foo");
7371 }
7372 } 7569 }
7570
7373 impl->voidMethodDefaultByteStringArg(defaultByteStringArg); 7571 impl->voidMethodDefaultByteStringArg(defaultByteStringArg);
7374 } 7572 }
7375 7573
7376 static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 7574 static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
7377 { 7575 {
7378 TestObjectV8Internal::voidMethodDefaultByteStringArgMethod(info); 7576 TestObjectV8Internal::voidMethodDefaultByteStringArgMethod(info);
7379 } 7577 }
7380 7578
7381 static void voidMethodDefaultStringArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 7579 static void voidMethodDefaultStringArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
7382 { 7580 {
7383 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7581 TestObject* impl = V8TestObject::toImpl(info.Holder());
7582
7384 V8StringResource<> defaultStringArg; 7583 V8StringResource<> defaultStringArg;
7385 { 7584 if (!info[0]->IsUndefined()) {
7386 if (!info[0]->IsUndefined()) { 7585 defaultStringArg = info[0];
7387 defaultStringArg = info[0]; 7586 if (!defaultStringArg.prepare())
7388 if (!defaultStringArg.prepare()) 7587 return;
7389 return; 7588 } else {
7390 } else { 7589 defaultStringArg = String("foo");
7391 defaultStringArg = String("foo");
7392 }
7393 } 7590 }
7591
7394 impl->voidMethodDefaultStringArg(defaultStringArg); 7592 impl->voidMethodDefaultStringArg(defaultStringArg);
7395 } 7593 }
7396 7594
7397 static void voidMethodDefaultStringArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 7595 static void voidMethodDefaultStringArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
7398 { 7596 {
7399 TestObjectV8Internal::voidMethodDefaultStringArgMethod(info); 7597 TestObjectV8Internal::voidMethodDefaultStringArgMethod(info);
7400 } 7598 }
7401 7599
7402 static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 7600 static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
7403 { 7601 {
7404 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultIntegerArgs", "TestObject", info.Holder(), info.GetIsolate()); 7602 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultIntegerArgs");
7603
7405 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7604 TestObject* impl = V8TestObject::toImpl(info.Holder());
7605
7406 int defaultLongArg; 7606 int defaultLongArg;
7407 long long defaultLongLongArg; 7607 long long defaultLongLongArg;
7408 unsigned defaultUnsignedArg; 7608 unsigned defaultUnsignedArg;
7409 { 7609 if (!info[0]->IsUndefined()) {
7410 if (!info[0]->IsUndefined()) { 7610 defaultLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, e xceptionState);
7411 defaultLongArg = toInt32(info.GetIsolate(), info[0], NormalConversio n, exceptionState); 7611 if (exceptionState.hadException())
7412 if (exceptionState.hadException()) 7612 return;
7413 return; 7613 } else {
7414 } else { 7614 defaultLongArg = 10;
7415 defaultLongArg = 10;
7416 }
7417 if (!info[1]->IsUndefined()) {
7418 defaultLongLongArg = toInt64(info.GetIsolate(), info[1], NormalConve rsion, exceptionState);
7419 if (exceptionState.hadException())
7420 return;
7421 } else {
7422 defaultLongLongArg = -10;
7423 }
7424 if (!info[2]->IsUndefined()) {
7425 defaultUnsignedArg = toUInt32(info.GetIsolate(), info[2], NormalConv ersion, exceptionState);
7426 if (exceptionState.hadException())
7427 return;
7428 } else {
7429 defaultUnsignedArg = 4294967295u;
7430 }
7431 } 7615 }
7616 if (!info[1]->IsUndefined()) {
7617 defaultLongLongArg = toInt64(info.GetIsolate(), info[1], NormalConversio n, exceptionState);
7618 if (exceptionState.hadException())
7619 return;
7620 } else {
7621 defaultLongLongArg = -10;
7622 }
7623 if (!info[2]->IsUndefined()) {
7624 defaultUnsignedArg = toUInt32(info.GetIsolate(), info[2], NormalConversi on, exceptionState);
7625 if (exceptionState.hadException())
7626 return;
7627 } else {
7628 defaultUnsignedArg = 4294967295u;
7629 }
7630
7432 impl->voidMethodDefaultIntegerArgs(defaultLongArg, defaultLongLongArg, defau ltUnsignedArg); 7631 impl->voidMethodDefaultIntegerArgs(defaultLongArg, defaultLongLongArg, defau ltUnsignedArg);
7433 } 7632 }
7434 7633
7435 static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 7634 static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
7436 { 7635 {
7437 TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info); 7636 TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info);
7438 } 7637 }
7439 7638
7440 static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 7639 static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
7441 { 7640 {
7442 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultDoubleArg", "TestObject", info.Holder(), info.GetIsolate()); 7641 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultDoubleArg");
7642
7443 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7643 TestObject* impl = V8TestObject::toImpl(info.Holder());
7644
7444 double defaultDoubleArg; 7645 double defaultDoubleArg;
7445 { 7646 if (!info[0]->IsUndefined()) {
7446 if (!info[0]->IsUndefined()) { 7647 defaultDoubleArg = toRestrictedDouble(info.GetIsolate(), info[0], except ionState);
7447 defaultDoubleArg = toRestrictedDouble(info.GetIsolate(), info[0], ex ceptionState); 7648 if (exceptionState.hadException())
7448 if (exceptionState.hadException()) 7649 return;
7449 return; 7650 } else {
7450 } else { 7651 defaultDoubleArg = 0.5;
7451 defaultDoubleArg = 0.5;
7452 }
7453 } 7652 }
7653
7454 impl->voidMethodDefaultDoubleArg(defaultDoubleArg); 7654 impl->voidMethodDefaultDoubleArg(defaultDoubleArg);
7455 } 7655 }
7456 7656
7457 static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 7657 static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
7458 { 7658 {
7459 TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info); 7659 TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info);
7460 } 7660 }
7461 7661
7462 static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 7662 static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
7463 { 7663 {
7464 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultTrueBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); 7664 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultTrueBooleanArg");
7665
7465 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7666 TestObject* impl = V8TestObject::toImpl(info.Holder());
7667
7466 bool defaultBooleanArg; 7668 bool defaultBooleanArg;
7467 { 7669 if (!info[0]->IsUndefined()) {
7468 if (!info[0]->IsUndefined()) { 7670 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState );
7469 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionS tate); 7671 if (exceptionState.hadException())
7470 if (exceptionState.hadException()) 7672 return;
7471 return; 7673 } else {
7472 } else { 7674 defaultBooleanArg = true;
7473 defaultBooleanArg = true;
7474 }
7475 } 7675 }
7676
7476 impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg); 7677 impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg);
7477 } 7678 }
7478 7679
7479 static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 7680 static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
7480 { 7681 {
7481 TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info); 7682 TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info);
7482 } 7683 }
7483 7684
7484 static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info) 7685 static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
7485 { 7686 {
7486 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultFalseBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); 7687 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultFalseBooleanArg");
7688
7487 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7689 TestObject* impl = V8TestObject::toImpl(info.Holder());
7690
7488 bool defaultBooleanArg; 7691 bool defaultBooleanArg;
7489 { 7692 if (!info[0]->IsUndefined()) {
7490 if (!info[0]->IsUndefined()) { 7693 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState );
7491 defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionS tate); 7694 if (exceptionState.hadException())
7492 if (exceptionState.hadException()) 7695 return;
7493 return; 7696 } else {
7494 } else { 7697 defaultBooleanArg = false;
7495 defaultBooleanArg = false;
7496 }
7497 } 7698 }
7699
7498 impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg); 7700 impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg);
7499 } 7701 }
7500 7702
7501 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 7703 static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
7502 { 7704 {
7503 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); 7705 TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info);
7504 } 7706 }
7505 7707
7506 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 7708 static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
7507 { 7709 {
7508 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); 7710 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultNullableByteStringArg");
7711
7509 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7712 TestObject* impl = V8TestObject::toImpl(info.Holder());
7713
7510 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg; 7714 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg;
7511 { 7715 if (!info[0]->IsUndefined()) {
7512 if (!info[0]->IsUndefined()) { 7716 defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptionSta te);
7513 defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptio nState); 7717 if (exceptionState.hadException())
7514 if (exceptionState.hadException()) 7718 return;
7515 return; 7719 } else {
7516 } else { 7720 defaultStringArg = nullptr;
7517 defaultStringArg = nullptr;
7518 }
7519 } 7721 }
7722
7520 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); 7723 impl->voidMethodDefaultNullableByteStringArg(defaultStringArg);
7521 } 7724 }
7522 7725
7523 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 7726 static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
7524 { 7727 {
7525 TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info); 7728 TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info);
7526 } 7729 }
7527 7730
7528 static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 7731 static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
7529 { 7732 {
7530 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7733 TestObject* impl = V8TestObject::toImpl(info.Holder());
7734
7531 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg; 7735 V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg;
7532 { 7736 if (!info[0]->IsUndefined()) {
7533 if (!info[0]->IsUndefined()) { 7737 defaultStringArg = info[0];
7534 defaultStringArg = info[0]; 7738 if (!defaultStringArg.prepare())
7535 if (!defaultStringArg.prepare()) 7739 return;
7536 return; 7740 } else {
7537 } else { 7741 defaultStringArg = nullptr;
7538 defaultStringArg = nullptr;
7539 }
7540 } 7742 }
7743
7541 impl->voidMethodDefaultNullableStringArg(defaultStringArg); 7744 impl->voidMethodDefaultNullableStringArg(defaultStringArg);
7542 } 7745 }
7543 7746
7544 static void voidMethodDefaultNullableStringArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 7747 static void voidMethodDefaultNullableStringArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
7545 { 7748 {
7546 TestObjectV8Internal::voidMethodDefaultNullableStringArgMethod(info); 7749 TestObjectV8Internal::voidMethodDefaultNullableStringArgMethod(info);
7547 } 7750 }
7548 7751
7549 static void voidMethodDefaultNullableTestInterfaceArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info) 7752 static void voidMethodDefaultNullableTestInterfaceArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
7550 { 7753 {
7551 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7754 TestObject* impl = V8TestObject::toImpl(info.Holder());
7755
7552 TestInterfaceImplementation* defaultTestInterfaceArg; 7756 TestInterfaceImplementation* defaultTestInterfaceArg;
7553 { 7757 if (!info[0]->IsUndefined()) {
7554 if (!info[0]->IsUndefined()) { 7758 defaultTestInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetI solate(), info[0]);
7555 defaultTestInterfaceArg = V8TestInterface::toImplWithTypeCheck(info. GetIsolate(), info[0]); 7759 if (!defaultTestInterfaceArg && !isUndefinedOrNull(info[0])) {
7556 if (!defaultTestInterfaceArg && !isUndefinedOrNull(info[0])) { 7760 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodDefaultNullableTestInterfaceArg", "TestObject", "p arameter 1 is not of type 'TestInterface'."));
7557 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMes sages::failedToExecute("voidMethodDefaultNullableTestInterfaceArg", "TestObject" , "parameter 1 is not of type 'TestInterface'.")); 7761
7558 return; 7762 return;
7559 }
7560 } else {
7561 defaultTestInterfaceArg = nullptr;
7562 } 7763 }
7764 } else {
7765 defaultTestInterfaceArg = nullptr;
7563 } 7766 }
7767
7564 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); 7768 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg);
7565 } 7769 }
7566 7770
7567 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 7771 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
7568 { 7772 {
7569 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); 7773 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info);
7570 } 7774 }
7571 7775
7572 static void voidMethodDefaultDoubleOrStringArgsMethod(const v8::FunctionCallback Info<v8::Value>& info) 7776 static void voidMethodDefaultDoubleOrStringArgsMethod(const v8::FunctionCallback Info<v8::Value>& info)
7573 { 7777 {
7574 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultDoubleOrStringArgs", "TestObject", info.Holder(), info.GetIsolate()); 7778 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultDoubleOrStringArgs");
7779
7575 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7780 TestObject* impl = V8TestObject::toImpl(info.Holder());
7781
7576 DoubleOrString defaultLongArg; 7782 DoubleOrString defaultLongArg;
7577 DoubleOrString defaultStringArg; 7783 DoubleOrString defaultStringArg;
7578 DoubleOrString defaultNullArg; 7784 DoubleOrString defaultNullArg;
7579 { 7785 if (!info[0]->IsUndefined()) {
7580 if (!info[0]->IsUndefined()) { 7786 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], defaultLongArg, Uni onTypeConversionMode::NotNullable, exceptionState);
7581 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], defaultLongArg, UnionTypeConversionMode::NotNullable, exceptionState); 7787 if (exceptionState.hadException())
7582 if (exceptionState.hadException()) 7788 return;
7583 return; 7789 } else {
7584 } else { 7790 defaultLongArg.setDouble(10);
7585 defaultLongArg.setDouble(10);
7586 }
7587 if (!info[1]->IsUndefined()) {
7588 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), info[1], defaultSt ringArg, UnionTypeConversionMode::Nullable, exceptionState);
7589 if (exceptionState.hadException())
7590 return;
7591 } else {
7592 defaultStringArg.setString(String("foo"));
7593 }
7594 if (!info[2]->IsUndefined()) {
7595 V8DoubleOrString::toImpl(info.GetIsolate(), info[2], defaultNullArg, UnionTypeConversionMode::Nullable, exceptionState);
7596 if (exceptionState.hadException())
7597 return;
7598 } else {
7599 /* null default value */;
7600 }
7601 } 7791 }
7792 if (!info[1]->IsUndefined()) {
7793 V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), info[1], defaultString Arg, UnionTypeConversionMode::Nullable, exceptionState);
7794 if (exceptionState.hadException())
7795 return;
7796 } else {
7797 defaultStringArg.setString(String("foo"));
7798 }
7799 if (!info[2]->IsUndefined()) {
7800 V8DoubleOrString::toImpl(info.GetIsolate(), info[2], defaultNullArg, Uni onTypeConversionMode::Nullable, exceptionState);
7801 if (exceptionState.hadException())
7802 return;
7803 } else {
7804 /* null default value */;
7805 }
7806
7602 impl->voidMethodDefaultDoubleOrStringArgs(defaultLongArg, defaultStringArg, defaultNullArg); 7807 impl->voidMethodDefaultDoubleOrStringArgs(defaultLongArg, defaultStringArg, defaultNullArg);
7603 } 7808 }
7604 7809
7605 static void voidMethodDefaultDoubleOrStringArgsMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 7810 static void voidMethodDefaultDoubleOrStringArgsMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
7606 { 7811 {
7607 TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethod(info); 7812 TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethod(info);
7608 } 7813 }
7609 7814
7610 static void voidMethodDefaultStringSequenceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 7815 static void voidMethodDefaultStringSequenceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
7611 { 7816 {
7612 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultStringSequenceArg", "TestObject", info.Holder(), info.GetIsolate()); 7817 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultStringSequenceArg");
7818
7613 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7819 TestObject* impl = V8TestObject::toImpl(info.Holder());
7820
7614 Vector<String> defaultStringSequenceArg; 7821 Vector<String> defaultStringSequenceArg;
7615 { 7822 if (!info[0]->IsUndefined()) {
7616 if (!info[0]->IsUndefined()) { 7823 defaultStringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info. GetIsolate(), exceptionState);
7617 defaultStringSequenceArg = toImplArray<Vector<String>>(info[0], 1, i nfo.GetIsolate(), exceptionState); 7824 if (exceptionState.hadException())
7618 if (exceptionState.hadException()) 7825 return;
7619 return; 7826 } else {
7620 } else { 7827 /* Nothing to do */;
7621 /* Nothing to do */;
7622 }
7623 } 7828 }
7829
7624 impl->voidMethodDefaultStringSequenceArg(defaultStringSequenceArg); 7830 impl->voidMethodDefaultStringSequenceArg(defaultStringSequenceArg);
7625 } 7831 }
7626 7832
7627 static void voidMethodDefaultStringSequenceArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 7833 static void voidMethodDefaultStringSequenceArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
7628 { 7834 {
7629 TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethod(info); 7835 TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethod(info);
7630 } 7836 }
7631 7837
7632 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 7838 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
7633 { 7839 {
7634 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV ariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); 7840 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodVariadicStringArg");
7841
7635 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7842 TestObject* impl = V8TestObject::toImpl(info.Holder());
7843
7636 Vector<String> variadicStringArgs; 7844 Vector<String> variadicStringArgs;
7637 { 7845 variadicStringArgs = toImplArguments<Vector<String>>(info, 0, exceptionState );
7638 variadicStringArgs = toImplArguments<Vector<String>>(info, 0, exceptionS tate); 7846 if (exceptionState.hadException())
7639 if (exceptionState.hadException()) 7847 return;
7640 return; 7848
7641 }
7642 impl->voidMethodVariadicStringArg(variadicStringArgs); 7849 impl->voidMethodVariadicStringArg(variadicStringArgs);
7643 } 7850 }
7644 7851
7645 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 7852 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
7646 { 7853 {
7647 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); 7854 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info);
7648 } 7855 }
7649 7856
7650 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 7857 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
7651 { 7858 {
7652 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS tringArgVariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); 7859 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodStringArgVariadicStringArg");
7860
7861 TestObject* impl = V8TestObject::toImpl(info.Holder());
7862
7653 if (UNLIKELY(info.Length() < 1)) { 7863 if (UNLIKELY(info.Length() < 1)) {
7654 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7864 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
7655 return; 7865 return;
7656 } 7866 }
7657 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7867
7658 V8StringResource<> stringArg; 7868 V8StringResource<> stringArg;
7659 Vector<String> variadicStringArgs; 7869 Vector<String> variadicStringArgs;
7660 { 7870 stringArg = info[0];
7661 stringArg = info[0]; 7871 if (!stringArg.prepare())
7662 if (!stringArg.prepare()) 7872 return;
7663 return; 7873
7664 variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionS tate); 7874 variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionState );
7665 if (exceptionState.hadException()) 7875 if (exceptionState.hadException())
7666 return; 7876 return;
7667 } 7877
7668 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); 7878 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs);
7669 } 7879 }
7670 7880
7671 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 7881 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
7672 { 7882 {
7673 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); 7883 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info);
7674 } 7884 }
7675 7885
7676 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 7886 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
7677 { 7887 {
7678 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV ariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); 7888 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodVariadicTestInterfaceEmptyArg");
7889
7679 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7890 TestObject* impl = V8TestObject::toImpl(info.Holder());
7891
7680 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; 7892 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs;
7681 { 7893 for (int i = 0; i < info.Length(); ++i) {
7682 for (int i = 0; i < info.Length(); ++i) { 7894 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
7683 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { 7895 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceEmpty'.");
7684 exceptionState.throwTypeError("parameter 1 is not of type 'TestI nterfaceEmpty'."); 7896
7685 return; 7897 return;
7686 }
7687 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v 8::Local<v8::Object>::Cast(info[i])));
7688 } 7898 }
7899 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v8::L ocal<v8::Object>::Cast(info[i])));
7689 } 7900 }
7901
7690 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs ); 7902 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs );
7691 } 7903 }
7692 7904
7693 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 7905 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
7694 { 7906 {
7695 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); 7907 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info);
7696 } 7908 }
7697 7909
7698 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c onst v8::FunctionCallbackInfo<v8::Value>& info) 7910 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c onst v8::FunctionCallbackInfo<v8::Value>& info)
7699 { 7911 {
7700 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); 7912 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyA rg");
7913
7914 TestObject* impl = V8TestObject::toImpl(info.Holder());
7915
7701 if (UNLIKELY(info.Length() < 1)) { 7916 if (UNLIKELY(info.Length() < 1)) {
7702 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 7917 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
7703 return; 7918 return;
7704 } 7919 }
7705 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7920
7706 TestInterfaceEmpty* testInterfaceEmptyArg; 7921 TestInterfaceEmpty* testInterfaceEmptyArg;
7707 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; 7922 HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs;
7708 { 7923 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[0]);
7709 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 7924 if (!testInterfaceEmptyArg) {
7710 if (!testInterfaceEmptyArg) { 7925 exceptionState.throwTypeError("parameter 1 is not of type 'TestInterface Empty'.");
7711 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceEmpty'."); 7926
7927 return;
7928 }
7929
7930 for (int i = 1; i < info.Length(); ++i) {
7931 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
7932 exceptionState.throwTypeError("parameter 2 is not of type 'TestInter faceEmpty'.");
7933
7712 return; 7934 return;
7713 } 7935 }
7714 for (int i = 1; i < info.Length(); ++i) { 7936 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v8::L ocal<v8::Object>::Cast(info[i])));
7715 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
7716 exceptionState.throwTypeError("parameter 2 is not of type 'TestI nterfaceEmpty'.");
7717 return;
7718 }
7719 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v 8::Local<v8::Object>::Cast(info[i])));
7720 }
7721 } 7937 }
7938
7722 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter faceEmptyArg, variadicTestInterfaceEmptyArgs); 7939 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter faceEmptyArg, variadicTestInterfaceEmptyArgs);
7723 } 7940 }
7724 7941
7725 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa llback(const v8::FunctionCallbackInfo<v8::Value>& info) 7942 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa llback(const v8::FunctionCallbackInfo<v8::Value>& info)
7726 { 7943 {
7727 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm ptyArgMethod(info); 7944 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEm ptyArgMethod(info);
7728 } 7945 }
7729 7946
7730 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F unctionCallbackInfo<v8::Value>& info) 7947 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::F unctionCallbackInfo<v8::Value>& info)
7731 { 7948 {
7732 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV ariadicTestInterfaceGarbageCollectedArg", "TestObject", info.Holder(), info.GetI solate()); 7949 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodVariadicTestInterfaceGarbageCollectedArg");
7950
7733 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7951 TestObject* impl = V8TestObject::toImpl(info.Holder());
7952
7734 HeapVector<Member<TestInterfaceGarbageCollected>> variadicTestInterfaceGarba geCollectedArg; 7953 HeapVector<Member<TestInterfaceGarbageCollected>> variadicTestInterfaceGarba geCollectedArg;
7735 { 7954 for (int i = 0; i < info.Length(); ++i) {
7736 for (int i = 0; i < info.Length(); ++i) { 7955 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetIsola te())) {
7737 if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetI solate())) { 7956 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceGarbageCollected'.");
7738 exceptionState.throwTypeError("parameter 1 is not of type 'TestI nterfaceGarbageCollected'."); 7957
7739 return; 7958 return;
7740 }
7741 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarba geCollected::toImpl(v8::Local<v8::Object>::Cast(info[i])));
7742 } 7959 }
7960 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarbageCo llected::toImpl(v8::Local<v8::Object>::Cast(info[i])));
7743 } 7961 }
7962
7744 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa ceGarbageCollectedArg); 7963 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfa ceGarbageCollectedArg);
7745 } 7964 }
7746 7965
7747 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& info) 7966 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& info)
7748 { 7967 {
7749 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth od(info); 7968 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMeth od(info);
7750 } 7969 }
7751 7970
7752 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 7971 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7753 { 7972 {
7754 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObject", info.Holder(), info.GetIsolate()); 7973 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodA");
7974
7755 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7975 TestObject* impl = V8TestObject::toImpl(info.Holder());
7976
7756 int longArg; 7977 int longArg;
7757 { 7978 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
7758 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 7979 if (exceptionState.hadException())
7759 if (exceptionState.hadException()) 7980 return;
7760 return; 7981
7761 }
7762 impl->overloadedMethodA(longArg); 7982 impl->overloadedMethodA(longArg);
7763 } 7983 }
7764 7984
7765 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 7985 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7766 { 7986 {
7767 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObject", info.Holder(), info.GetIsolate()); 7987 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodA");
7988
7768 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7989 TestObject* impl = V8TestObject::toImpl(info.Holder());
7990
7769 int longArg1; 7991 int longArg1;
7770 int longArg2; 7992 int longArg2;
7771 { 7993 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSt ate);
7772 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, excepti onState); 7994 if (exceptionState.hadException())
7773 if (exceptionState.hadException()) 7995 return;
7774 return; 7996
7775 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, excepti onState); 7997 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionSt ate);
7776 if (exceptionState.hadException()) 7998 if (exceptionState.hadException())
7777 return; 7999 return;
7778 } 8000
7779 impl->overloadedMethodA(longArg1, longArg2); 8001 impl->overloadedMethodA(longArg1, longArg2);
7780 } 8002 }
7781 8003
7782 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8004 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
7783 { 8005 {
7784 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObject", info.Holder(), info.GetIsolate()); 8006 bool isArityError = false;
7785 switch (std::min(2, info.Length())) { 8007 switch (std::min(2, info.Length())) {
7786 case 1: 8008 case 1:
7787 if (true) { 8009 if (true) {
7788 overloadedMethodA1Method(info); 8010 overloadedMethodA1Method(info);
7789 return; 8011 return;
7790 } 8012 }
7791 break; 8013 break;
7792 case 2: 8014 case 2:
7793 if (true) { 8015 if (true) {
7794 overloadedMethodA2Method(info); 8016 overloadedMethodA2Method(info);
7795 return; 8017 return;
7796 } 8018 }
7797 break; 8019 break;
7798 default: 8020 default:
7799 break; 8021 isArityError = true;
7800 } 8022 }
7801 if (info.Length() < 1) { 8023
7802 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8024 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodA");
7803 return; 8025
8026 if (isArityError) {
8027 if (info.Length() < 1) {
8028 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8029 return;
8030 }
7804 } 8031 }
7805 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8032 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
7806 return;
7807 } 8033 }
7808 8034
7809 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8035 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
7810 { 8036 {
7811 TestObjectV8Internal::overloadedMethodAMethod(info); 8037 TestObjectV8Internal::overloadedMethodAMethod(info);
7812 } 8038 }
7813 8039
7814 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8040 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7815 { 8041 {
7816 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObject", info.Holder(), info.GetIsolate()); 8042 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodB");
8043
7817 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8044 TestObject* impl = V8TestObject::toImpl(info.Holder());
8045
7818 int longArg; 8046 int longArg;
7819 { 8047 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
7820 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 8048 if (exceptionState.hadException())
7821 if (exceptionState.hadException()) 8049 return;
7822 return; 8050
7823 }
7824 impl->overloadedMethodB(longArg); 8051 impl->overloadedMethodB(longArg);
7825 } 8052 }
7826 8053
7827 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8054 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7828 { 8055 {
7829 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObject", info.Holder(), info.GetIsolate()); 8056 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodB");
8057
7830 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8058 TestObject* impl = V8TestObject::toImpl(info.Holder());
8059
7831 V8StringResource<> stringArg; 8060 V8StringResource<> stringArg;
7832 int longArg; 8061 int longArg;
7833 { 8062 int numArgsPassed = info.Length();
7834 int numArgsPassed = info.Length(); 8063 while (numArgsPassed > 0) {
7835 while (numArgsPassed > 0) { 8064 if (!info[numArgsPassed - 1]->IsUndefined())
7836 if (!info[numArgsPassed - 1]->IsUndefined()) 8065 break;
7837 break; 8066 --numArgsPassed;
7838 --numArgsPassed;
7839 }
7840 stringArg = info[0];
7841 if (!stringArg.prepare())
7842 return;
7843 if (UNLIKELY(numArgsPassed <= 1)) {
7844 impl->overloadedMethodB(stringArg);
7845 return;
7846 }
7847 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptio nState);
7848 if (exceptionState.hadException())
7849 return;
7850 } 8067 }
8068 stringArg = info[0];
8069 if (!stringArg.prepare())
8070 return;
8071
8072 if (UNLIKELY(numArgsPassed <= 1)) {
8073 impl->overloadedMethodB(stringArg);
8074 return;
8075 }
8076 longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionSta te);
8077 if (exceptionState.hadException())
8078 return;
8079
7851 impl->overloadedMethodB(stringArg, longArg); 8080 impl->overloadedMethodB(stringArg, longArg);
7852 } 8081 }
7853 8082
7854 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8083 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
7855 { 8084 {
7856 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObject", info.Holder(), info.GetIsolate()); 8085 bool isArityError = false;
7857 switch (std::min(2, info.Length())) { 8086 switch (std::min(2, info.Length())) {
7858 case 1: 8087 case 1:
7859 if (info[0]->IsNumber()) { 8088 if (info[0]->IsNumber()) {
7860 overloadedMethodB1Method(info); 8089 overloadedMethodB1Method(info);
7861 return; 8090 return;
7862 } 8091 }
7863 if (true) { 8092 if (true) {
7864 overloadedMethodB2Method(info); 8093 overloadedMethodB2Method(info);
7865 return; 8094 return;
7866 } 8095 }
7867 if (true) { 8096 if (true) {
7868 overloadedMethodB1Method(info); 8097 overloadedMethodB1Method(info);
7869 return; 8098 return;
7870 } 8099 }
7871 break; 8100 break;
7872 case 2: 8101 case 2:
7873 if (true) { 8102 if (true) {
7874 overloadedMethodB2Method(info); 8103 overloadedMethodB2Method(info);
7875 return; 8104 return;
7876 } 8105 }
7877 break; 8106 break;
7878 default: 8107 default:
7879 break; 8108 isArityError = true;
7880 } 8109 }
7881 if (info.Length() < 1) { 8110
7882 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8111 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodB");
7883 return; 8112
8113 if (isArityError) {
8114 if (info.Length() < 1) {
8115 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8116 return;
8117 }
7884 } 8118 }
7885 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8119 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
7886 return;
7887 } 8120 }
7888 8121
7889 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8122 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
7890 { 8123 {
7891 TestObjectV8Internal::overloadedMethodBMethod(info); 8124 TestObjectV8Internal::overloadedMethodBMethod(info);
7892 } 8125 }
7893 8126
7894 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8127 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7895 { 8128 {
7896 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodC", "TestObject", info.Holder(), info.GetIsolate()); 8129 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodC");
8130
7897 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8131 TestObject* impl = V8TestObject::toImpl(info.Holder());
8132
7898 int longArg; 8133 int longArg;
7899 { 8134 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
7900 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 8135 if (exceptionState.hadException())
7901 if (exceptionState.hadException()) 8136 return;
7902 return; 8137
7903 }
7904 impl->overloadedMethodC(longArg); 8138 impl->overloadedMethodC(longArg);
7905 } 8139 }
7906 8140
7907 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8141 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7908 { 8142 {
7909 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8143 TestObject* impl = V8TestObject::toImpl(info.Holder());
8144
7910 TestInterfaceEmpty* testInterfaceEmptyArg; 8145 TestInterfaceEmpty* testInterfaceEmptyArg;
7911 { 8146 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[0]);
7912 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 8147 if (!testInterfaceEmptyArg) {
7913 if (!testInterfaceEmptyArg) { 8148 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("overloadedMethodC", "TestObject", "parameter 1 is not of type 'T estInterfaceEmpty'."));
7914 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodC", "TestObject", "parameter 1 is not of typ e 'TestInterfaceEmpty'.")); 8149
7915 return; 8150 return;
7916 }
7917 } 8151 }
8152
7918 impl->overloadedMethodC(testInterfaceEmptyArg); 8153 impl->overloadedMethodC(testInterfaceEmptyArg);
7919 } 8154 }
7920 8155
7921 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8156 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
7922 { 8157 {
7923 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodC", "TestObject", info.Holder(), info.GetIsolate()); 8158 bool isArityError = false;
7924 switch (std::min(1, info.Length())) { 8159 switch (std::min(1, info.Length())) {
7925 case 1: 8160 case 1:
7926 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { 8161 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
7927 overloadedMethodC2Method(info); 8162 overloadedMethodC2Method(info);
7928 return; 8163 return;
7929 } 8164 }
7930 if (true) { 8165 if (true) {
7931 overloadedMethodC1Method(info); 8166 overloadedMethodC1Method(info);
7932 return; 8167 return;
7933 } 8168 }
7934 break; 8169 break;
7935 default: 8170 default:
7936 break; 8171 isArityError = true;
7937 } 8172 }
7938 if (info.Length() < 1) { 8173
7939 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8174 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodC");
7940 return; 8175
8176 if (isArityError) {
8177 if (info.Length() < 1) {
8178 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8179 return;
8180 }
7941 } 8181 }
7942 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8182 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
7943 return;
7944 } 8183 }
7945 8184
7946 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8185 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
7947 { 8186 {
7948 TestObjectV8Internal::overloadedMethodCMethod(info); 8187 TestObjectV8Internal::overloadedMethodCMethod(info);
7949 } 8188 }
7950 8189
7951 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8190 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7952 { 8191 {
7953 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodD", "TestObject", info.Holder(), info.GetIsolate()); 8192 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodD");
8193
7954 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8194 TestObject* impl = V8TestObject::toImpl(info.Holder());
8195
7955 int longArg; 8196 int longArg;
7956 { 8197 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
7957 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 8198 if (exceptionState.hadException())
7958 if (exceptionState.hadException()) 8199 return;
7959 return; 8200
7960 }
7961 impl->overloadedMethodD(longArg); 8201 impl->overloadedMethodD(longArg);
7962 } 8202 }
7963 8203
7964 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8204 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7965 { 8205 {
7966 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodD", "TestObject", info.Holder(), info.GetIsolate()); 8206 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodD");
8207
7967 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8208 TestObject* impl = V8TestObject::toImpl(info.Holder());
8209
7968 Vector<int> longArrayArg; 8210 Vector<int> longArrayArg;
7969 { 8211 longArrayArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), excep tionState);
7970 longArrayArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), e xceptionState); 8212 if (exceptionState.hadException())
7971 if (exceptionState.hadException()) 8213 return;
7972 return; 8214
7973 }
7974 impl->overloadedMethodD(longArrayArg); 8215 impl->overloadedMethodD(longArrayArg);
7975 } 8216 }
7976 8217
7977 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8218 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
7978 { 8219 {
7979 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodD", "TestObject", info.Holder(), info.GetIsolate()); 8220 bool isArityError = false;
7980 switch (std::min(1, info.Length())) { 8221 switch (std::min(1, info.Length())) {
7981 case 1: 8222 case 1:
7982 if (info[0]->IsArray()) { 8223 if (info[0]->IsArray()) {
7983 overloadedMethodD2Method(info); 8224 overloadedMethodD2Method(info);
7984 return; 8225 return;
7985 } 8226 }
7986 if (true) { 8227 if (true) {
7987 overloadedMethodD1Method(info); 8228 overloadedMethodD1Method(info);
7988 return; 8229 return;
7989 } 8230 }
7990 break; 8231 break;
7991 default: 8232 default:
7992 break; 8233 isArityError = true;
7993 } 8234 }
7994 if (info.Length() < 1) { 8235
7995 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8236 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodD");
7996 return; 8237
8238 if (isArityError) {
8239 if (info.Length() < 1) {
8240 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8241 return;
8242 }
7997 } 8243 }
7998 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8244 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
7999 return;
8000 } 8245 }
8001 8246
8002 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8247 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8003 { 8248 {
8004 TestObjectV8Internal::overloadedMethodDMethod(info); 8249 TestObjectV8Internal::overloadedMethodDMethod(info);
8005 } 8250 }
8006 8251
8007 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8252 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8008 { 8253 {
8009 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodE", "TestObject", info.Holder(), info.GetIsolate()); 8254 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodE");
8255
8010 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8256 TestObject* impl = V8TestObject::toImpl(info.Holder());
8257
8011 int longArg; 8258 int longArg;
8012 { 8259 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
8013 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 8260 if (exceptionState.hadException())
8014 if (exceptionState.hadException()) 8261 return;
8015 return; 8262
8016 }
8017 impl->overloadedMethodE(longArg); 8263 impl->overloadedMethodE(longArg);
8018 } 8264 }
8019 8265
8020 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8266 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8021 { 8267 {
8022 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8268 TestObject* impl = V8TestObject::toImpl(info.Holder());
8269
8023 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; 8270 TestInterfaceEmpty* testInterfaceEmptyOrNullArg;
8024 { 8271 testInterfaceEmptyOrNullArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info .GetIsolate(), info[0]);
8025 testInterfaceEmptyOrNullArg = V8TestInterfaceEmpty::toImplWithTypeCheck( info.GetIsolate(), info[0]); 8272 if (!testInterfaceEmptyOrNullArg && !isUndefinedOrNull(info[0])) {
8026 if (!testInterfaceEmptyOrNullArg && !isUndefinedOrNull(info[0])) { 8273 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("overloadedMethodE", "TestObject", "parameter 1 is not of type 'T estInterfaceEmpty'."));
8027 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodE", "TestObject", "parameter 1 is not of typ e 'TestInterfaceEmpty'.")); 8274
8028 return; 8275 return;
8029 }
8030 } 8276 }
8277
8031 impl->overloadedMethodE(testInterfaceEmptyOrNullArg); 8278 impl->overloadedMethodE(testInterfaceEmptyOrNullArg);
8032 } 8279 }
8033 8280
8034 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8281 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8035 { 8282 {
8036 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodE", "TestObject", info.Holder(), info.GetIsolate()); 8283 bool isArityError = false;
8037 switch (std::min(1, info.Length())) { 8284 switch (std::min(1, info.Length())) {
8038 case 1: 8285 case 1:
8039 if (isUndefinedOrNull(info[0])) { 8286 if (isUndefinedOrNull(info[0])) {
8040 overloadedMethodE2Method(info); 8287 overloadedMethodE2Method(info);
8041 return; 8288 return;
8042 } 8289 }
8043 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { 8290 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
8044 overloadedMethodE2Method(info); 8291 overloadedMethodE2Method(info);
8045 return; 8292 return;
8046 } 8293 }
8047 if (true) { 8294 if (true) {
8048 overloadedMethodE1Method(info); 8295 overloadedMethodE1Method(info);
8049 return; 8296 return;
8050 } 8297 }
8051 break; 8298 break;
8052 default: 8299 default:
8053 break; 8300 isArityError = true;
8054 } 8301 }
8055 if (info.Length() < 1) { 8302
8056 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8303 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodE");
8057 return; 8304
8305 if (isArityError) {
8306 if (info.Length() < 1) {
8307 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8308 return;
8309 }
8058 } 8310 }
8059 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8311 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8060 return;
8061 } 8312 }
8062 8313
8063 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8314 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8064 { 8315 {
8065 TestObjectV8Internal::overloadedMethodEMethod(info); 8316 TestObjectV8Internal::overloadedMethodEMethod(info);
8066 } 8317 }
8067 8318
8068 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8319 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8069 { 8320 {
8070 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8321 TestObject* impl = V8TestObject::toImpl(info.Holder());
8322
8071 V8StringResource<> stringArg; 8323 V8StringResource<> stringArg;
8072 { 8324 int numArgsPassed = info.Length();
8073 int numArgsPassed = info.Length(); 8325 while (numArgsPassed > 0) {
8074 while (numArgsPassed > 0) { 8326 if (!info[numArgsPassed - 1]->IsUndefined())
8075 if (!info[numArgsPassed - 1]->IsUndefined()) 8327 break;
8076 break; 8328 --numArgsPassed;
8077 --numArgsPassed;
8078 }
8079 if (UNLIKELY(numArgsPassed <= 0)) {
8080 impl->overloadedMethodF();
8081 return;
8082 }
8083 stringArg = info[0];
8084 if (!stringArg.prepare())
8085 return;
8086 } 8329 }
8330 if (UNLIKELY(numArgsPassed <= 0)) {
8331 impl->overloadedMethodF();
8332 return;
8333 }
8334 stringArg = info[0];
8335 if (!stringArg.prepare())
8336 return;
8337
8087 impl->overloadedMethodF(stringArg); 8338 impl->overloadedMethodF(stringArg);
8088 } 8339 }
8089 8340
8090 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8341 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8091 { 8342 {
8092 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodF", "TestObject", info.Holder(), info.GetIsolate()); 8343 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodF");
8344
8093 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8345 TestObject* impl = V8TestObject::toImpl(info.Holder());
8346
8094 double doubleArg; 8347 double doubleArg;
8095 { 8348 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
8096 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 8349 if (exceptionState.hadException())
8097 if (exceptionState.hadException()) 8350 return;
8098 return; 8351
8099 }
8100 impl->overloadedMethodF(doubleArg); 8352 impl->overloadedMethodF(doubleArg);
8101 } 8353 }
8102 8354
8103 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8355 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8104 { 8356 {
8105 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodF", "TestObject", info.Holder(), info.GetIsolate()); 8357 bool isArityError = false;
8106 switch (std::min(1, info.Length())) { 8358 switch (std::min(1, info.Length())) {
8107 case 0: 8359 case 0:
8108 if (true) { 8360 if (true) {
8109 overloadedMethodF1Method(info); 8361 overloadedMethodF1Method(info);
8110 return; 8362 return;
8111 } 8363 }
8112 break; 8364 break;
8113 case 1: 8365 case 1:
8114 if (info[0]->IsUndefined()) { 8366 if (info[0]->IsUndefined()) {
8115 overloadedMethodF1Method(info); 8367 overloadedMethodF1Method(info);
8116 return; 8368 return;
8117 } 8369 }
8118 if (info[0]->IsNumber()) { 8370 if (info[0]->IsNumber()) {
8119 overloadedMethodF2Method(info); 8371 overloadedMethodF2Method(info);
8120 return; 8372 return;
8121 } 8373 }
8122 if (true) { 8374 if (true) {
8123 overloadedMethodF1Method(info); 8375 overloadedMethodF1Method(info);
8124 return; 8376 return;
8125 } 8377 }
8126 if (true) { 8378 if (true) {
8127 overloadedMethodF2Method(info); 8379 overloadedMethodF2Method(info);
8128 return; 8380 return;
8129 } 8381 }
8130 break; 8382 break;
8131 default: 8383 default:
8132 break; 8384 isArityError = true;
8385 }
8386
8387 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodF");
8388
8389 if (isArityError) {
8133 } 8390 }
8134 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8391 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8135 return;
8136 } 8392 }
8137 8393
8138 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8394 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8139 { 8395 {
8140 TestObjectV8Internal::overloadedMethodFMethod(info); 8396 TestObjectV8Internal::overloadedMethodFMethod(info);
8141 } 8397 }
8142 8398
8143 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8399 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8144 { 8400 {
8145 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodG", "TestObject", info.Holder(), info.GetIsolate()); 8401 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodG");
8402
8146 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8403 TestObject* impl = V8TestObject::toImpl(info.Holder());
8404
8147 int longArg; 8405 int longArg;
8148 { 8406 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
8149 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 8407 if (exceptionState.hadException())
8150 if (exceptionState.hadException()) 8408 return;
8151 return; 8409
8152 }
8153 impl->overloadedMethodG(longArg); 8410 impl->overloadedMethodG(longArg);
8154 } 8411 }
8155 8412
8156 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8413 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8157 { 8414 {
8158 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8415 TestObject* impl = V8TestObject::toImpl(info.Holder());
8416
8159 TestInterfaceEmpty* testInterfaceEmptyOrNullArg; 8417 TestInterfaceEmpty* testInterfaceEmptyOrNullArg;
8160 { 8418 if (!info[0]->IsUndefined()) {
8161 if (!info[0]->IsUndefined()) { 8419 testInterfaceEmptyOrNullArg = V8TestInterfaceEmpty::toImplWithTypeCheck( info.GetIsolate(), info[0]);
8162 testInterfaceEmptyOrNullArg = V8TestInterfaceEmpty::toImplWithTypeCh eck(info.GetIsolate(), info[0]); 8420 if (!testInterfaceEmptyOrNullArg && !isUndefinedOrNull(info[0])) {
8163 if (!testInterfaceEmptyOrNullArg && !isUndefinedOrNull(info[0])) { 8421 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodG", "TestObject", "parameter 1 is not of typ e 'TestInterfaceEmpty'."));
8164 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMes sages::failedToExecute("overloadedMethodG", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); 8422
8165 return; 8423 return;
8166 }
8167 } else {
8168 testInterfaceEmptyOrNullArg = nullptr;
8169 } 8424 }
8425 } else {
8426 testInterfaceEmptyOrNullArg = nullptr;
8170 } 8427 }
8428
8171 impl->overloadedMethodG(testInterfaceEmptyOrNullArg); 8429 impl->overloadedMethodG(testInterfaceEmptyOrNullArg);
8172 } 8430 }
8173 8431
8174 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8432 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8175 { 8433 {
8176 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodG", "TestObject", info.Holder(), info.GetIsolate()); 8434 bool isArityError = false;
8177 switch (std::min(1, info.Length())) { 8435 switch (std::min(1, info.Length())) {
8178 case 0: 8436 case 0:
8179 if (true) { 8437 if (true) {
8180 overloadedMethodG2Method(info); 8438 overloadedMethodG2Method(info);
8181 return; 8439 return;
8182 } 8440 }
8183 break; 8441 break;
8184 case 1: 8442 case 1:
8185 if (info[0]->IsUndefined()) { 8443 if (info[0]->IsUndefined()) {
8186 overloadedMethodG2Method(info); 8444 overloadedMethodG2Method(info);
8187 return; 8445 return;
8188 } 8446 }
8189 if (isUndefinedOrNull(info[0])) { 8447 if (isUndefinedOrNull(info[0])) {
8190 overloadedMethodG2Method(info); 8448 overloadedMethodG2Method(info);
8191 return; 8449 return;
8192 } 8450 }
8193 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { 8451 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
8194 overloadedMethodG2Method(info); 8452 overloadedMethodG2Method(info);
8195 return; 8453 return;
8196 } 8454 }
8197 if (true) { 8455 if (true) {
8198 overloadedMethodG1Method(info); 8456 overloadedMethodG1Method(info);
8199 return; 8457 return;
8200 } 8458 }
8201 break; 8459 break;
8202 default: 8460 default:
8203 break; 8461 isArityError = true;
8462 }
8463
8464 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodG");
8465
8466 if (isArityError) {
8204 } 8467 }
8205 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8468 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8206 return;
8207 } 8469 }
8208 8470
8209 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8471 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8210 { 8472 {
8211 TestObjectV8Internal::overloadedMethodGMethod(info); 8473 TestObjectV8Internal::overloadedMethodGMethod(info);
8212 } 8474 }
8213 8475
8214 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8476 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8215 { 8477 {
8216 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8478 TestObject* impl = V8TestObject::toImpl(info.Holder());
8479
8217 TestInterfaceImplementation* testInterfaceArg; 8480 TestInterfaceImplementation* testInterfaceArg;
8218 { 8481 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), i nfo[0]);
8219 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate( ), info[0]); 8482 if (!testInterfaceArg) {
8220 if (!testInterfaceArg) { 8483 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("overloadedMethodH", "TestObject", "parameter 1 is not of type 'T estInterface'."));
8221 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodH", "TestObject", "parameter 1 is not of typ e 'TestInterface'.")); 8484
8222 return; 8485 return;
8223 }
8224 } 8486 }
8487
8225 impl->overloadedMethodH(testInterfaceArg); 8488 impl->overloadedMethodH(testInterfaceArg);
8226 } 8489 }
8227 8490
8228 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8491 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8229 { 8492 {
8230 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8493 TestObject* impl = V8TestObject::toImpl(info.Holder());
8494
8231 TestInterfaceEmpty* testInterfaceEmptyArg; 8495 TestInterfaceEmpty* testInterfaceEmptyArg;
8232 { 8496 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[0]);
8233 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 8497 if (!testInterfaceEmptyArg) {
8234 if (!testInterfaceEmptyArg) { 8498 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("overloadedMethodH", "TestObject", "parameter 1 is not of type 'T estInterfaceEmpty'."));
8235 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodH", "TestObject", "parameter 1 is not of typ e 'TestInterfaceEmpty'.")); 8499
8236 return; 8500 return;
8237 }
8238 } 8501 }
8502
8239 impl->overloadedMethodH(testInterfaceEmptyArg); 8503 impl->overloadedMethodH(testInterfaceEmptyArg);
8240 } 8504 }
8241 8505
8242 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8506 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8243 { 8507 {
8244 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodH", "TestObject", info.Holder(), info.GetIsolate()); 8508 bool isArityError = false;
8245 switch (std::min(1, info.Length())) { 8509 switch (std::min(1, info.Length())) {
8246 case 1: 8510 case 1:
8247 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { 8511 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) {
8248 overloadedMethodH1Method(info); 8512 overloadedMethodH1Method(info);
8249 return; 8513 return;
8250 } 8514 }
8251 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { 8515 if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
8252 overloadedMethodH2Method(info); 8516 overloadedMethodH2Method(info);
8253 return; 8517 return;
8254 } 8518 }
8255 break; 8519 break;
8256 default: 8520 default:
8257 break; 8521 isArityError = true;
8258 } 8522 }
8259 if (info.Length() < 1) { 8523
8260 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8524 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodH");
8261 return; 8525
8526 if (isArityError) {
8527 if (info.Length() < 1) {
8528 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8529 return;
8530 }
8262 } 8531 }
8263 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8532 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8264 return;
8265 } 8533 }
8266 8534
8267 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8535 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8268 { 8536 {
8269 TestObjectV8Internal::overloadedMethodHMethod(info); 8537 TestObjectV8Internal::overloadedMethodHMethod(info);
8270 } 8538 }
8271 8539
8272 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8540 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8273 { 8541 {
8274 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8542 TestObject* impl = V8TestObject::toImpl(info.Holder());
8543
8275 V8StringResource<> stringArg; 8544 V8StringResource<> stringArg;
8276 { 8545 stringArg = info[0];
8277 stringArg = info[0]; 8546 if (!stringArg.prepare())
8278 if (!stringArg.prepare()) 8547 return;
8279 return; 8548
8280 }
8281 impl->overloadedMethodI(stringArg); 8549 impl->overloadedMethodI(stringArg);
8282 } 8550 }
8283 8551
8284 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8552 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8285 { 8553 {
8286 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodI", "TestObject", info.Holder(), info.GetIsolate()); 8554 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodI");
8555
8287 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8556 TestObject* impl = V8TestObject::toImpl(info.Holder());
8557
8288 double doubleArg; 8558 double doubleArg;
8289 { 8559 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState);
8290 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 8560 if (exceptionState.hadException())
8291 if (exceptionState.hadException()) 8561 return;
8292 return; 8562
8293 }
8294 impl->overloadedMethodI(doubleArg); 8563 impl->overloadedMethodI(doubleArg);
8295 } 8564 }
8296 8565
8297 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8566 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8298 { 8567 {
8299 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodI", "TestObject", info.Holder(), info.GetIsolate()); 8568 bool isArityError = false;
8300 switch (std::min(1, info.Length())) { 8569 switch (std::min(1, info.Length())) {
8301 case 1: 8570 case 1:
8302 if (info[0]->IsNumber()) { 8571 if (info[0]->IsNumber()) {
8303 overloadedMethodI2Method(info); 8572 overloadedMethodI2Method(info);
8304 return; 8573 return;
8305 } 8574 }
8306 if (true) { 8575 if (true) {
8307 overloadedMethodI1Method(info); 8576 overloadedMethodI1Method(info);
8308 return; 8577 return;
8309 } 8578 }
8310 if (true) { 8579 if (true) {
8311 overloadedMethodI2Method(info); 8580 overloadedMethodI2Method(info);
8312 return; 8581 return;
8313 } 8582 }
8314 break; 8583 break;
8315 default: 8584 default:
8316 break; 8585 isArityError = true;
8317 } 8586 }
8318 if (info.Length() < 1) { 8587
8319 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8588 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodI");
8320 return; 8589
8590 if (isArityError) {
8591 if (info.Length() < 1) {
8592 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8593 return;
8594 }
8321 } 8595 }
8322 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8596 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8323 return;
8324 } 8597 }
8325 8598
8326 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8599 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8327 { 8600 {
8328 TestObjectV8Internal::overloadedMethodIMethod(info); 8601 TestObjectV8Internal::overloadedMethodIMethod(info);
8329 } 8602 }
8330 8603
8331 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8604 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8332 { 8605 {
8333 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8606 TestObject* impl = V8TestObject::toImpl(info.Holder());
8607
8334 V8StringResource<> stringArg; 8608 V8StringResource<> stringArg;
8335 { 8609 stringArg = info[0];
8336 stringArg = info[0]; 8610 if (!stringArg.prepare())
8337 if (!stringArg.prepare()) 8611 return;
8338 return; 8612
8339 }
8340 impl->overloadedMethodJ(stringArg); 8613 impl->overloadedMethodJ(stringArg);
8341 } 8614 }
8342 8615
8343 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8616 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8344 { 8617 {
8345 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodJ", "TestObject", info.Holder(), info.GetIsolate()); 8618 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodJ");
8619
8346 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8620 TestObject* impl = V8TestObject::toImpl(info.Holder());
8621
8347 TestDictionary testDictionaryArg; 8622 TestDictionary testDictionaryArg;
8348 { 8623 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
8349 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 8624 exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is not an object.");
8350 exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is not an object."); 8625
8351 return; 8626 return;
8352 }
8353 V8TestDictionary::toImpl(info.GetIsolate(), info[0], testDictionaryArg, exceptionState);
8354 if (exceptionState.hadException())
8355 return;
8356 } 8627 }
8628 V8TestDictionary::toImpl(info.GetIsolate(), info[0], testDictionaryArg, exce ptionState);
8629 if (exceptionState.hadException())
8630 return;
8631
8357 impl->overloadedMethodJ(testDictionaryArg); 8632 impl->overloadedMethodJ(testDictionaryArg);
8358 } 8633 }
8359 8634
8360 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8635 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8361 { 8636 {
8362 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodJ", "TestObject", info.Holder(), info.GetIsolate()); 8637 bool isArityError = false;
8363 switch (std::min(1, info.Length())) { 8638 switch (std::min(1, info.Length())) {
8364 case 1: 8639 case 1:
8365 if (info[0]->IsObject()) { 8640 if (info[0]->IsObject()) {
8366 overloadedMethodJ2Method(info); 8641 overloadedMethodJ2Method(info);
8367 return; 8642 return;
8368 } 8643 }
8369 if (true) { 8644 if (true) {
8370 overloadedMethodJ1Method(info); 8645 overloadedMethodJ1Method(info);
8371 return; 8646 return;
8372 } 8647 }
8373 break; 8648 break;
8374 default: 8649 default:
8375 break; 8650 isArityError = true;
8376 } 8651 }
8377 if (info.Length() < 1) { 8652
8378 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8653 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodJ");
8379 return; 8654
8655 if (isArityError) {
8656 if (info.Length() < 1) {
8657 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8658 return;
8659 }
8380 } 8660 }
8381 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8661 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8382 return;
8383 } 8662 }
8384 8663
8385 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8664 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8386 { 8665 {
8387 TestObjectV8Internal::overloadedMethodJMethod(info); 8666 TestObjectV8Internal::overloadedMethodJMethod(info);
8388 } 8667 }
8389 8668
8390 static void overloadedMethodK1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8669 static void overloadedMethodK1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8391 { 8670 {
8392 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8671 TestObject* impl = V8TestObject::toImpl(info.Holder());
8672
8393 ScriptValue functionArg; 8673 ScriptValue functionArg;
8394 { 8674 if (!info[0]->IsFunction()) {
8395 if (!info[0]->IsFunction()) { 8675 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("overloadedMethodK", "TestObject", "The callback provided as para meter 1 is not a function."));
8396 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodK", "TestObject", "The callback provided as parameter 1 is not a function.")); 8676
8397 return; 8677 return;
8398 }
8399 functionArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[ 0]);
8400 } 8678 }
8679 functionArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
8680
8401 impl->overloadedMethodK(functionArg); 8681 impl->overloadedMethodK(functionArg);
8402 } 8682 }
8403 8683
8404 static void overloadedMethodK2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8684 static void overloadedMethodK2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8405 { 8685 {
8406 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8686 TestObject* impl = V8TestObject::toImpl(info.Holder());
8687
8407 V8StringResource<> stringArg; 8688 V8StringResource<> stringArg;
8408 { 8689 stringArg = info[0];
8409 stringArg = info[0]; 8690 if (!stringArg.prepare())
8410 if (!stringArg.prepare()) 8691 return;
8411 return; 8692
8412 }
8413 impl->overloadedMethodK(stringArg); 8693 impl->overloadedMethodK(stringArg);
8414 } 8694 }
8415 8695
8416 static void overloadedMethodKMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8696 static void overloadedMethodKMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8417 { 8697 {
8418 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodK", "TestObject", info.Holder(), info.GetIsolate()); 8698 bool isArityError = false;
8419 switch (std::min(1, info.Length())) { 8699 switch (std::min(1, info.Length())) {
8420 case 1: 8700 case 1:
8421 if (info[0]->IsFunction()) { 8701 if (info[0]->IsFunction()) {
8422 overloadedMethodK1Method(info); 8702 overloadedMethodK1Method(info);
8423 return; 8703 return;
8424 } 8704 }
8425 if (true) { 8705 if (true) {
8426 overloadedMethodK2Method(info); 8706 overloadedMethodK2Method(info);
8427 return; 8707 return;
8428 } 8708 }
8429 break; 8709 break;
8430 default: 8710 default:
8431 break; 8711 isArityError = true;
8432 } 8712 }
8433 if (info.Length() < 1) { 8713
8434 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8714 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodK");
8435 return; 8715
8716 if (isArityError) {
8717 if (info.Length() < 1) {
8718 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8719 return;
8720 }
8436 } 8721 }
8437 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8722 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8438 return;
8439 } 8723 }
8440 8724
8441 static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8725 static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8442 { 8726 {
8443 TestObjectV8Internal::overloadedMethodKMethod(info); 8727 TestObjectV8Internal::overloadedMethodKMethod(info);
8444 } 8728 }
8445 8729
8446 static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8730 static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8447 { 8731 {
8448 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodL", "TestObject", info.Holder(), info.GetIsolate()); 8732 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodL");
8733
8449 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8734 TestObject* impl = V8TestObject::toImpl(info.Holder());
8735
8450 int longArg; 8736 int longArg;
8451 Vector<ScriptValue> restArgs; 8737 Vector<ScriptValue> restArgs;
8452 { 8738 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
8453 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 8739 if (exceptionState.hadException())
8454 if (exceptionState.hadException()) 8740 return;
8455 return; 8741
8456 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState) ; 8742 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState);
8457 if (exceptionState.hadException()) 8743 if (exceptionState.hadException())
8458 return; 8744 return;
8459 } 8745
8460 impl->overloadedMethodL(longArg, restArgs); 8746 impl->overloadedMethodL(longArg, restArgs);
8461 } 8747 }
8462 8748
8463 static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8749 static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8464 { 8750 {
8465 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodL", "TestObject", info.Holder(), info.GetIsolate()); 8751 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodL");
8752
8466 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8753 TestObject* impl = V8TestObject::toImpl(info.Holder());
8754
8467 V8StringResource<> stringArg; 8755 V8StringResource<> stringArg;
8468 Vector<ScriptValue> restArgs; 8756 Vector<ScriptValue> restArgs;
8469 { 8757 stringArg = info[0];
8470 stringArg = info[0]; 8758 if (!stringArg.prepare())
8471 if (!stringArg.prepare()) 8759 return;
8472 return; 8760
8473 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState) ; 8761 restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState);
8474 if (exceptionState.hadException()) 8762 if (exceptionState.hadException())
8475 return; 8763 return;
8476 } 8764
8477 impl->overloadedMethodL(stringArg, restArgs); 8765 impl->overloadedMethodL(stringArg, restArgs);
8478 } 8766 }
8479 8767
8480 static void overloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8768 static void overloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8481 { 8769 {
8482 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodL", "TestObject", info.Holder(), info.GetIsolate()); 8770 bool isArityError = false;
8483 switch (std::min(2, info.Length())) { 8771 switch (std::min(2, info.Length())) {
8484 case 1: 8772 case 1:
8485 if (info[0]->IsNumber()) { 8773 if (info[0]->IsNumber()) {
8486 overloadedMethodL1Method(info); 8774 overloadedMethodL1Method(info);
8487 return; 8775 return;
8488 } 8776 }
8489 if (true) { 8777 if (true) {
8490 overloadedMethodL2Method(info); 8778 overloadedMethodL2Method(info);
8491 return; 8779 return;
8492 } 8780 }
(...skipping 10 matching lines...) Expand all
8503 if (true) { 8791 if (true) {
8504 overloadedMethodL2Method(info); 8792 overloadedMethodL2Method(info);
8505 return; 8793 return;
8506 } 8794 }
8507 if (true) { 8795 if (true) {
8508 overloadedMethodL1Method(info); 8796 overloadedMethodL1Method(info);
8509 return; 8797 return;
8510 } 8798 }
8511 break; 8799 break;
8512 default: 8800 default:
8513 break; 8801 isArityError = true;
8514 } 8802 }
8515 if (info.Length() < 1) { 8803
8516 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8804 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodL");
8517 return; 8805
8806 if (isArityError) {
8807 if (info.Length() < 1) {
8808 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8809 return;
8810 }
8518 } 8811 }
8519 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8812 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8520 return;
8521 } 8813 }
8522 8814
8523 static void overloadedMethodLMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8815 static void overloadedMethodLMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8524 { 8816 {
8525 TestObjectV8Internal::overloadedMethodLMethod(info); 8817 TestObjectV8Internal::overloadedMethodLMethod(info);
8526 } 8818 }
8527 8819
8528 static void overloadedMethodN1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8820 static void overloadedMethodN1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8529 { 8821 {
8530 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8822 TestObject* impl = V8TestObject::toImpl(info.Holder());
8823
8531 TestInterfaceImplementation* testInterfaceArg; 8824 TestInterfaceImplementation* testInterfaceArg;
8532 { 8825 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), i nfo[0]);
8533 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate( ), info[0]); 8826 if (!testInterfaceArg) {
8534 if (!testInterfaceArg) { 8827 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("overloadedMethodN", "TestObject", "parameter 1 is not of type 'T estInterface'."));
8535 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodN", "TestObject", "parameter 1 is not of typ e 'TestInterface'.")); 8828
8536 return; 8829 return;
8537 }
8538 } 8830 }
8831
8539 impl->overloadedMethodN(testInterfaceArg); 8832 impl->overloadedMethodN(testInterfaceArg);
8540 } 8833 }
8541 8834
8542 static void overloadedMethodN2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 8835 static void overloadedMethodN2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8543 { 8836 {
8544 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8837 TestObject* impl = V8TestObject::toImpl(info.Holder());
8838
8545 TestCallbackInterface* testCallbackInterfaceArg; 8839 TestCallbackInterface* testCallbackInterfaceArg;
8546 { 8840 if (info.Length() <= 0 || !info[0]->IsFunction()) {
8547 if (info.Length() <= 0 || !info[0]->IsFunction()) { 8841 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("overloadedMethodN", "TestObject", "The callback provided as para meter 1 is not a function."));
8548 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("overloadedMethodN", "TestObject", "The callback provided as parameter 1 is not a function.")); 8842
8549 return; 8843 return;
8550 }
8551 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8: :Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
8552 } 8844 }
8845 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Fun ction>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
8846
8553 impl->overloadedMethodN(testCallbackInterfaceArg); 8847 impl->overloadedMethodN(testCallbackInterfaceArg);
8554 } 8848 }
8555 8849
8556 static void overloadedMethodNMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 8850 static void overloadedMethodNMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8557 { 8851 {
8558 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodN", "TestObject", info.Holder(), info.GetIsolate()); 8852 bool isArityError = false;
8559 switch (std::min(1, info.Length())) { 8853 switch (std::min(1, info.Length())) {
8560 case 1: 8854 case 1:
8561 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { 8855 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) {
8562 overloadedMethodN1Method(info); 8856 overloadedMethodN1Method(info);
8563 return; 8857 return;
8564 } 8858 }
8565 if (info[0]->IsObject()) { 8859 if (info[0]->IsObject()) {
8566 overloadedMethodN2Method(info); 8860 overloadedMethodN2Method(info);
8567 return; 8861 return;
8568 } 8862 }
8569 break; 8863 break;
8570 default: 8864 default:
8571 break; 8865 isArityError = true;
8572 } 8866 }
8573 if (info.Length() < 1) { 8867
8574 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 8868 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedMethodN");
8575 return; 8869
8870 if (isArityError) {
8871 if (info.Length() < 1) {
8872 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
8873 return;
8874 }
8576 } 8875 }
8577 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8876 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8578 return;
8579 } 8877 }
8580 8878
8581 static void overloadedMethodNMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8879 static void overloadedMethodNMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8582 { 8880 {
8583 TestObjectV8Internal::overloadedMethodNMethod(info); 8881 TestObjectV8Internal::overloadedMethodNMethod(info);
8584 } 8882 }
8585 8883
8586 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu e>& info) 8884 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu e>& info)
8587 { 8885 {
8588 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8886 TestObject* impl = V8TestObject::toImpl(info.Holder());
8887
8589 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); 8888 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value());
8590 } 8889 }
8591 8890
8592 static void promiseOverloadMethod2MethodPromise(const v8::FunctionCallbackInfo<v 8::Value>& info, ExceptionState& exceptionState)
8593 {
8594 TestObject* impl = V8TestObject::toImpl(info.Holder());
8595 DOMWindow* arg1;
8596 double arg2;
8597 {
8598 arg1 = toDOMWindow(info.GetIsolate(), info[0]);
8599 if (!arg1) {
8600 exceptionState.throwTypeError("parameter 1 is not of type 'Window'." );
8601 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in fo.GetIsolate())).v8Value());
8602 return;
8603 }
8604 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState);
8605 if (exceptionState.hadException())
8606 return;
8607 }
8608 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value());
8609 }
8610
8611 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu e>& info) 8891 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu e>& info)
8612 { 8892 {
8613 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver loadMethod", "TestObject", info.Holder(), info.GetIsolate()); 8893 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "promiseOverloadMethod");
8614 promiseOverloadMethod2MethodPromise(info, exceptionState); 8894 ScriptState* scriptState = ScriptState::forReceiverObject(info);
8895 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio nState);
8896
8897 TestObject* impl = V8TestObject::toImpl(info.Holder());
8898
8899 DOMWindow* arg1;
8900 double arg2;
8901 arg1 = toDOMWindow(info.GetIsolate(), info[0]);
8902 if (!arg1) {
8903 exceptionState.throwTypeError("parameter 1 is not of type 'Window'.");
8904
8905 return;
8906 }
8907
8908 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState);
8615 if (exceptionState.hadException()) 8909 if (exceptionState.hadException())
8616 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G etIsolate())).v8Value()); 8910 return;
8617 }
8618 8911
8619 static void promiseOverloadMethod3MethodPromise(const v8::FunctionCallbackInfo<v 8::Value>& info, ExceptionState& exceptionState)
8620 {
8621 TestObject* impl = V8TestObject::toImpl(info.Holder());
8622 Document* arg1;
8623 double arg2;
8624 {
8625 arg1 = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]);
8626 if (!arg1) {
8627 exceptionState.throwTypeError("parameter 1 is not of type 'Document' .");
8628 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in fo.GetIsolate())).v8Value());
8629 return;
8630 }
8631 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState);
8632 if (exceptionState.hadException())
8633 return;
8634 }
8635 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value()); 8912 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value());
8636 } 8913 }
8637 8914
8638 static void promiseOverloadMethod3Method(const v8::FunctionCallbackInfo<v8::Valu e>& info) 8915 static void promiseOverloadMethod3Method(const v8::FunctionCallbackInfo<v8::Valu e>& info)
8639 { 8916 {
8640 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver loadMethod", "TestObject", info.Holder(), info.GetIsolate()); 8917 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "promiseOverloadMethod");
8641 promiseOverloadMethod3MethodPromise(info, exceptionState); 8918 ScriptState* scriptState = ScriptState::forReceiverObject(info);
8919 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio nState);
8920
8921 TestObject* impl = V8TestObject::toImpl(info.Holder());
8922
8923 Document* arg1;
8924 double arg2;
8925 arg1 = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]);
8926 if (!arg1) {
8927 exceptionState.throwTypeError("parameter 1 is not of type 'Document'.");
8928
8929 return;
8930 }
8931
8932 arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState);
8642 if (exceptionState.hadException()) 8933 if (exceptionState.hadException())
8643 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G etIsolate())).v8Value()); 8934 return;
8935
8936 v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value());
8644 } 8937 }
8645 8938
8646 static void promiseOverloadMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 8939 static void promiseOverloadMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
8647 { 8940 {
8648 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver loadMethod", "TestObject", info.Holder(), info.GetIsolate()); 8941 bool isArityError = false;
8649 switch (std::min(2, info.Length())) { 8942 switch (std::min(2, info.Length())) {
8650 case 0: 8943 case 0:
8651 if (true) { 8944 if (true) {
8652 promiseOverloadMethod1Method(info); 8945 promiseOverloadMethod1Method(info);
8653 return; 8946 return;
8654 } 8947 }
8655 break; 8948 break;
8656 case 2: 8949 case 2:
8657 if (V8Window::hasInstance(info[0], info.GetIsolate())) { 8950 if (V8Window::hasInstance(info[0], info.GetIsolate())) {
8658 promiseOverloadMethod2Method(info); 8951 promiseOverloadMethod2Method(info);
8659 return; 8952 return;
8660 } 8953 }
8661 if (V8Document::hasInstance(info[0], info.GetIsolate())) { 8954 if (V8Document::hasInstance(info[0], info.GetIsolate())) {
8662 promiseOverloadMethod3Method(info); 8955 promiseOverloadMethod3Method(info);
8663 return; 8956 return;
8664 } 8957 }
8665 break; 8958 break;
8666 default: 8959 default:
8960 isArityError = true;
8961 }
8962
8963 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "promiseOverloadMethod");
8964 ScriptState* scriptState = ScriptState::forReceiverObject(info);
8965 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio nState);
8966
8967 if (isArityError) {
8667 if (info.Length() >= 0) { 8968 if (info.Length() >= 0) {
8668 exceptionState.throwTypeError(ExceptionMessages::invalidArity("[0, 2 ]", info.Length())); 8969 exceptionState.throwTypeError(ExceptionMessages::invalidArity("[0, 2 ]", info.Length()));
8669 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in fo.GetIsolate())).v8Value());
8670 return; 8970 return;
8671 } 8971 }
8672 break;
8673 } 8972 }
8674 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 8973 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8675 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs olate())).v8Value());
8676 return;
8677 } 8974 }
8678 8975
8679 static void promiseOverloadMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 8976 static void promiseOverloadMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
8680 { 8977 {
8681 TestObjectV8Internal::promiseOverloadMethodMethod(info); 8978 TestObjectV8Internal::promiseOverloadMethodMethod(info);
8682 } 8979 }
8683 8980
8684 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn fo<v8::Value>& info) 8981 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn fo<v8::Value>& info)
8685 { 8982 {
8686 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8983 TestObject* impl = V8TestObject::toImpl(info.Holder());
8984
8687 impl->overloadedPerWorldBindingsMethod(); 8985 impl->overloadedPerWorldBindingsMethod();
8688 } 8986 }
8689 8987
8690 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info) 8988 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info)
8691 { 8989 {
8692 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8990 TestObject* impl = V8TestObject::toImpl(info.Holder());
8991
8693 impl->overloadedPerWorldBindingsMethod(); 8992 impl->overloadedPerWorldBindingsMethod();
8694 } 8993 }
8695 8994
8696 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn fo<v8::Value>& info) 8995 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn fo<v8::Value>& info)
8697 { 8996 {
8698 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); 8997 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedPerWorldBindingsMethod");
8998
8699 TestObject* impl = V8TestObject::toImpl(info.Holder()); 8999 TestObject* impl = V8TestObject::toImpl(info.Holder());
9000
8700 int longArg; 9001 int longArg;
8701 { 9002 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
8702 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 9003 if (exceptionState.hadException())
8703 if (exceptionState.hadException()) 9004 return;
8704 return; 9005
8705 }
8706 impl->overloadedPerWorldBindingsMethod(longArg); 9006 impl->overloadedPerWorldBindingsMethod(longArg);
8707 } 9007 }
8708 9008
8709 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info) 9009 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
8710 { 9010 {
8711 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); 9011 bool isArityError = false;
8712 switch (std::min(1, info.Length())) { 9012 switch (std::min(1, info.Length())) {
8713 case 0: 9013 case 0:
8714 if (true) { 9014 if (true) {
8715 overloadedPerWorldBindingsMethod1Method(info); 9015 overloadedPerWorldBindingsMethod1Method(info);
8716 return; 9016 return;
8717 } 9017 }
8718 break; 9018 break;
8719 case 1: 9019 case 1:
8720 if (true) { 9020 if (true) {
8721 overloadedPerWorldBindingsMethod2Method(info); 9021 overloadedPerWorldBindingsMethod2Method(info);
8722 return; 9022 return;
8723 } 9023 }
8724 break; 9024 break;
8725 default: 9025 default:
8726 break; 9026 isArityError = true;
9027 }
9028
9029 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedPerWorldBindingsMethod");
9030
9031 if (isArityError) {
8727 } 9032 }
8728 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9033 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8729 return;
8730 } 9034 }
8731 9035
8732 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 9036 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
8733 { 9037 {
8734 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); 9038 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info);
8735 } 9039 }
8736 9040
8737 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info) 9041 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info)
8738 { 9042 {
8739 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); 9043 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedPerWorldBindingsMethod");
9044
8740 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9045 TestObject* impl = V8TestObject::toImpl(info.Holder());
9046
8741 int longArg; 9047 int longArg;
8742 { 9048 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
8743 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 9049 if (exceptionState.hadException())
8744 if (exceptionState.hadException()) 9050 return;
8745 return; 9051
8746 }
8747 impl->overloadedPerWorldBindingsMethod(longArg); 9052 impl->overloadedPerWorldBindingsMethod(longArg);
8748 } 9053 }
8749 9054
8750 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info) 9055 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info)
8751 { 9056 {
8752 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); 9057 bool isArityError = false;
8753 switch (std::min(1, info.Length())) { 9058 switch (std::min(1, info.Length())) {
8754 case 0: 9059 case 0:
8755 if (true) { 9060 if (true) {
8756 overloadedPerWorldBindingsMethod1MethodForMainWorld(info); 9061 overloadedPerWorldBindingsMethod1MethodForMainWorld(info);
8757 return; 9062 return;
8758 } 9063 }
8759 break; 9064 break;
8760 case 1: 9065 case 1:
8761 if (true) { 9066 if (true) {
8762 overloadedPerWorldBindingsMethod2MethodForMainWorld(info); 9067 overloadedPerWorldBindingsMethod2MethodForMainWorld(info);
8763 return; 9068 return;
8764 } 9069 }
8765 break; 9070 break;
8766 default: 9071 default:
8767 break; 9072 isArityError = true;
9073 }
9074
9075 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedPerWorldBindingsMethod");
9076
9077 if (isArityError) {
8768 } 9078 }
8769 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9079 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8770 return;
8771 } 9080 }
8772 9081
8773 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info) 9082 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info)
8774 { 9083 {
8775 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(inf o); 9084 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(inf o);
8776 } 9085 }
8777 9086
8778 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val ue>& info) 9087 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val ue>& info)
8779 { 9088 {
8780 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS taticMethod", "TestObject", info.Holder(), info.GetIsolate()); 9089 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedStaticMethod");
9090
8781 int longArg; 9091 int longArg;
8782 { 9092 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
8783 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 9093 if (exceptionState.hadException())
8784 if (exceptionState.hadException()) 9094 return;
8785 return; 9095
8786 }
8787 TestObject::overloadedStaticMethod(longArg); 9096 TestObject::overloadedStaticMethod(longArg);
8788 } 9097 }
8789 9098
8790 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val ue>& info) 9099 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val ue>& info)
8791 { 9100 {
8792 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS taticMethod", "TestObject", info.Holder(), info.GetIsolate()); 9101 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedStaticMethod");
9102
8793 int longArg1; 9103 int longArg1;
8794 int longArg2; 9104 int longArg2;
8795 { 9105 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSt ate);
8796 longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, excepti onState); 9106 if (exceptionState.hadException())
8797 if (exceptionState.hadException()) 9107 return;
8798 return; 9108
8799 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, excepti onState); 9109 longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionSt ate);
8800 if (exceptionState.hadException()) 9110 if (exceptionState.hadException())
8801 return; 9111 return;
8802 } 9112
8803 TestObject::overloadedStaticMethod(longArg1, longArg2); 9113 TestObject::overloadedStaticMethod(longArg1, longArg2);
8804 } 9114 }
8805 9115
8806 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info) 9116 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
8807 { 9117 {
8808 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS taticMethod", "TestObject", info.Holder(), info.GetIsolate()); 9118 bool isArityError = false;
8809 switch (std::min(2, info.Length())) { 9119 switch (std::min(2, info.Length())) {
8810 case 1: 9120 case 1:
8811 if (true) { 9121 if (true) {
8812 overloadedStaticMethod1Method(info); 9122 overloadedStaticMethod1Method(info);
8813 return; 9123 return;
8814 } 9124 }
8815 break; 9125 break;
8816 case 2: 9126 case 2:
8817 if (true) { 9127 if (true) {
8818 overloadedStaticMethod2Method(info); 9128 overloadedStaticMethod2Method(info);
8819 return; 9129 return;
8820 } 9130 }
8821 break; 9131 break;
8822 default: 9132 default:
8823 break; 9133 isArityError = true;
8824 } 9134 }
8825 if (info.Length() < 1) { 9135
8826 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 9136 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "overloadedStaticMethod");
8827 return; 9137
9138 if (isArityError) {
9139 if (info.Length() < 1) {
9140 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
9141 return;
9142 }
8828 } 9143 }
8829 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9144 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8830 return;
8831 } 9145 }
8832 9146
8833 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info) 9147 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
8834 { 9148 {
8835 TestObjectV8Internal::overloadedStaticMethodMethod(info); 9149 TestObjectV8Internal::overloadedStaticMethodMethod(info);
8836 } 9150 }
8837 9151
8838 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 9152 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8839 { 9153 {
8840 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes tObject", info.Holder(), info.GetIsolate()); 9154 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "item");
9155
9156 TestObject* impl = V8TestObject::toImpl(info.Holder());
9157
9158 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9159
8841 if (UNLIKELY(info.Length() < 1)) { 9160 if (UNLIKELY(info.Length() < 1)) {
8842 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 9161 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
8843 return; 9162 return;
8844 } 9163 }
8845 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9164
8846 unsigned index; 9165 unsigned index;
8847 { 9166 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionStat e);
8848 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exception State); 9167 if (exceptionState.hadException())
8849 if (exceptionState.hadException()) 9168 return;
8850 return; 9169
8851 }
8852 ScriptState* scriptState = ScriptState::forReceiverObject(info);
8853 ScriptValue result = impl->item(scriptState, index); 9170 ScriptValue result = impl->item(scriptState, index);
8854 v8SetReturnValue(info, result.v8Value()); 9171 v8SetReturnValue(info, result.v8Value());
8855 } 9172 }
8856 9173
8857 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 9174 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8858 { 9175 {
8859 TestObjectV8Internal::itemMethod(info); 9176 TestObjectV8Internal::itemMethod(info);
8860 } 9177 }
8861 9178
8862 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 9179 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8863 { 9180 {
8864 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", " TestObject", info.Holder(), info.GetIsolate()); 9181 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "setItem");
9182
9183 TestObject* impl = V8TestObject::toImpl(info.Holder());
9184
9185 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9186
8865 if (UNLIKELY(info.Length() < 2)) { 9187 if (UNLIKELY(info.Length() < 2)) {
8866 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 9188 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
8867 return; 9189 return;
8868 } 9190 }
8869 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9191
8870 unsigned index; 9192 unsigned index;
8871 V8StringResource<> value; 9193 V8StringResource<> value;
8872 { 9194 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionStat e);
8873 index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exception State); 9195 if (exceptionState.hadException())
8874 if (exceptionState.hadException()) 9196 return;
8875 return; 9197
8876 value = info[1]; 9198 value = info[1];
8877 if (!value.prepare()) 9199 if (!value.prepare())
8878 return; 9200 return;
8879 } 9201
8880 ScriptState* scriptState = ScriptState::forReceiverObject(info);
8881 String result = impl->setItem(scriptState, index, value); 9202 String result = impl->setItem(scriptState, index, value);
8882 v8SetReturnValueString(info, result, info.GetIsolate()); 9203 v8SetReturnValueString(info, result, info.GetIsolate());
8883 } 9204 }
8884 9205
8885 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 9206 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
8886 { 9207 {
8887 TestObjectV8Internal::setItemMethod(info); 9208 TestObjectV8Internal::setItemMethod(info);
8888 } 9209 }
8889 9210
8890 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 9211 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
8891 { 9212 {
8892 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); 9213 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodClampUnsignedShortArg");
9214
9215 TestObject* impl = V8TestObject::toImpl(info.Holder());
9216
8893 if (UNLIKELY(info.Length() < 1)) { 9217 if (UNLIKELY(info.Length() < 1)) {
8894 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 9218 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
8895 return; 9219 return;
8896 } 9220 }
8897 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9221
8898 unsigned clampUnsignedShortArg; 9222 unsigned clampUnsignedShortArg;
8899 { 9223 clampUnsignedShortArg = toUInt16(info.GetIsolate(), info[0], Clamp, exceptio nState);
8900 clampUnsignedShortArg = toUInt16(info.GetIsolate(), info[0], Clamp, exce ptionState); 9224 if (exceptionState.hadException())
8901 if (exceptionState.hadException()) 9225 return;
8902 return; 9226
8903 }
8904 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); 9227 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg);
8905 } 9228 }
8906 9229
8907 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 9230 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
8908 { 9231 {
8909 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); 9232 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info);
8910 } 9233 }
8911 9234
8912 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 9235 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
8913 { 9236 {
8914 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); 9237 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodClampUnsignedLongArg");
9238
9239 TestObject* impl = V8TestObject::toImpl(info.Holder());
9240
8915 if (UNLIKELY(info.Length() < 1)) { 9241 if (UNLIKELY(info.Length() < 1)) {
8916 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 9242 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
8917 return; 9243 return;
8918 } 9244 }
8919 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9245
8920 unsigned clampUnsignedLongArg; 9246 unsigned clampUnsignedLongArg;
8921 { 9247 clampUnsignedLongArg = toUInt32(info.GetIsolate(), info[0], Clamp, exception State);
8922 clampUnsignedLongArg = toUInt32(info.GetIsolate(), info[0], Clamp, excep tionState); 9248 if (exceptionState.hadException())
8923 if (exceptionState.hadException()) 9249 return;
8924 return; 9250
8925 }
8926 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); 9251 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg);
8927 } 9252 }
8928 9253
8929 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 9254 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
8930 { 9255 {
8931 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); 9256 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info);
8932 } 9257 }
8933 9258
8934 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 9259 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
8935 { 9260 {
8936 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9261 TestObject* impl = V8TestObject::toImpl(info.Holder());
9262
8937 TestInterfaceEmpty* defaultUndefinedTestInterfaceEmptyArg; 9263 TestInterfaceEmpty* defaultUndefinedTestInterfaceEmptyArg;
8938 { 9264 defaultUndefinedTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithType Check(info.GetIsolate(), info[0]);
8939 defaultUndefinedTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWith TypeCheck(info.GetIsolate(), info[0]); 9265 if (!defaultUndefinedTestInterfaceEmptyArg) {
8940 if (!defaultUndefinedTestInterfaceEmptyArg) { 9266 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodDefaultUndefinedTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."));
8941 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodDefaultUndefinedTestInterfaceEmptyArg", "TestObjec t", "parameter 1 is not of type 'TestInterfaceEmpty'.")); 9267
8942 return; 9268 return;
8943 }
8944 } 9269 }
9270
8945 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn terfaceEmptyArg); 9271 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn terfaceEmptyArg);
8946 } 9272 }
8947 9273
8948 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 9274 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8949 { 9275 {
8950 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod( info); 9276 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod( info);
8951 } 9277 }
8952 9278
8953 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info) 9279 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
8954 { 9280 {
8955 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); 9281 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodDefaultUndefinedLongArg");
9282
8956 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9283 TestObject* impl = V8TestObject::toImpl(info.Holder());
9284
8957 int defaultUndefinedLongArg; 9285 int defaultUndefinedLongArg;
8958 { 9286 defaultUndefinedLongArg = toInt32(info.GetIsolate(), info[0], NormalConversi on, exceptionState);
8959 defaultUndefinedLongArg = toInt32(info.GetIsolate(), info[0], NormalConv ersion, exceptionState); 9287 if (exceptionState.hadException())
8960 if (exceptionState.hadException()) 9288 return;
8961 return; 9289
8962 }
8963 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); 9290 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg);
8964 } 9291 }
8965 9292
8966 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 9293 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
8967 { 9294 {
8968 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); 9295 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info);
8969 } 9296 }
8970 9297
8971 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback Info<v8::Value>& info) 9298 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback Info<v8::Value>& info)
8972 { 9299 {
8973 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9300 TestObject* impl = V8TestObject::toImpl(info.Holder());
9301
8974 V8StringResource<> defaultUndefinedStringArg; 9302 V8StringResource<> defaultUndefinedStringArg;
8975 { 9303 defaultUndefinedStringArg = info[0];
8976 defaultUndefinedStringArg = info[0]; 9304 if (!defaultUndefinedStringArg.prepare())
8977 if (!defaultUndefinedStringArg.prepare()) 9305 return;
8978 return; 9306
8979 }
8980 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); 9307 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg);
8981 } 9308 }
8982 9309
8983 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 9310 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
8984 { 9311 {
8985 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); 9312 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info);
8986 } 9313 }
8987 9314
8988 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 9315 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
8989 { 9316 {
8990 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); 9317 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodEnforceRangeLongArg");
9318
9319 TestObject* impl = V8TestObject::toImpl(info.Holder());
9320
8991 if (UNLIKELY(info.Length() < 1)) { 9321 if (UNLIKELY(info.Length() < 1)) {
8992 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 9322 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
8993 return; 9323 return;
8994 } 9324 }
8995 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9325
8996 int enforceRangeLongArg; 9326 int enforceRangeLongArg;
8997 { 9327 enforceRangeLongArg = toInt32(info.GetIsolate(), info[0], EnforceRange, exce ptionState);
8998 enforceRangeLongArg = toInt32(info.GetIsolate(), info[0], EnforceRange, exceptionState); 9328 if (exceptionState.hadException())
8999 if (exceptionState.hadException()) 9329 return;
9000 return; 9330
9001 }
9002 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); 9331 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg);
9003 } 9332 }
9004 9333
9005 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 9334 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
9006 { 9335 {
9007 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); 9336 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info);
9008 } 9337 }
9009 9338
9010 static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info) 9339 static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
9011 { 9340 {
9341 TestObject* impl = V8TestObject::toImpl(info.Holder());
9342
9012 if (UNLIKELY(info.Length() < 1)) { 9343 if (UNLIKELY(info.Length() < 1)) {
9013 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodT reatNullAsEmptyStringStringArg", "TestObject", ExceptionMessages::notEnoughArgum ents(1, info.Length())))); 9344 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTreatNullAsEmptyStringStringArg", "TestObject", Except ionMessages::notEnoughArguments(1, info.Length())));
9014 return; 9345 return;
9015 } 9346 }
9016 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9347
9017 V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg; 9348 V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg;
9018 { 9349 treatNullAsEmptyStringStringArg = info[0];
9019 treatNullAsEmptyStringStringArg = info[0]; 9350 if (!treatNullAsEmptyStringStringArg.prepare())
9020 if (!treatNullAsEmptyStringStringArg.prepare()) 9351 return;
9021 return; 9352
9022 }
9023 impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringString Arg); 9353 impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringString Arg);
9024 } 9354 }
9025 9355
9026 static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 9356 static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
9027 { 9357 {
9028 TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info); 9358 TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info);
9029 } 9359 }
9030 9360
9031 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 9361 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
9032 { 9362 {
9363 TestObject* impl = V8TestObject::toImpl(info.Holder());
9364
9033 if (UNLIKELY(info.Length() < 1)) { 9365 if (UNLIKELY(info.Length() < 1)) {
9034 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodT reatNullAsNullStringStringArg", "TestObject", ExceptionMessages::notEnoughArgume nts(1, info.Length())))); 9366 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTreatNullAsNullStringStringArg", "TestObject", Excepti onMessages::notEnoughArguments(1, info.Length())));
9035 return; 9367 return;
9036 } 9368 }
9037 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9369
9038 V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg; 9370 V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg;
9039 { 9371 treatNullAsNullStringStringArg = info[0];
9040 treatNullAsNullStringStringArg = info[0]; 9372 if (!treatNullAsNullStringStringArg.prepare())
9041 if (!treatNullAsNullStringStringArg.prepare()) 9373 return;
9042 return; 9374
9043 }
9044 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr g); 9375 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr g);
9045 } 9376 }
9046 9377
9047 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 9378 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
9048 { 9379 {
9049 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info); 9380 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info);
9050 } 9381 }
9051 9382
9052 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thod(const v8::FunctionCallbackInfo<v8::Value>& info) 9383 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thod(const v8::FunctionCallbackInfo<v8::Value>& info)
9053 { 9384 {
9385 TestObject* impl = V8TestObject::toImpl(info.Holder());
9386
9054 if (UNLIKELY(info.Length() < 1)) { 9387 if (UNLIKELY(info.Length() < 1)) {
9055 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodT reatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject", Exceptio nMessages::notEnoughArguments(1, info.Length())))); 9388 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringA rg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())));
9056 return; 9389 return;
9057 } 9390 }
9058 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9391
9059 V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStr ingArg; 9392 V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStr ingArg;
9060 { 9393 treatNullAsNullStringStringArg = info[0];
9061 treatNullAsNullStringStringArg = info[0]; 9394 if (!treatNullAsNullStringStringArg.prepare())
9062 if (!treatNullAsNullStringStringArg.prepare()) 9395 return;
9063 return; 9396
9064 }
9065 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre atNullAsNullStringStringArg); 9397 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre atNullAsNullStringStringArg);
9066 } 9398 }
9067 9399
9068 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 9400 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
9069 { 9401 {
9070 TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStr ingStringArgMethod(info); 9402 TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStr ingStringArgMethod(info);
9071 } 9403 }
9072 9404
9073 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info) 9405 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
9074 { 9406 {
9075 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9407 TestObject* impl = V8TestObject::toImpl(info.Holder());
9408
9076 impl->activityLoggingAccessForAllWorldsMethod(); 9409 impl->activityLoggingAccessForAllWorldsMethod();
9077 } 9410 }
9078 9411
9079 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 9412 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
9080 { 9413 {
9081 ScriptState* scriptState = ScriptState::forReceiverObject(info); 9414 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9082 V8PerContextData* contextData = scriptState->perContextData(); 9415 V8PerContextData* contextData = scriptState->perContextData();
9083 if (contextData && contextData->activityLogger()) { 9416 if (contextData && contextData->activityLogger()) {
9084 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit yLoggingAccessForAllWorldsMethod", "TestObject", info.Holder(), info.GetIsolate( )); 9417 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Executi onContext, "TestObject", "activityLoggingAccessForAllWorldsMethod");
9085 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState); 9418 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState);
9086 contextData->activityLogger()->logMethod("TestObject.activityLoggingAcce ssForAllWorldsMethod", info.Length(), loggerArgs.data()); 9419 contextData->activityLogger()->logMethod("TestObject.activityLoggingAcce ssForAllWorldsMethod", info.Length(), loggerArgs.data());
9087 } 9420 }
9088 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); 9421 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info);
9089 } 9422 }
9090 9423
9091 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 9424 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
9092 { 9425 {
9093 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9426 TestObject* impl = V8TestObject::toImpl(info.Holder());
9427
9094 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 9428 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
9095 impl->callWithExecutionContextVoidMethod(executionContext); 9429 impl->callWithExecutionContextVoidMethod(executionContext);
9096 } 9430 }
9097 9431
9098 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 9432 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
9099 { 9433 {
9100 TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info); 9434 TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info);
9101 } 9435 }
9102 9436
9103 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 9437 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
9104 { 9438 {
9105 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9439 TestObject* impl = V8TestObject::toImpl(info.Holder());
9440
9106 ScriptState* scriptState = ScriptState::forReceiverObject(info); 9441 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9442
9107 impl->callWithScriptStateVoidMethod(scriptState); 9443 impl->callWithScriptStateVoidMethod(scriptState);
9108 } 9444 }
9109 9445
9110 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 9446 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
9111 { 9447 {
9112 TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info); 9448 TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info);
9113 } 9449 }
9114 9450
9115 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info) 9451 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
9116 { 9452 {
9117 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9453 TestObject* impl = V8TestObject::toImpl(info.Holder());
9454
9118 ScriptState* scriptState = ScriptState::forReceiverObject(info); 9455 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9456
9119 int result = impl->callWithScriptStateLongMethod(scriptState); 9457 int result = impl->callWithScriptStateLongMethod(scriptState);
9120 v8SetReturnValueInt(info, result); 9458 v8SetReturnValueInt(info, result);
9121 } 9459 }
9122 9460
9123 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info) 9461 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
9124 { 9462 {
9125 TestObjectV8Internal::callWithScriptStateLongMethodMethod(info); 9463 TestObjectV8Internal::callWithScriptStateLongMethodMethod(info);
9126 } 9464 }
9127 9465
9128 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info) 9466 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info)
9129 { 9467 {
9130 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9468 TestObject* impl = V8TestObject::toImpl(info.Holder());
9469
9131 ScriptState* scriptState = ScriptState::forReceiverObject(info); 9470 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9471
9132 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 9472 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
9133 impl->callWithScriptStateExecutionContextVoidMethod(scriptState, executionCo ntext); 9473 impl->callWithScriptStateExecutionContextVoidMethod(scriptState, executionCo ntext);
9134 } 9474 }
9135 9475
9136 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info) 9476 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
9137 { 9477 {
9138 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in fo); 9478 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(in fo);
9139 } 9479 }
9140 9480
9141 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info) 9481 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
9142 { 9482 {
9143 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9483 TestObject* impl = V8TestObject::toImpl(info.Holder());
9484
9144 ScriptState* scriptState = ScriptState::forReceiverObject(info); 9485 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9486
9145 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 0)); 9487 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 0));
9146 impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArgume nts); 9488 impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArgume nts);
9147 } 9489 }
9148 9490
9149 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info) 9491 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
9150 { 9492 {
9151 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf o); 9493 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf o);
9152 } 9494 }
9153 9495
9154 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod (const v8::FunctionCallbackInfo<v8::Value>& info) 9496 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod (const v8::FunctionCallbackInfo<v8::Value>& info)
9155 { 9497 {
9156 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithScr iptStateScriptArgumentsVoidMethodOptionalBooleanArg", "TestObject", info.Holder( ), info.GetIsolate()); 9498 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "callWithScriptStateScriptArgumentsVoidMethodOptionalBoolea nArg");
9499
9157 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9500 TestObject* impl = V8TestObject::toImpl(info.Holder());
9501
9502 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9503
9158 bool optionalBooleanArg; 9504 bool optionalBooleanArg;
9159 { 9505 int numArgsPassed = info.Length();
9160 int numArgsPassed = info.Length(); 9506 while (numArgsPassed > 0) {
9161 while (numArgsPassed > 0) { 9507 if (!info[numArgsPassed - 1]->IsUndefined())
9162 if (!info[numArgsPassed - 1]->IsUndefined()) 9508 break;
9163 break; 9509 --numArgsPassed;
9164 --numArgsPassed;
9165 }
9166 if (UNLIKELY(numArgsPassed <= 0)) {
9167 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9168 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState , info, 1));
9169 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg (scriptState, scriptArguments);
9170 return;
9171 }
9172 optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionStat e);
9173 if (exceptionState.hadException())
9174 return;
9175 } 9510 }
9176 ScriptState* scriptState = ScriptState::forReceiverObject(info); 9511 if (UNLIKELY(numArgsPassed <= 0)) {
9512 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, in fo, 1));
9513 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scr iptState, scriptArguments);
9514 return;
9515 }
9516 optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState);
9517 if (exceptionState.hadException())
9518 return;
9519
9177 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 1)); 9520 ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 1));
9178 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS tate, scriptArguments, optionalBooleanArg); 9521 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS tate, scriptArguments, optionalBooleanArg);
9179 } 9522 }
9180 9523
9181 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod Callback(const v8::FunctionCallbackInfo<v8::Value>& info) 9524 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod Callback(const v8::FunctionCallbackInfo<v8::Value>& info)
9182 { 9525 {
9183 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo oleanArgMethod(info); 9526 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo oleanArgMethod(info);
9184 } 9527 }
9185 9528
9186 static void callWithCurrentWindowMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 9529 static void callWithCurrentWindowMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
9187 { 9530 {
9188 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9531 TestObject* impl = V8TestObject::toImpl(info.Holder());
9532
9189 impl->callWithCurrentWindow(currentDOMWindow(info.GetIsolate())); 9533 impl->callWithCurrentWindow(currentDOMWindow(info.GetIsolate()));
9190 } 9534 }
9191 9535
9192 static void callWithCurrentWindowMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 9536 static void callWithCurrentWindowMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
9193 { 9537 {
9194 TestObjectV8Internal::callWithCurrentWindowMethod(info); 9538 TestObjectV8Internal::callWithCurrentWindowMethod(info);
9195 } 9539 }
9196 9540
9197 static void callWithCurrentWindowScriptWindowMethod(const v8::FunctionCallbackIn fo<v8::Value>& info) 9541 static void callWithCurrentWindowScriptWindowMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
9198 { 9542 {
9199 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9543 TestObject* impl = V8TestObject::toImpl(info.Holder());
9544
9200 impl->callWithCurrentWindowScriptWindow(currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate())); 9545 impl->callWithCurrentWindowScriptWindow(currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()));
9201 } 9546 }
9202 9547
9203 static void callWithCurrentWindowScriptWindowMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info) 9548 static void callWithCurrentWindowScriptWindowMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
9204 { 9549 {
9205 TestObjectV8Internal::callWithCurrentWindowScriptWindowMethod(info); 9550 TestObjectV8Internal::callWithCurrentWindowScriptWindowMethod(info);
9206 } 9551 }
9207 9552
9208 static void callWithThisValueMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 9553 static void callWithThisValueMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
9209 { 9554 {
9210 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9555 TestObject* impl = V8TestObject::toImpl(info.Holder());
9556
9211 ScriptState* scriptState = ScriptState::forReceiverObject(info); 9557 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9558
9212 impl->callWithThisValue(ScriptValue(scriptState, info.Holder())); 9559 impl->callWithThisValue(ScriptValue(scriptState, info.Holder()));
9213 } 9560 }
9214 9561
9215 static void callWithThisValueMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 9562 static void callWithThisValueMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
9216 { 9563 {
9217 TestObjectV8Internal::callWithThisValueMethod(info); 9564 TestObjectV8Internal::callWithThisValueMethod(info);
9218 } 9565 }
9219 9566
9220 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 9567 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
9221 { 9568 {
9222 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9569 TestObject* impl = V8TestObject::toImpl(info.Holder());
9570
9571 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "checkSecurityForNodeVoidMethod");
9223 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate() ), impl->checkSecurityForNodeVoidMethod(), exceptionState)) { 9572 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate() ), impl->checkSecurityForNodeVoidMethod(), exceptionState)) {
9224 v8SetReturnValueNull(info); 9573 v8SetReturnValueNull(info);
9225 return; 9574 return;
9226 } 9575 }
9576
9227 impl->checkSecurityForNodeVoidMethod(); 9577 impl->checkSecurityForNodeVoidMethod();
9228 } 9578 }
9229 9579
9230 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 9580 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
9231 { 9581 {
9232 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); 9582 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info);
9233 } 9583 }
9234 9584
9235 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 9585 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
9236 { 9586 {
9237 V8TestObject::customVoidMethodMethodCustom(info); 9587 V8TestObject::customVoidMethodMethodCustom(info);
9238 } 9588 }
9239 9589
9240 static void customCallPrologueVoidMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 9590 static void customCallPrologueVoidMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
9241 { 9591 {
9242 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9592 TestObject* impl = V8TestObject::toImpl(info.Holder());
9593
9243 V8TestObject::customCallPrologueVoidMethodMethodPrologueCustom(info, impl); 9594 V8TestObject::customCallPrologueVoidMethodMethodPrologueCustom(info, impl);
9244 impl->customCallPrologueVoidMethod(); 9595 impl->customCallPrologueVoidMethod();
9245 } 9596 }
9246 9597
9247 static void customCallPrologueVoidMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 9598 static void customCallPrologueVoidMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
9248 { 9599 {
9249 TestObjectV8Internal::customCallPrologueVoidMethodMethod(info); 9600 TestObjectV8Internal::customCallPrologueVoidMethodMethod(info);
9250 } 9601 }
9251 9602
9252 static void customCallEpilogueVoidMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 9603 static void customCallEpilogueVoidMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
9253 { 9604 {
9254 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9605 TestObject* impl = V8TestObject::toImpl(info.Holder());
9606
9255 impl->customCallEpilogueVoidMethod(); 9607 impl->customCallEpilogueVoidMethod();
9256 V8TestObject::customCallEpilogueVoidMethodMethodEpilogueCustom(info, impl); 9608 V8TestObject::customCallEpilogueVoidMethodMethodEpilogueCustom(info, impl);
9257 } 9609 }
9258 9610
9259 static void customCallEpilogueVoidMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 9611 static void customCallEpilogueVoidMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
9260 { 9612 {
9261 TestObjectV8Internal::customCallEpilogueVoidMethodMethod(info); 9613 TestObjectV8Internal::customCallEpilogueVoidMethodMethod(info);
9262 } 9614 }
9263 9615
9264 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info) 9616 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
9265 { 9617 {
9266 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9618 TestObject* impl = V8TestObject::toImpl(info.Holder());
9619
9267 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 9620 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
9621
9268 impl->customElementCallbacksVoidMethod(); 9622 impl->customElementCallbacksVoidMethod();
9269 } 9623 }
9270 9624
9271 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) 9625 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
9272 { 9626 {
9273 TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info); 9627 TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info);
9274 } 9628 }
9275 9629
9276 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 9630 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
9277 { 9631 {
9278 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9632 TestObject* impl = V8TestObject::toImpl(info.Holder());
9633
9279 impl->deprecatedVoidMethod(); 9634 impl->deprecatedVoidMethod();
9280 } 9635 }
9281 9636
9282 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 9637 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
9283 { 9638 {
9284 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::voidMethod); 9639 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::voidMethod);
9285 TestObjectV8Internal::deprecatedVoidMethodMethod(info); 9640 TestObjectV8Internal::deprecatedVoidMethodMethod(info);
9286 } 9641 }
9287 9642
9288 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 9643 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
9289 { 9644 {
9290 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9645 TestObject* impl = V8TestObject::toImpl(info.Holder());
9646
9291 impl->implementedAsMethodName(); 9647 impl->implementedAsMethodName();
9292 } 9648 }
9293 9649
9294 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 9650 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
9295 { 9651 {
9296 TestObjectV8Internal::implementedAsVoidMethodMethod(info); 9652 TestObjectV8Internal::implementedAsVoidMethodMethod(info);
9297 } 9653 }
9298 9654
9299 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 9655 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
9300 { 9656 {
9301 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9657 TestObject* impl = V8TestObject::toImpl(info.Holder());
9658
9302 impl->measureAsVoidMethod(); 9659 impl->measureAsVoidMethod();
9303 } 9660 }
9304 9661
9305 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 9662 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
9306 { 9663 {
9307 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::TestFeature); 9664 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::TestFeature);
9308 TestObjectV8Internal::measureAsVoidMethodMethod(info); 9665 TestObjectV8Internal::measureAsVoidMethodMethod(info);
9309 } 9666 }
9310 9667
9311 static void measureMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 9668 static void measureMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
9312 { 9669 {
9313 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9670 TestObject* impl = V8TestObject::toImpl(info.Holder());
9671
9314 impl->measureMethod(); 9672 impl->measureMethod();
9315 } 9673 }
9316 9674
9317 static void measureMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info) 9675 static void measureMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
9318 { 9676 {
9319 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::V8TestObject_MeasureMethod_Method); 9677 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::V8TestObject_MeasureMethod_Method);
9320 TestObjectV8Internal::measureMethodMethod(info); 9678 TestObjectV8Internal::measureMethodMethod(info);
9321 } 9679 }
9322 9680
9323 static void measureOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Va lue>& info) 9681 static void measureOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Va lue>& info)
9324 { 9682 {
9325 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9683 TestObject* impl = V8TestObject::toImpl(info.Holder());
9684
9326 impl->measureOverloadedMethod(); 9685 impl->measureOverloadedMethod();
9327 } 9686 }
9328 9687
9329 static void measureOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Va lue>& info) 9688 static void measureOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Va lue>& info)
9330 { 9689 {
9331 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOver loadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9690 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "measureOverloadedMethod");
9691
9332 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9692 TestObject* impl = V8TestObject::toImpl(info.Holder());
9693
9333 int arg; 9694 int arg;
9334 { 9695 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9335 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 9696 if (exceptionState.hadException())
9336 if (exceptionState.hadException()) 9697 return;
9337 return; 9698
9338 }
9339 impl->measureOverloadedMethod(arg); 9699 impl->measureOverloadedMethod(arg);
9340 } 9700 }
9341 9701
9342 static void measureOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 9702 static void measureOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
9343 { 9703 {
9344 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOver loadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9704 bool isArityError = false;
9345 switch (std::min(1, info.Length())) { 9705 switch (std::min(1, info.Length())) {
9346 case 0: 9706 case 0:
9347 if (true) { 9707 if (true) {
9348 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_ Method); 9708 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_ Method);
9349 measureOverloadedMethod1Method(info); 9709 measureOverloadedMethod1Method(info);
9350 return; 9710 return;
9351 } 9711 }
9352 break; 9712 break;
9353 case 1: 9713 case 1:
9354 if (true) { 9714 if (true) {
9355 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_ Method); 9715 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_ Method);
9356 measureOverloadedMethod2Method(info); 9716 measureOverloadedMethod2Method(info);
9357 return; 9717 return;
9358 } 9718 }
9359 break; 9719 break;
9360 default: 9720 default:
9361 break; 9721 isArityError = true;
9722 }
9723
9724 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "measureOverloadedMethod");
9725
9726 if (isArityError) {
9362 } 9727 }
9363 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9728 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9364 return;
9365 } 9729 }
9366 9730
9367 static void measureOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 9731 static void measureOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
9368 { 9732 {
9369 TestObjectV8Internal::measureOverloadedMethodMethod(info); 9733 TestObjectV8Internal::measureOverloadedMethodMethod(info);
9370 } 9734 }
9371 9735
9372 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 9736 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
9373 { 9737 {
9374 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9738 TestObject* impl = V8TestObject::toImpl(info.Holder());
9739
9375 impl->DeprecateAsOverloadedMethod(); 9740 impl->DeprecateAsOverloadedMethod();
9376 } 9741 }
9377 9742
9378 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8 ::Value>& info) 9743 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8 ::Value>& info)
9379 { 9744 {
9380 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9745 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "DeprecateAsOverloadedMethod");
9746
9381 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9747 TestObject* impl = V8TestObject::toImpl(info.Holder());
9748
9382 int arg; 9749 int arg;
9383 { 9750 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9384 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 9751 if (exceptionState.hadException())
9385 if (exceptionState.hadException()) 9752 return;
9386 return; 9753
9387 }
9388 impl->DeprecateAsOverloadedMethod(arg); 9754 impl->DeprecateAsOverloadedMethod(arg);
9389 } 9755 }
9390 9756
9391 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 9757 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
9392 { 9758 {
9393 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs OverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9759 bool isArityError = false;
9394 switch (std::min(1, info.Length())) { 9760 switch (std::min(1, info.Length())) {
9395 case 0: 9761 case 0:
9396 if (true) { 9762 if (true) {
9397 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); 9763 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
9398 DeprecateAsOverloadedMethod1Method(info); 9764 DeprecateAsOverloadedMethod1Method(info);
9399 return; 9765 return;
9400 } 9766 }
9401 break; 9767 break;
9402 case 1: 9768 case 1:
9403 if (true) { 9769 if (true) {
9404 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); 9770 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
9405 DeprecateAsOverloadedMethod2Method(info); 9771 DeprecateAsOverloadedMethod2Method(info);
9406 return; 9772 return;
9407 } 9773 }
9408 break; 9774 break;
9409 default: 9775 default:
9410 break; 9776 isArityError = true;
9777 }
9778
9779 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "DeprecateAsOverloadedMethod");
9780
9781 if (isArityError) {
9411 } 9782 }
9412 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9783 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9413 return;
9414 } 9784 }
9415 9785
9416 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 9786 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
9417 { 9787 {
9418 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info); 9788 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info);
9419 } 9789 }
9420 9790
9421 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallba ckInfo<v8::Value>& info) 9791 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallba ckInfo<v8::Value>& info)
9422 { 9792 {
9423 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9793 TestObject* impl = V8TestObject::toImpl(info.Holder());
9794
9424 impl->DeprecateAsSameValueOverloadedMethod(); 9795 impl->DeprecateAsSameValueOverloadedMethod();
9425 } 9796 }
9426 9797
9427 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba ckInfo<v8::Value>& info) 9798 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallba ckInfo<v8::Value>& info)
9428 { 9799 {
9429 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9800 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "DeprecateAsSameValueOverloadedMethod");
9801
9430 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9802 TestObject* impl = V8TestObject::toImpl(info.Holder());
9803
9431 int arg; 9804 int arg;
9432 { 9805 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9433 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 9806 if (exceptionState.hadException())
9434 if (exceptionState.hadException()) 9807 return;
9435 return; 9808
9436 }
9437 impl->DeprecateAsSameValueOverloadedMethod(arg); 9809 impl->DeprecateAsSameValueOverloadedMethod(arg);
9438 } 9810 }
9439 9811
9440 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 9812 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
9441 { 9813 {
9442 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAs SameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
9443 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::TestFeature); 9814 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::TestFeature);
9815
9816 bool isArityError = false;
9444 switch (std::min(1, info.Length())) { 9817 switch (std::min(1, info.Length())) {
9445 case 0: 9818 case 0:
9446 if (true) { 9819 if (true) {
9447 DeprecateAsSameValueOverloadedMethod1Method(info); 9820 DeprecateAsSameValueOverloadedMethod1Method(info);
9448 return; 9821 return;
9449 } 9822 }
9450 break; 9823 break;
9451 case 1: 9824 case 1:
9452 if (true) { 9825 if (true) {
9453 DeprecateAsSameValueOverloadedMethod2Method(info); 9826 DeprecateAsSameValueOverloadedMethod2Method(info);
9454 return; 9827 return;
9455 } 9828 }
9456 break; 9829 break;
9457 default: 9830 default:
9458 break; 9831 isArityError = true;
9832 }
9833
9834 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "DeprecateAsSameValueOverloadedMethod");
9835
9836 if (isArityError) {
9459 } 9837 }
9460 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9838 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9461 return;
9462 } 9839 }
9463 9840
9464 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 9841 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
9465 { 9842 {
9466 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info); 9843 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info);
9467 } 9844 }
9468 9845
9469 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 9846 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
9470 { 9847 {
9471 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9848 TestObject* impl = V8TestObject::toImpl(info.Holder());
9849
9472 impl->measureAsOverloadedMethod(); 9850 impl->measureAsOverloadedMethod();
9473 } 9851 }
9474 9852
9475 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 9853 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
9476 { 9854 {
9477 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9855 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "measureAsOverloadedMethod");
9856
9478 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9857 TestObject* impl = V8TestObject::toImpl(info.Holder());
9858
9479 int arg; 9859 int arg;
9480 { 9860 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9481 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 9861 if (exceptionState.hadException())
9482 if (exceptionState.hadException()) 9862 return;
9483 return; 9863
9484 }
9485 impl->measureAsOverloadedMethod(arg); 9864 impl->measureAsOverloadedMethod(arg);
9486 } 9865 }
9487 9866
9488 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 9867 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
9489 { 9868 {
9490 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOv erloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9869 bool isArityError = false;
9491 switch (std::min(1, info.Length())) { 9870 switch (std::min(1, info.Length())) {
9492 case 0: 9871 case 0:
9493 if (true) { 9872 if (true) {
9494 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureA); 9873 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureA);
9495 measureAsOverloadedMethod1Method(info); 9874 measureAsOverloadedMethod1Method(info);
9496 return; 9875 return;
9497 } 9876 }
9498 break; 9877 break;
9499 case 1: 9878 case 1:
9500 if (true) { 9879 if (true) {
9501 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB); 9880 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB);
9502 measureAsOverloadedMethod2Method(info); 9881 measureAsOverloadedMethod2Method(info);
9503 return; 9882 return;
9504 } 9883 }
9505 break; 9884 break;
9506 default: 9885 default:
9507 break; 9886 isArityError = true;
9887 }
9888
9889 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "measureAsOverloadedMethod");
9890
9891 if (isArityError) {
9508 } 9892 }
9509 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9893 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9510 return;
9511 } 9894 }
9512 9895
9513 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 9896 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
9514 { 9897 {
9515 TestObjectV8Internal::measureAsOverloadedMethodMethod(info); 9898 TestObjectV8Internal::measureAsOverloadedMethodMethod(info);
9516 } 9899 }
9517 9900
9518 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallback Info<v8::Value>& info) 9901 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallback Info<v8::Value>& info)
9519 { 9902 {
9520 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9903 TestObject* impl = V8TestObject::toImpl(info.Holder());
9904
9521 impl->measureAsSameValueOverloadedMethod(); 9905 impl->measureAsSameValueOverloadedMethod();
9522 } 9906 }
9523 9907
9524 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback Info<v8::Value>& info) 9908 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallback Info<v8::Value>& info)
9525 { 9909 {
9526 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9910 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "measureAsSameValueOverloadedMethod");
9911
9527 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9912 TestObject* impl = V8TestObject::toImpl(info.Holder());
9913
9528 int arg; 9914 int arg;
9529 { 9915 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9530 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 9916 if (exceptionState.hadException())
9531 if (exceptionState.hadException()) 9917 return;
9532 return; 9918
9533 }
9534 impl->measureAsSameValueOverloadedMethod(arg); 9919 impl->measureAsSameValueOverloadedMethod(arg);
9535 } 9920 }
9536 9921
9537 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 9922 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
9538 { 9923 {
9539 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSa meValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); 9924 bool isArityError = false;
9540 switch (std::min(1, info.Length())) { 9925 switch (std::min(1, info.Length())) {
9541 case 0: 9926 case 0:
9542 if (true) { 9927 if (true) {
9543 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature); 9928 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature);
9544 measureAsSameValueOverloadedMethod1Method(info); 9929 measureAsSameValueOverloadedMethod1Method(info);
9545 return; 9930 return;
9546 } 9931 }
9547 break; 9932 break;
9548 case 1: 9933 case 1:
9549 if (true) { 9934 if (true) {
9550 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature); 9935 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature);
9551 measureAsSameValueOverloadedMethod2Method(info); 9936 measureAsSameValueOverloadedMethod2Method(info);
9552 return; 9937 return;
9553 } 9938 }
9554 break; 9939 break;
9555 default: 9940 default:
9556 break; 9941 isArityError = true;
9942 }
9943
9944 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "measureAsSameValueOverloadedMethod");
9945
9946 if (isArityError) {
9557 } 9947 }
9558 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 9948 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9559 return;
9560 } 9949 }
9561 9950
9562 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 9951 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
9563 { 9952 {
9564 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info); 9953 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info);
9565 } 9954 }
9566 9955
9567 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::Funct ionCallbackInfo<v8::Value>& info) 9956 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::Funct ionCallbackInfo<v8::Value>& info)
9568 { 9957 {
9569 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9958 TestObject* impl = V8TestObject::toImpl(info.Holder());
9959
9570 impl->deprecateAsMeasureAsSameValueOverloadedMethod(); 9960 impl->deprecateAsMeasureAsSameValueOverloadedMethod();
9571 } 9961 }
9572 9962
9573 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct ionCallbackInfo<v8::Value>& info) 9963 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::Funct ionCallbackInfo<v8::Value>& info)
9574 { 9964 {
9575 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat e()); 9965 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "deprecateAsMeasureAsSameValueOverloadedMethod");
9966
9576 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9967 TestObject* impl = V8TestObject::toImpl(info.Holder());
9968
9577 int arg; 9969 int arg;
9578 { 9970 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9579 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 9971 if (exceptionState.hadException())
9580 if (exceptionState.hadException()) 9972 return;
9581 return; 9973
9582 }
9583 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); 9974 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg);
9584 } 9975 }
9585 9976
9586 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info) 9977 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info)
9587 { 9978 {
9588 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs MeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat e()); 9979 bool isArityError = false;
9589 switch (std::min(1, info.Length())) { 9980 switch (std::min(1, info.Length())) {
9590 case 0: 9981 case 0:
9591 if (true) { 9982 if (true) {
9592 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature); 9983 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature);
9593 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); 9984 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
9594 deprecateAsMeasureAsSameValueOverloadedMethod1Method(info); 9985 deprecateAsMeasureAsSameValueOverloadedMethod1Method(info);
9595 return; 9986 return;
9596 } 9987 }
9597 break; 9988 break;
9598 case 1: 9989 case 1:
9599 if (true) { 9990 if (true) {
9600 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature); 9991 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeature);
9601 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); 9992 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), c urrentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
9602 deprecateAsMeasureAsSameValueOverloadedMethod2Method(info); 9993 deprecateAsMeasureAsSameValueOverloadedMethod2Method(info);
9603 return; 9994 return;
9604 } 9995 }
9605 break; 9996 break;
9606 default: 9997 default:
9607 break; 9998 isArityError = true;
9999 }
10000
10001 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "deprecateAsMeasureAsSameValueOverloadedMethod");
10002
10003 if (isArityError) {
9608 } 10004 }
9609 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 10005 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9610 return;
9611 } 10006 }
9612 10007
9613 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info) 10008 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
9614 { 10009 {
9615 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(in fo); 10010 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(in fo);
9616 } 10011 }
9617 10012
9618 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::Funct ionCallbackInfo<v8::Value>& info) 10013 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::Funct ionCallbackInfo<v8::Value>& info)
9619 { 10014 {
9620 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10015 TestObject* impl = V8TestObject::toImpl(info.Holder());
10016
9621 impl->deprecateAsSameValueMeasureAsOverloadedMethod(); 10017 impl->deprecateAsSameValueMeasureAsOverloadedMethod();
9622 } 10018 }
9623 10019
9624 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct ionCallbackInfo<v8::Value>& info) 10020 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::Funct ionCallbackInfo<v8::Value>& info)
9625 { 10021 {
9626 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat e()); 10022 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "deprecateAsSameValueMeasureAsOverloadedMethod");
10023
9627 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10024 TestObject* impl = V8TestObject::toImpl(info.Holder());
10025
9628 int arg; 10026 int arg;
9629 { 10027 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9630 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 10028 if (exceptionState.hadException())
9631 if (exceptionState.hadException()) 10029 return;
9632 return; 10030
9633 }
9634 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); 10031 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg);
9635 } 10032 }
9636 10033
9637 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info) 10034 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info)
9638 { 10035 {
9639 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs SameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolat e());
9640 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::TestFeature); 10036 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::TestFeature);
10037
10038 bool isArityError = false;
9641 switch (std::min(1, info.Length())) { 10039 switch (std::min(1, info.Length())) {
9642 case 0: 10040 case 0:
9643 if (true) { 10041 if (true) {
9644 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureA); 10042 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureA);
9645 deprecateAsSameValueMeasureAsOverloadedMethod1Method(info); 10043 deprecateAsSameValueMeasureAsOverloadedMethod1Method(info);
9646 return; 10044 return;
9647 } 10045 }
9648 break; 10046 break;
9649 case 1: 10047 case 1:
9650 if (true) { 10048 if (true) {
9651 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB); 10049 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB);
9652 deprecateAsSameValueMeasureAsOverloadedMethod2Method(info); 10050 deprecateAsSameValueMeasureAsOverloadedMethod2Method(info);
9653 return; 10051 return;
9654 } 10052 }
9655 break; 10053 break;
9656 default: 10054 default:
9657 break; 10055 isArityError = true;
10056 }
10057
10058 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "deprecateAsSameValueMeasureAsOverloadedMethod");
10059
10060 if (isArityError) {
9658 } 10061 }
9659 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 10062 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9660 return;
9661 } 10063 }
9662 10064
9663 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info) 10065 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
9664 { 10066 {
9665 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(in fo); 10067 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(in fo);
9666 } 10068 }
9667 10069
9668 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 10070 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
9669 { 10071 {
9670 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10072 TestObject* impl = V8TestObject::toImpl(info.Holder());
10073
9671 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); 10074 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod();
9672 } 10075 }
9673 10076
9674 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 10077 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
9675 { 10078 {
9676 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info. GetIsolate()); 10079 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "deprecateAsSameValueMeasureAsSameValueOverloadedMethod");
10080
9677 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10081 TestObject* impl = V8TestObject::toImpl(info.Holder());
10082
9678 int arg; 10083 int arg;
9679 { 10084 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
9680 arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 10085 if (exceptionState.hadException())
9681 if (exceptionState.hadException()) 10086 return;
9682 return; 10087
9683 }
9684 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); 10088 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg);
9685 } 10089 }
9686 10090
9687 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v 8::FunctionCallbackInfo<v8::Value>& info) 10091 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v 8::FunctionCallbackInfo<v8::Value>& info)
9688 { 10092 {
9689 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAs SameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info. GetIsolate());
9690 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); 10093 Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentEx ecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
10094
10095 bool isArityError = false;
9691 switch (std::min(1, info.Length())) { 10096 switch (std::min(1, info.Length())) {
9692 case 0: 10097 case 0:
9693 if (true) { 10098 if (true) {
9694 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB); 10099 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB);
9695 deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info); 10100 deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info);
9696 return; 10101 return;
9697 } 10102 }
9698 break; 10103 break;
9699 case 1: 10104 case 1:
9700 if (true) { 10105 if (true) {
9701 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB); 10106 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecut ionContext(info.GetIsolate()), UseCounter::TestFeatureB);
9702 deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info); 10107 deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info);
9703 return; 10108 return;
9704 } 10109 }
9705 break; 10110 break;
9706 default: 10111 default:
9707 break; 10112 isArityError = true;
10113 }
10114
10115 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "deprecateAsSameValueMeasureAsSameValueOverloadedMethod");
10116
10117 if (isArityError) {
9708 } 10118 }
9709 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 10119 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
9710 return;
9711 } 10120 }
9712 10121
9713 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 10122 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info)
9714 { 10123 {
9715 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethod Method(info); 10124 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethod Method(info);
9716 } 10125 }
9717 10126
9718 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 10127 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
9719 { 10128 {
9720 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10129 TestObject* impl = V8TestObject::toImpl(info.Holder());
10130
9721 impl->notEnumerableVoidMethod(); 10131 impl->notEnumerableVoidMethod();
9722 } 10132 }
9723 10133
9724 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 10134 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
9725 { 10135 {
9726 TestObjectV8Internal::notEnumerableVoidMethodMethod(info); 10136 TestObjectV8Internal::notEnumerableVoidMethodMethod(info);
9727 } 10137 }
9728 10138
9729 static void originTrialEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 10139 static void originTrialEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
9730 { 10140 {
9731 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10141 TestObject* impl = V8TestObject::toImpl(info.Holder());
10142
9732 impl->originTrialEnabledVoidMethod(); 10143 impl->originTrialEnabledVoidMethod();
9733 } 10144 }
9734 10145
9735 static void originTrialEnabledVoidMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 10146 static void originTrialEnabledVoidMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
9736 { 10147 {
9737 TestObjectV8Internal::originTrialEnabledVoidMethodMethod(info); 10148 TestObjectV8Internal::originTrialEnabledVoidMethodMethod(info);
9738 } 10149 }
9739 10150
9740 static void perWorldBindingsOriginTrialEnabledVoidMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info) 10151 static void perWorldBindingsOriginTrialEnabledVoidMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
9741 { 10152 {
9742 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10153 TestObject* impl = V8TestObject::toImpl(info.Holder());
10154
9743 impl->perWorldBindingsOriginTrialEnabledVoidMethod(); 10155 impl->perWorldBindingsOriginTrialEnabledVoidMethod();
9744 } 10156 }
9745 10157
9746 static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info) 10158 static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
9747 { 10159 {
9748 TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethod(inf o); 10160 TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethod(inf o);
9749 } 10161 }
9750 10162
9751 static void perWorldBindingsOriginTrialEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 10163 static void perWorldBindingsOriginTrialEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
9752 { 10164 {
9753 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10165 TestObject* impl = V8TestObject::toImpl(info.Holder());
10166
9754 impl->perWorldBindingsOriginTrialEnabledVoidMethod(); 10167 impl->perWorldBindingsOriginTrialEnabledVoidMethod();
9755 } 10168 }
9756 10169
9757 static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWor ld(const v8::FunctionCallbackInfo<v8::Value>& info) 10170 static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWor ld(const v8::FunctionCallbackInfo<v8::Value>& info)
9758 { 10171 {
9759 TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodForM ainWorld(info); 10172 TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodForM ainWorld(info);
9760 } 10173 }
9761 10174
9762 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info) 10175 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
9763 { 10176 {
9764 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10177 TestObject* impl = V8TestObject::toImpl(info.Holder());
10178
9765 impl->perWorldBindingsVoidMethod(); 10179 impl->perWorldBindingsVoidMethod();
9766 } 10180 }
9767 10181
9768 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 10182 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
9769 { 10183 {
9770 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); 10184 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info);
9771 } 10185 }
9772 10186
9773 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallb ackInfo<v8::Value>& info) 10187 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallb ackInfo<v8::Value>& info)
9774 { 10188 {
9775 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10189 TestObject* impl = V8TestObject::toImpl(info.Holder());
10190
9776 impl->perWorldBindingsVoidMethod(); 10191 impl->perWorldBindingsVoidMethod();
9777 } 10192 }
9778 10193
9779 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct ionCallbackInfo<v8::Value>& info) 10194 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct ionCallbackInfo<v8::Value>& info)
9780 { 10195 {
9781 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info); 10196 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info);
9782 } 10197 }
9783 10198
9784 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 10199 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
9785 { 10200 {
10201 TestObject* impl = V8TestObject::toImpl(info.Holder());
10202
9786 if (UNLIKELY(info.Length() < 1)) { 10203 if (UNLIKELY(info.Length() < 1)) {
9787 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("perWorldBin dingsVoidMethodTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoug hArguments(1, info.Length())))); 10204 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())));
9788 return; 10205 return;
9789 } 10206 }
9790 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10207
9791 TestInterfaceEmpty* testInterfaceEmptyArg; 10208 TestInterfaceEmpty* testInterfaceEmptyArg;
9792 { 10209 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[0]);
9793 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 10210 if (!testInterfaceEmptyArg) {
9794 if (!testInterfaceEmptyArg) { 10211 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."));
9795 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjec t", "parameter 1 is not of type 'TestInterfaceEmpty'.")); 10212
9796 return; 10213 return;
9797 }
9798 } 10214 }
10215
9799 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ; 10216 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ;
9800 } 10217 }
9801 10218
9802 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 10219 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
9803 { 10220 {
9804 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod( info); 10221 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod( info);
9805 } 10222 }
9806 10223
9807 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co nst v8::FunctionCallbackInfo<v8::Value>& info) 10224 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co nst v8::FunctionCallbackInfo<v8::Value>& info)
9808 { 10225 {
10226 TestObject* impl = V8TestObject::toImpl(info.Holder());
10227
9809 if (UNLIKELY(info.Length() < 1)) { 10228 if (UNLIKELY(info.Length() < 1)) {
9810 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("perWorldBin dingsVoidMethodTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoug hArguments(1, info.Length())))); 10229 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length())));
9811 return; 10230 return;
9812 } 10231 }
9813 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10232
9814 TestInterfaceEmpty* testInterfaceEmptyArg; 10233 TestInterfaceEmpty* testInterfaceEmptyArg;
9815 { 10234 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[0]);
9816 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 10235 if (!testInterfaceEmptyArg) {
9817 if (!testInterfaceEmptyArg) { 10236 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."));
9818 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjec t", "parameter 1 is not of type 'TestInterfaceEmpty'.")); 10237
9819 return; 10238 return;
9820 }
9821 } 10239 }
10240
9822 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ; 10241 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ;
9823 } 10242 }
9824 10243
9825 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain World(const v8::FunctionCallbackInfo<v8::Value>& info) 10244 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain World(const v8::FunctionCallbackInfo<v8::Value>& info)
9826 { 10245 {
9827 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF orMainWorld(info); 10246 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodF orMainWorld(info);
9828 } 10247 }
9829 10248
9830 static void postMessageImpl(const char* interfaceName, TestObject* instance, con st v8::FunctionCallbackInfo<v8::Value>& info) 10249 static void postMessageImpl(const char* interfaceName, TestObject* instance, con st v8::FunctionCallbackInfo<v8::Value>& info)
9831 { 10250 {
(...skipping 18 matching lines...) Expand all
9850 } 10269 }
9851 10270
9852 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 10271 static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
9853 { 10272 {
9854 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); 10273 postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info);
9855 } 10274 }
9856 10275
9857 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info) 10276 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info)
9858 { 10277 {
9859 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10278 TestObject* impl = V8TestObject::toImpl(info.Holder());
10279
9860 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); 10280 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
9861 } 10281 }
9862 10282
9863 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 10283 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
9864 { 10284 {
9865 ScriptState* scriptState = ScriptState::forReceiverObject(info); 10285 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9866 V8PerContextData* contextData = scriptState->perContextData(); 10286 V8PerContextData* contextData = scriptState->perContextData();
9867 if (contextData && contextData->activityLogger()) { 10287 if (contextData && contextData->activityLogger()) {
9868 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit yLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), in fo.GetIsolate()); 10288 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Executi onContext, "TestObject", "activityLoggingForAllWorldsPerWorldBindingsVoidMethod" );
9869 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState); 10289 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState);
9870 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); 10290 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
9871 } 10291 }
9872 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM ethod(info); 10292 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM ethod(info);
9873 } 10293 }
9874 10294
9875 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo rld(const v8::FunctionCallbackInfo<v8::Value>& info) 10295 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo rld(const v8::FunctionCallbackInfo<v8::Value>& info)
9876 { 10296 {
9877 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10297 TestObject* impl = V8TestObject::toImpl(info.Holder());
10298
9878 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); 10299 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
9879 } 10300 }
9880 10301
9881 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 10302 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
9882 { 10303 {
9883 ScriptState* scriptState = ScriptState::forReceiverObject(info); 10304 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9884 V8PerContextData* contextData = scriptState->perContextData(); 10305 V8PerContextData* contextData = scriptState->perContextData();
9885 if (contextData && contextData->activityLogger()) { 10306 if (contextData && contextData->activityLogger()) {
9886 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit yLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), in fo.GetIsolate()); 10307 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Executi onContext, "TestObject", "activityLoggingForAllWorldsPerWorldBindingsVoidMethod" );
9887 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState); 10308 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState);
9888 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); 10309 contextData->activityLogger()->logMethod("TestObject.activityLoggingForA llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
9889 } 10310 }
9890 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM ethodForMainWorld(info); 10311 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodM ethodForMainWorld(info);
9891 } 10312 }
9892 10313
9893 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con st v8::FunctionCallbackInfo<v8::Value>& info) 10314 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con st v8::FunctionCallbackInfo<v8::Value>& info)
9894 { 10315 {
9895 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10316 TestObject* impl = V8TestObject::toImpl(info.Holder());
10317
9896 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); 10318 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
9897 } 10319 }
9898 10320
9899 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info) 10321 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info)
9900 { 10322 {
9901 ScriptState* scriptState = ScriptState::forReceiverObject(info); 10323 ScriptState* scriptState = ScriptState::forReceiverObject(info);
9902 V8PerContextData* contextData = scriptState->perContextData(); 10324 V8PerContextData* contextData = scriptState->perContextData();
9903 if (contextData && contextData->activityLogger()) { 10325 if (contextData && contextData->activityLogger()) {
9904 ExceptionState exceptionState(ExceptionState::ExecutionContext, "activit yLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder( ), info.GetIsolate()); 10326 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Executi onContext, "TestObject", "activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe thod");
9905 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState); 10327 Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Loc al<v8::Value>>>(info, 0, exceptionState);
9906 contextData->activityLogger()->logMethod("TestObject.activityLoggingForI solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); 10328 contextData->activityLogger()->logMethod("TestObject.activityLoggingForI solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
9907 } 10329 }
9908 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe thodMethod(info); 10330 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe thodMethod(info);
9909 } 10331 }
9910 10332
9911 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 10333 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
9912 { 10334 {
9913 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10335 TestObject* impl = V8TestObject::toImpl(info.Holder());
10336
9914 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); 10337 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
9915 } 10338 }
9916 10339
9917 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 10340 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
9918 { 10341 {
9919 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe thodMethodForMainWorld(info); 10342 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMe thodMethodForMainWorld(info);
9920 } 10343 }
9921 10344
9922 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 10345 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
9923 { 10346 {
9924 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); 10347 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "raisesExceptionVoidMethod");
10348
9925 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10349 TestObject* impl = V8TestObject::toImpl(info.Holder());
10350
9926 impl->raisesExceptionVoidMethod(exceptionState); 10351 impl->raisesExceptionVoidMethod(exceptionState);
9927 if (exceptionState.hadException()) { 10352 if (exceptionState.hadException()) {
9928 return; 10353 return;
9929 } 10354 }
9930 } 10355 }
9931 10356
9932 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 10357 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
9933 { 10358 {
9934 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); 10359 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info);
9935 } 10360 }
9936 10361
9937 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 10362 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
9938 { 10363 {
9939 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); 10364 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "raisesExceptionStringMethod");
10365
9940 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10366 TestObject* impl = V8TestObject::toImpl(info.Holder());
10367
9941 String result = impl->raisesExceptionStringMethod(exceptionState); 10368 String result = impl->raisesExceptionStringMethod(exceptionState);
9942 if (exceptionState.hadException()) { 10369 if (exceptionState.hadException()) {
9943 return; 10370 return;
9944 } 10371 }
9945 v8SetReturnValueString(info, result, info.GetIsolate()); 10372 v8SetReturnValueString(info, result, info.GetIsolate());
9946 } 10373 }
9947 10374
9948 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 10375 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
9949 { 10376 {
9950 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); 10377 TestObjectV8Internal::raisesExceptionStringMethodMethod(info);
9951 } 10378 }
9952 10379
9953 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 10380 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
9954 { 10381 {
9955 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); 10382 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "raisesExceptionVoidMethodOptionalLongArg");
10383
9956 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10384 TestObject* impl = V8TestObject::toImpl(info.Holder());
10385
9957 int optionalLongArg; 10386 int optionalLongArg;
9958 { 10387 int numArgsPassed = info.Length();
9959 int numArgsPassed = info.Length(); 10388 while (numArgsPassed > 0) {
9960 while (numArgsPassed > 0) { 10389 if (!info[numArgsPassed - 1]->IsUndefined())
9961 if (!info[numArgsPassed - 1]->IsUndefined()) 10390 break;
9962 break; 10391 --numArgsPassed;
9963 --numArgsPassed; 10392 }
9964 } 10393 if (UNLIKELY(numArgsPassed <= 0)) {
9965 if (UNLIKELY(numArgsPassed <= 0)) { 10394 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState);
9966 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); 10395 if (exceptionState.hadException()) {
9967 if (exceptionState.hadException()) {
9968 return;
9969 }
9970 return; 10396 return;
9971 } 10397 }
9972 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); 10398 return;
9973 if (exceptionState.hadException())
9974 return;
9975 } 10399 }
10400 optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exce ptionState);
10401 if (exceptionState.hadException())
10402 return;
10403
9976 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta te); 10404 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta te);
9977 if (exceptionState.hadException()) { 10405 if (exceptionState.hadException()) {
9978 return; 10406 return;
9979 } 10407 }
9980 } 10408 }
9981 10409
9982 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 10410 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
9983 { 10411 {
9984 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); 10412 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info);
9985 } 10413 }
9986 10414
9987 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu nctionCallbackInfo<v8::Value>& info) 10415 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu nctionCallbackInfo<v8::Value>& info)
9988 { 10416 {
9989 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs olate()); 10417 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "raisesExceptionVoidMethodTestCallbackInterfaceArg");
10418
10419 TestObject* impl = V8TestObject::toImpl(info.Holder());
10420
9990 if (UNLIKELY(info.Length() < 1)) { 10421 if (UNLIKELY(info.Length() < 1)) {
9991 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 10422 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
9992 return; 10423 return;
9993 } 10424 }
9994 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10425
9995 TestCallbackInterface* testCallbackInterfaceArg; 10426 TestCallbackInterface* testCallbackInterfaceArg;
9996 { 10427 if (info.Length() <= 0 || !info[0]->IsFunction()) {
9997 if (info.Length() <= 0 || !info[0]->IsFunction()) { 10428 exceptionState.throwTypeError("The callback provided as parameter 1 is n ot a function.");
9998 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); 10429
9999 return; 10430 return;
10000 }
10001 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8: :Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
10002 } 10431 }
10432 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Fun ction>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
10433
10003 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac eArg, exceptionState); 10434 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac eArg, exceptionState);
10004 if (exceptionState.hadException()) { 10435 if (exceptionState.hadException()) {
10005 return; 10436 return;
10006 } 10437 }
10007 } 10438 }
10008 10439
10009 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons t v8::FunctionCallbackInfo<v8::Value>& info) 10440 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons t v8::FunctionCallbackInfo<v8::Value>& info)
10010 { 10441 {
10011 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho d(info); 10442 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho d(info);
10012 } 10443 }
10013 10444
10014 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons t v8::FunctionCallbackInfo<v8::Value>& info) 10445 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons t v8::FunctionCallbackInfo<v8::Value>& info)
10015 { 10446 {
10016 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in fo.GetIsolate()); 10447 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg" );
10448
10017 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10449 TestObject* impl = V8TestObject::toImpl(info.Holder());
10450
10018 TestCallbackInterface* optionalTestCallbackInterfaceArg; 10451 TestCallbackInterface* optionalTestCallbackInterfaceArg;
10019 { 10452 if (!isUndefinedOrNull(info[0])) {
10020 if (!isUndefinedOrNull(info[0])) { 10453 if (!info[0]->IsFunction()) {
10021 if (!info[0]->IsFunction()) { 10454 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
10022 exceptionState.throwTypeError("The callback provided as paramete r 1 is not a function."); 10455
10023 return; 10456 return;
10024 }
10025 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v 8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
10026 } else {
10027 optionalTestCallbackInterfaceArg = nullptr;
10028 } 10457 }
10458 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::L ocal<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
10459 } else {
10460 optionalTestCallbackInterfaceArg = nullptr;
10029 } 10461 }
10462
10030 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest CallbackInterfaceArg, exceptionState); 10463 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest CallbackInterfaceArg, exceptionState);
10031 if (exceptionState.hadException()) { 10464 if (exceptionState.hadException()) {
10032 return; 10465 return;
10033 } 10466 }
10034 } 10467 }
10035 10468
10036 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info) 10469 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info)
10037 { 10470 {
10038 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface ArgMethod(info); 10471 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface ArgMethod(info);
10039 } 10472 }
10040 10473
10041 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function CallbackInfo<v8::Value>& info) 10474 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function CallbackInfo<v8::Value>& info)
10042 { 10475 {
10043 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate( )); 10476 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "raisesExceptionTestInterfaceEmptyVoidMethod");
10477
10044 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10478 TestObject* impl = V8TestObject::toImpl(info.Holder());
10479
10045 TestInterfaceEmpty* result = impl->raisesExceptionTestInterfaceEmptyVoidMeth od(exceptionState); 10480 TestInterfaceEmpty* result = impl->raisesExceptionTestInterfaceEmptyVoidMeth od(exceptionState);
10046 if (exceptionState.hadException()) { 10481 if (exceptionState.hadException()) {
10047 return; 10482 return;
10048 } 10483 }
10049 v8SetReturnValue(info, result); 10484 v8SetReturnValue(info, result);
10050 } 10485 }
10051 10486
10052 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info) 10487 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info)
10053 { 10488 {
10054 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info ); 10489 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info );
10055 } 10490 }
10056 10491
10057 static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 10492 static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
10058 { 10493 {
10059 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionXPathNSResolverVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); 10494 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "raisesExceptionXPathNSResolverVoidMethod");
10495
10060 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10496 TestObject* impl = V8TestObject::toImpl(info.Holder());
10497
10061 XPathNSResolver* result = impl->raisesExceptionXPathNSResolverVoidMethod(exc eptionState); 10498 XPathNSResolver* result = impl->raisesExceptionXPathNSResolverVoidMethod(exc eptionState);
10062 if (exceptionState.hadException()) { 10499 if (exceptionState.hadException()) {
10063 return; 10500 return;
10064 } 10501 }
10065 v8SetReturnValue(info, result); 10502 v8SetReturnValue(info, result);
10066 } 10503 }
10067 10504
10068 static void raisesExceptionXPathNSResolverVoidMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 10505 static void raisesExceptionXPathNSResolverVoidMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
10069 { 10506 {
10070 TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethod(info); 10507 TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethod(info);
10071 } 10508 }
10072 10509
10073 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 10510 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10074 { 10511 {
10075 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExe cutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), inf o.GetIsolate()); 10512 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "callWithExecutionContextRaisesExceptionVoidMethodLongArg") ;
10513
10514 TestObject* impl = V8TestObject::toImpl(info.Holder());
10515
10076 if (UNLIKELY(info.Length() < 1)) { 10516 if (UNLIKELY(info.Length() < 1)) {
10077 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 10517 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10078 return; 10518 return;
10079 } 10519 }
10080 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10520
10081 int longArg; 10521 int longArg;
10082 { 10522 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
10083 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 10523 if (exceptionState.hadException())
10084 if (exceptionState.hadException()) 10524 return;
10085 return; 10525
10086 }
10087 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 10526 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
10088 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionCont ext, longArg, exceptionState); 10527 impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionCont ext, longArg, exceptionState);
10089 if (exceptionState.hadException()) { 10528 if (exceptionState.hadException()) {
10090 return; 10529 return;
10091 } 10530 }
10092 } 10531 }
10093 10532
10094 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 10533 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
10095 { 10534 {
10096 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA rgMethod(info); 10535 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongA rgMethod(info);
10097 } 10536 }
10098 10537
10099 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 10538 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
10100 { 10539 {
10101 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10540 TestObject* impl = V8TestObject::toImpl(info.Holder());
10541
10102 impl->runtimeEnabledVoidMethod(); 10542 impl->runtimeEnabledVoidMethod();
10103 } 10543 }
10104 10544
10105 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 10545 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
10106 { 10546 {
10107 TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info); 10547 TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info);
10108 } 10548 }
10109 10549
10110 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 10550 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
10111 { 10551 {
10112 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10552 TestObject* impl = V8TestObject::toImpl(info.Holder());
10553
10113 impl->perWorldBindingsRuntimeEnabledVoidMethod(); 10554 impl->perWorldBindingsRuntimeEnabledVoidMethod();
10114 } 10555 }
10115 10556
10116 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 10557 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
10117 { 10558 {
10118 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info); 10559 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info);
10119 } 10560 }
10120 10561
10121 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info) 10562 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info)
10122 { 10563 {
10123 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10564 TestObject* impl = V8TestObject::toImpl(info.Holder());
10565
10124 impl->perWorldBindingsRuntimeEnabledVoidMethod(); 10566 impl->perWorldBindingsRuntimeEnabledVoidMethod();
10125 } 10567 }
10126 10568
10127 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info) 10569 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info)
10128 { 10570 {
10129 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW orld(info); 10571 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW orld(info);
10130 } 10572 }
10131 10573
10132 static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallback Info<v8::Value>& info) 10574 static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallback Info<v8::Value>& info)
10133 { 10575 {
10134 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10576 TestObject* impl = V8TestObject::toImpl(info.Holder());
10577
10135 V8StringResource<> stringArg; 10578 V8StringResource<> stringArg;
10136 { 10579 stringArg = info[0];
10137 stringArg = info[0]; 10580 if (!stringArg.prepare())
10138 if (!stringArg.prepare()) 10581 return;
10139 return; 10582
10140 }
10141 impl->runtimeEnabledOverloadedVoidMethod(stringArg); 10583 impl->runtimeEnabledOverloadedVoidMethod(stringArg);
10142 } 10584 }
10143 10585
10144 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback Info<v8::Value>& info) 10586 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback Info<v8::Value>& info)
10145 { 10587 {
10146 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); 10588 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "runtimeEnabledOverloadedVoidMethod");
10589
10147 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10590 TestObject* impl = V8TestObject::toImpl(info.Holder());
10591
10148 int longArg; 10592 int longArg;
10149 { 10593 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
10150 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 10594 if (exceptionState.hadException())
10151 if (exceptionState.hadException()) 10595 return;
10152 return; 10596
10153 }
10154 impl->runtimeEnabledOverloadedVoidMethod(longArg); 10597 impl->runtimeEnabledOverloadedVoidMethod(longArg);
10155 } 10598 }
10156 10599
10157 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 10600 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
10158 { 10601 {
10159 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); 10602 bool isArityError = false;
10160 switch (std::min(1, info.Length())) { 10603 switch (std::min(1, info.Length())) {
10161 case 1: 10604 case 1:
10162 if (info[0]->IsNumber()) { 10605 if (info[0]->IsNumber()) {
10163 runtimeEnabledOverloadedVoidMethod2Method(info); 10606 runtimeEnabledOverloadedVoidMethod2Method(info);
10164 return; 10607 return;
10165 } 10608 }
10166 if (true) { 10609 if (true) {
10167 runtimeEnabledOverloadedVoidMethod1Method(info); 10610 runtimeEnabledOverloadedVoidMethod1Method(info);
10168 return; 10611 return;
10169 } 10612 }
10170 if (true) { 10613 if (true) {
10171 runtimeEnabledOverloadedVoidMethod2Method(info); 10614 runtimeEnabledOverloadedVoidMethod2Method(info);
10172 return; 10615 return;
10173 } 10616 }
10174 break; 10617 break;
10175 default: 10618 default:
10176 break; 10619 isArityError = true;
10177 } 10620 }
10178 if (info.Length() < 1) { 10621
10179 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 10622 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "runtimeEnabledOverloadedVoidMethod");
10180 return; 10623
10624 if (isArityError) {
10625 if (info.Length() < 1) {
10626 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( 1, info.Length()));
10627 return;
10628 }
10181 } 10629 }
10182 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 10630 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
10183 return;
10184 } 10631 }
10185 10632
10186 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 10633 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
10187 { 10634 {
10188 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info); 10635 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info);
10189 } 10636 }
10190 10637
10191 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio nCallbackInfo<v8::Value>& info) 10638 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio nCallbackInfo<v8::Value>& info)
10192 { 10639 {
10193 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10640 TestObject* impl = V8TestObject::toImpl(info.Holder());
10641
10194 V8StringResource<> stringArg; 10642 V8StringResource<> stringArg;
10195 { 10643 stringArg = info[0];
10196 stringArg = info[0]; 10644 if (!stringArg.prepare())
10197 if (!stringArg.prepare()) 10645 return;
10198 return; 10646
10199 }
10200 impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg); 10647 impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg);
10201 } 10648 }
10202 10649
10203 static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::Functio nCallbackInfo<v8::Value>& info) 10650 static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::Functio nCallbackInfo<v8::Value>& info)
10204 { 10651 {
10205 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10652 TestObject* impl = V8TestObject::toImpl(info.Holder());
10653
10206 TestInterfaceImplementation* testInterfaceArg; 10654 TestInterfaceImplementation* testInterfaceArg;
10207 { 10655 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), i nfo[0]);
10208 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate( ), info[0]); 10656 if (!testInterfaceArg) {
10209 if (!testInterfaceArg) { 10657 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", "par ameter 1 is not of type 'TestInterface'."));
10210 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", "parameter 1 is not of type 'TestInterface'.")); 10658
10211 return; 10659 return;
10212 }
10213 } 10660 }
10661
10214 impl->partiallyRuntimeEnabledOverloadedVoidMethod(testInterfaceArg); 10662 impl->partiallyRuntimeEnabledOverloadedVoidMethod(testInterfaceArg);
10215 } 10663 }
10216 10664
10217 static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio nCallbackInfo<v8::Value>& info) 10665 static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::Functio nCallbackInfo<v8::Value>& info)
10218 { 10666 {
10219 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate( )); 10667 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "partiallyRuntimeEnabledOverloadedVoidMethod");
10668
10220 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10669 TestObject* impl = V8TestObject::toImpl(info.Holder());
10670
10221 int longArg; 10671 int longArg;
10222 V8StringResource<> stringArg; 10672 V8StringResource<> stringArg;
10223 { 10673 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
10224 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 10674 if (exceptionState.hadException())
10225 if (exceptionState.hadException()) 10675 return;
10226 return; 10676
10227 stringArg = info[1]; 10677 stringArg = info[1];
10228 if (!stringArg.prepare()) 10678 if (!stringArg.prepare())
10229 return; 10679 return;
10230 } 10680
10231 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg); 10681 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg);
10232 } 10682 }
10233 10683
10234 static void partiallyRuntimeEnabledOverloadedVoidMethod4Method(const v8::Functio nCallbackInfo<v8::Value>& info) 10684 static void partiallyRuntimeEnabledOverloadedVoidMethod4Method(const v8::Functio nCallbackInfo<v8::Value>& info)
10235 { 10685 {
10236 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate( )); 10686 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "partiallyRuntimeEnabledOverloadedVoidMethod");
10687
10237 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10688 TestObject* impl = V8TestObject::toImpl(info.Holder());
10689
10238 int longArg; 10690 int longArg;
10239 V8StringResource<> stringArg; 10691 V8StringResource<> stringArg;
10240 TestInterfaceImplementation* testInterfaceArg; 10692 TestInterfaceImplementation* testInterfaceArg;
10241 { 10693 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te);
10242 longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptio nState); 10694 if (exceptionState.hadException())
10243 if (exceptionState.hadException()) 10695 return;
10244 return; 10696
10245 stringArg = info[1]; 10697 stringArg = info[1];
10246 if (!stringArg.prepare()) 10698 if (!stringArg.prepare())
10247 return; 10699 return;
10248 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate( ), info[2]); 10700
10249 if (!testInterfaceArg) { 10701 testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), i nfo[2]);
10250 exceptionState.throwTypeError("parameter 3 is not of type 'TestInter face'."); 10702 if (!testInterfaceArg) {
10251 return; 10703 exceptionState.throwTypeError("parameter 3 is not of type 'TestInterface '.");
10252 } 10704
10705 return;
10253 } 10706 }
10707
10254 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg, testIn terfaceArg); 10708 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg, testIn terfaceArg);
10255 } 10709 }
10256 10710
10257 static int partiallyRuntimeEnabledOverloadedVoidMethodMethodLength() 10711 static int partiallyRuntimeEnabledOverloadedVoidMethodMethodLength()
10258 { 10712 {
10259 if (RuntimeEnabledFeatures::featureName1Enabled()) { 10713 if (RuntimeEnabledFeatures::featureName1Enabled()) {
10260 return 1; 10714 return 1;
10261 } 10715 }
10262 if (RuntimeEnabledFeatures::featureName2Enabled()) { 10716 if (RuntimeEnabledFeatures::featureName2Enabled()) {
10263 return 1; 10717 return 1;
10264 } 10718 }
10265 return 2; 10719 return 2;
10266 } 10720 }
10267 10721
10268 static int partiallyRuntimeEnabledOverloadedVoidMethodMethodMaxArg() 10722 static int partiallyRuntimeEnabledOverloadedVoidMethodMethodMaxArg()
10269 { 10723 {
10270 if (RuntimeEnabledFeatures::featureName3Enabled()) { 10724 if (RuntimeEnabledFeatures::featureName3Enabled()) {
10271 return 3; 10725 return 3;
10272 } 10726 }
10273 return 2; 10727 return 2;
10274 } 10728 }
10275 10729
10276 static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::Function CallbackInfo<v8::Value>& info) 10730 static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::Function CallbackInfo<v8::Value>& info)
10277 { 10731 {
10278 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate( )); 10732 bool isArityError = false;
10279 switch (std::min(TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoid MethodMethodMaxArg(), info.Length())) { 10733 switch (std::min(TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoid MethodMethodMaxArg(), info.Length())) {
10280 case 1: 10734 case 1:
10281 if (RuntimeEnabledFeatures::featureName2Enabled()) { 10735 if (RuntimeEnabledFeatures::featureName2Enabled()) {
10282 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { 10736 if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) {
10283 partiallyRuntimeEnabledOverloadedVoidMethod2Method(info); 10737 partiallyRuntimeEnabledOverloadedVoidMethod2Method(info);
10284 return; 10738 return;
10285 } 10739 }
10286 } 10740 }
10287 if (RuntimeEnabledFeatures::featureName1Enabled()) { 10741 if (RuntimeEnabledFeatures::featureName1Enabled()) {
10288 if (true) { 10742 if (true) {
(...skipping 10 matching lines...) Expand all
10299 break; 10753 break;
10300 case 3: 10754 case 3:
10301 if (RuntimeEnabledFeatures::featureName3Enabled()) { 10755 if (RuntimeEnabledFeatures::featureName3Enabled()) {
10302 if (true) { 10756 if (true) {
10303 partiallyRuntimeEnabledOverloadedVoidMethod4Method(info); 10757 partiallyRuntimeEnabledOverloadedVoidMethod4Method(info);
10304 return; 10758 return;
10305 } 10759 }
10306 } 10760 }
10307 break; 10761 break;
10308 default: 10762 default:
10309 break; 10763 isArityError = true;
10310 } 10764 }
10311 if (info.Length() < TestObjectV8Internal::partiallyRuntimeEnabledOverloadedV oidMethodMethodLength()) { 10765
10312 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(Test ObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), inf o.Length())); 10766 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "partiallyRuntimeEnabledOverloadedVoidMethod");
10313 return; 10767
10768 if (isArityError) {
10769 if (info.Length() < TestObjectV8Internal::partiallyRuntimeEnabledOverloa dedVoidMethodMethodLength()) {
10770 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments( TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), info.Length()));
10771 return;
10772 }
10314 } 10773 }
10315 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 10774 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
10316 return;
10317 } 10775 }
10318 10776
10319 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info) 10777 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info)
10320 { 10778 {
10321 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info ); 10779 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info );
10322 } 10780 }
10323 10781
10324 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(con st v8::FunctionCallbackInfo<v8::Value>& info) 10782 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(con st v8::FunctionCallbackInfo<v8::Value>& info)
10325 { 10783 {
10784 TestObject* impl = V8TestObject::toImpl(info.Holder());
10785
10326 if (UNLIKELY(info.Length() < 1)) { 10786 if (UNLIKELY(info.Length() < 1)) {
10327 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("legacyInter faceTypeCheckingVoidMethodTestInterfaceEmptyArg", "TestObject", ExceptionMessage s::notEnoughArguments(1, info.Length())))); 10787 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg", "Te stObject", ExceptionMessages::notEnoughArguments(1, info.Length())));
10328 return; 10788 return;
10329 } 10789 }
10330 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10790
10331 TestInterfaceEmpty* testInterfaceEmptyArg; 10791 TestInterfaceEmpty* testInterfaceEmptyArg;
10332 { 10792 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIs olate(), info[0]);
10333 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); 10793
10334 }
10335 impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfa ceEmptyArg); 10794 impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfa ceEmptyArg);
10336 } 10795 }
10337 10796
10338 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info) 10797 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info)
10339 { 10798 {
10340 TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmpt yArgMethod(info); 10799 TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmpt yArgMethod(info);
10341 } 10800 }
10342 10801
10343 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe thod(const v8::FunctionCallbackInfo<v8::Value>& info) 10802 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe thod(const v8::FunctionCallbackInfo<v8::Value>& info)
10344 { 10803 {
10345 ExceptionState exceptionState(ExceptionState::ExecutionContext, "legacyInter faceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Hol der(), info.GetIsolate()); 10804 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVar iadicArg");
10805
10346 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10806 TestObject* impl = V8TestObject::toImpl(info.Holder());
10807
10347 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyArg; 10808 HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyArg;
10348 { 10809 for (int i = 0; i < info.Length(); ++i) {
10349 for (int i = 0; i < info.Length(); ++i) { 10810 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
10350 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { 10811 exceptionState.throwTypeError("parameter 1 is not of type 'TestInter faceEmpty'.");
10351 exceptionState.throwTypeError("parameter 1 is not of type 'TestI nterfaceEmpty'."); 10812
10352 return; 10813 return;
10353 }
10354 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local< v8::Object>::Cast(info[i])));
10355 } 10814 }
10815 testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<v8:: Object>::Cast(info[i])));
10356 } 10816 }
10817
10357 impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg(tes tInterfaceEmptyArg); 10818 impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg(tes tInterfaceEmptyArg);
10358 } 10819 }
10359 10820
10360 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 10821 static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMe thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10361 { 10822 {
10362 TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmpt yVariadicArgMethod(info); 10823 TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmpt yVariadicArgMethod(info);
10363 } 10824 }
10364 10825
10365 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 10826 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
10366 { 10827 {
10828 TestObject* impl = V8TestObject::toImpl(info.Holder());
10829
10367 if (UNLIKELY(info.Length() < 1)) { 10830 if (UNLIKELY(info.Length() < 1)) {
10368 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4A rgumentsCheckingIfPossibleWithOptionalArg", "TestObject", ExceptionMessages::not EnoughArguments(1, info.Length())))); 10831 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObje ct", ExceptionMessages::notEnoughArguments(1, info.Length())));
10369 return; 10832 return;
10370 } 10833 }
10371 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10834
10372 Node* node1; 10835 Node* node1;
10373 Node* node2; 10836 Node* node2;
10374 { 10837 int numArgsPassed = info.Length();
10375 int numArgsPassed = info.Length(); 10838 while (numArgsPassed > 0) {
10376 while (numArgsPassed > 0) { 10839 if (!info[numArgsPassed - 1]->IsUndefined())
10377 if (!info[numArgsPassed - 1]->IsUndefined()) 10840 break;
10378 break; 10841 --numArgsPassed;
10379 --numArgsPassed;
10380 }
10381 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]);
10382 if (!node1) {
10383 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 1 is not of type 'Node'."));
10384 return;
10385 }
10386 if (UNLIKELY(numArgsPassed <= 1)) {
10387 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1);
10388 return;
10389 }
10390 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
10391 if (!node2) {
10392 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 2 is not of type 'Node'."));
10393 return;
10394 }
10395 } 10842 }
10843 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]);
10844 if (!node1) {
10845 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObje ct", "parameter 1 is not of type 'Node'."));
10846
10847 return;
10848 }
10849
10850 if (UNLIKELY(numArgsPassed <= 1)) {
10851 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1);
10852 return;
10853 }
10854 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
10855 if (!node2) {
10856 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObje ct", "parameter 2 is not of type 'Node'."));
10857
10858 return;
10859 }
10860
10396 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2); 10861 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2);
10397 } 10862 }
10398 10863
10399 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 10864 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
10400 { 10865 {
10401 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMe thod(info); 10866 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMe thod(info);
10402 } 10867 }
10403 10868
10404 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 10869 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
10405 { 10870 {
10871 TestObject* impl = V8TestObject::toImpl(info.Holder());
10872
10406 if (UNLIKELY(info.Length() < 2)) { 10873 if (UNLIKELY(info.Length() < 2)) {
10407 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4A rgumentsCheckingIfPossibleWithNullableArg", "TestObject", ExceptionMessages::not EnoughArguments(2, info.Length())))); 10874 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObje ct", ExceptionMessages::notEnoughArguments(2, info.Length())));
10408 return; 10875 return;
10409 } 10876 }
10410 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10877
10411 Node* node1; 10878 Node* node1;
10412 Node* node2; 10879 Node* node2;
10413 { 10880 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]);
10414 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); 10881 if (!node1) {
10415 if (!node1) { 10882 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObje ct", "parameter 1 is not of type 'Node'."));
10416 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 1 is not of type 'Node'.")); 10883
10417 return; 10884 return;
10418 }
10419 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
10420 if (!node2 && !isUndefinedOrNull(info[1])) {
10421 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 2 is not of type 'Node'."));
10422 return;
10423 }
10424 } 10885 }
10886
10887 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
10888 if (!node2 && !isUndefinedOrNull(info[1])) {
10889 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObje ct", "parameter 2 is not of type 'Node'."));
10890
10891 return;
10892 }
10893
10425 impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2); 10894 impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2);
10426 } 10895 }
10427 10896
10428 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 10897 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
10429 { 10898 {
10430 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMe thod(info); 10899 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMe thod(info);
10431 } 10900 }
10432 10901
10433 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info) 10902 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info)
10434 { 10903 {
10904 TestObject* impl = V8TestObject::toImpl(info.Holder());
10905
10435 if (UNLIKELY(info.Length() < 1)) { 10906 if (UNLIKELY(info.Length() < 1)) {
10436 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4A rgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", ExceptionMessages::no tEnoughArguments(1, info.Length())))); 10907 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObj ect", ExceptionMessages::notEnoughArguments(1, info.Length())));
10437 return; 10908 return;
10438 } 10909 }
10439 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10910
10440 Node* node1; 10911 Node* node1;
10441 Node* node2; 10912 Node* node2;
10442 { 10913 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]);
10443 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); 10914 if (!node1) {
10444 if (!node1) { 10915 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObj ect", "parameter 1 is not of type 'Node'."));
10445 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 1 is not of type 'Node'.")); 10916
10446 return; 10917 return;
10447 }
10448 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
10449 if (!node2) {
10450 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 2 is not of type 'Node'."));
10451 return;
10452 }
10453 } 10918 }
10919
10920 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
10921 if (!node2) {
10922 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObj ect", "parameter 2 is not of type 'Node'."));
10923
10924 return;
10925 }
10926
10454 impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2); 10927 impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2);
10455 } 10928 }
10456 10929
10457 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 10930 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
10458 { 10931 {
10459 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgM ethod(info); 10932 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgM ethod(info);
10460 } 10933 }
10461 10934
10462 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 10935 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
10463 { 10936 {
10464 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10937 TestObject* impl = V8TestObject::toImpl(info.Holder());
10938
10465 impl->unforgeableVoidMethod(); 10939 impl->unforgeableVoidMethod();
10466 } 10940 }
10467 10941
10468 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 10942 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
10469 { 10943 {
10470 TestObjectV8Internal::unforgeableVoidMethodMethod(info); 10944 TestObjectV8Internal::unforgeableVoidMethodMethod(info);
10471 } 10945 }
10472 10946
10473 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F unctionCallbackInfo<v8::Value>& info) 10947 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::F unctionCallbackInfo<v8::Value>& info)
10474 { 10948 {
10475 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceGarbageCollectedSequenceArg", "TestObject", info.Holder(), info.GetI solate()); 10949 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodTestInterfaceGarbageCollectedSequenceArg");
10950
10951 TestObject* impl = V8TestObject::toImpl(info.Holder());
10952
10476 if (UNLIKELY(info.Length() < 1)) { 10953 if (UNLIKELY(info.Length() < 1)) {
10477 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 10954 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10478 return; 10955 return;
10479 } 10956 }
10480 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10957
10481 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec tedSequenceArg; 10958 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec tedSequenceArg;
10482 { 10959 testInterfaceGarbageCollectedSequenceArg = (toMemberNativeArray<TestInterfac eGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState));
10483 testInterfaceGarbageCollectedSequenceArg = (toMemberNativeArray<TestInte rfaceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); 10960 if (exceptionState.hadException())
10484 if (exceptionState.hadException()) 10961 return;
10485 return; 10962
10486 }
10487 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag eCollectedSequenceArg); 10963 impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbag eCollectedSequenceArg);
10488 } 10964 }
10489 10965
10490 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& info) 10966 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(con st v8::FunctionCallbackInfo<v8::Value>& info)
10491 { 10967 {
10492 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth od(info); 10968 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMeth od(info);
10493 } 10969 }
10494 10970
10495 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info) 10971 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
10496 { 10972 {
10497 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceGarbageCollectedArrayArg", "TestObject", info.Holder(), info.GetIsol ate()); 10973 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "voidMethodTestInterfaceGarbageCollectedArrayArg");
10974
10975 TestObject* impl = V8TestObject::toImpl(info.Holder());
10976
10498 if (UNLIKELY(info.Length() < 1)) { 10977 if (UNLIKELY(info.Length() < 1)) {
10499 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 10978 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10500 return; 10979 return;
10501 } 10980 }
10502 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10981
10503 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec tedArrayArg; 10982 HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollec tedArrayArg;
10504 { 10983 testInterfaceGarbageCollectedArrayArg = (toMemberNativeArray<TestInterfaceGa rbageCollected>(info[0], 1, info.GetIsolate(), exceptionState));
10505 testInterfaceGarbageCollectedArrayArg = (toMemberNativeArray<TestInterfa ceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); 10984 if (exceptionState.hadException())
10506 if (exceptionState.hadException()) 10985 return;
10507 return; 10986
10508 }
10509 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo llectedArrayArg); 10987 impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCo llectedArrayArg);
10510 } 10988 }
10511 10989
10512 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 10990 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10513 { 10991 {
10514 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod( info); 10992 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod( info);
10515 } 10993 }
10516 10994
10517 static void newObjectTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 10995 static void newObjectTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
10518 { 10996 {
10519 TestObject* impl = V8TestObject::toImpl(info.Holder()); 10997 TestObject* impl = V8TestObject::toImpl(info.Holder());
10998
10520 TestInterfaceImplementation* result = impl->newObjectTestInterfaceMethod(); 10999 TestInterfaceImplementation* result = impl->newObjectTestInterfaceMethod();
10521 // [NewObject] must always create a new wrapper. Check that a wrapper 11000 // [NewObject] must always create a new wrapper. Check that a wrapper
10522 // does not exist yet. 11001 // does not exist yet.
10523 DCHECK(!result || DOMDataStore::getWrapper(result, info.GetIsolate()).IsEmpt y()); 11002 DCHECK(!result || DOMDataStore::getWrapper(result, info.GetIsolate()).IsEmpt y());
10524 v8SetReturnValue(info, result); 11003 v8SetReturnValue(info, result);
10525 } 11004 }
10526 11005
10527 static void newObjectTestInterfaceMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info) 11006 static void newObjectTestInterfaceMethodMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
10528 { 11007 {
10529 TestObjectV8Internal::newObjectTestInterfaceMethodMethod(info); 11008 TestObjectV8Internal::newObjectTestInterfaceMethodMethod(info);
10530 } 11009 }
10531 11010
10532 static void serializerMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo) 11011 static void serializerMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
10533 { 11012 {
10534 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11013 TestObject* impl = V8TestObject::toImpl(info.Holder());
11014
10535 v8SetReturnValueString(info, impl->serializerMethod(), info.GetIsolate()); 11015 v8SetReturnValueString(info, impl->serializerMethod(), info.GetIsolate());
10536 } 11016 }
10537 11017
10538 static void serializerMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info) 11018 static void serializerMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
10539 { 11019 {
10540 TestObjectV8Internal::serializerMethodMethod(info); 11020 TestObjectV8Internal::serializerMethodMethod(info);
10541 } 11021 }
10542 11022
10543 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac kInfo<v8::Value>& info) 11023 static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
10544 { 11024 {
10545 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11025 TestObject* impl = V8TestObject::toImpl(info.Holder());
11026
10546 V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toLo calFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl); 11027 V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toLo calFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl);
10547 } 11028 }
10548 11029
10549 static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 11030 static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
10550 { 11031 {
10551 TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); 11032 TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info);
10552 } 11033 }
10553 11034
10554 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 11035 static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
10555 { 11036 {
10556 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11037 TestObject* impl = V8TestObject::toImpl(info.Holder());
11038
10557 int result = 0; 11039 int result = 0;
10558 if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMetho d(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), im pl, &result)) 11040 if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMetho d(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), im pl, &result))
10559 return; 11041 return;
10560 v8SetReturnValueInt(info, result); 11042 v8SetReturnValueInt(info, result);
10561 } 11043 }
10562 11044
10563 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 11045 static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
10564 { 11046 {
10565 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); 11047 TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info);
10566 } 11048 }
10567 11049
10568 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info) 11050 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v 8::FunctionCallbackInfo<v8::Value>& info)
10569 { 11051 {
10570 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info. GetIsolate()); 11052 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript");
11053
11054 TestObject* impl = V8TestObject::toImpl(info.Holder());
11055
10571 if (UNLIKELY(info.Length() < 1)) { 11056 if (UNLIKELY(info.Length() < 1)) {
10572 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 11057 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10573 return; 11058 return;
10574 } 11059 }
10575 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11060
10576 int value; 11061 int value;
10577 { 11062 value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState );
10578 value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionS tate); 11063 if (exceptionState.hadException())
10579 if (exceptionState.hadException()) 11064 return;
10580 return; 11065
10581 }
10582 int result = 0; 11066 int result = 0;
10583 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP rivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurre ntContext())), impl, value, &result)) 11067 if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInP rivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurre ntContext())), impl, value, &result))
10584 return; 11068 return;
10585 v8SetReturnValueInt(info, result); 11069 v8SetReturnValueInt(info, result);
10586 } 11070 }
10587 11071
10588 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 11072 static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info)
10589 { 11073 {
10590 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info); 11074 TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScript Method(info);
10591 } 11075 }
10592 11076
10593 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11077 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10594 { 11078 {
11079 TestObject* impl = V8TestObject::toImpl(info.Holder());
11080
10595 if (UNLIKELY(info.Length() < 1)) { 11081 if (UNLIKELY(info.Length() < 1)) {
10596 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("stringMetho dWithStringArgumentImplementedInPrivateScript", "TestObject", ExceptionMessages: :notEnoughArguments(1, info.Length())))); 11082 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("stringMethodWithStringArgumentImplementedInPrivateScript", "Test Object", ExceptionMessages::notEnoughArguments(1, info.Length())));
10597 return; 11083 return;
10598 } 11084 }
10599 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11085
10600 V8StringResource<> value; 11086 V8StringResource<> value;
10601 { 11087 value = info[0];
10602 value = info[0]; 11088 if (!value.prepare())
10603 if (!value.prepare()) 11089 return;
10604 return; 11090
10605 }
10606 String result; 11091 String result;
10607 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur rentContext())), impl, value, &result)) 11092 if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedI nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur rentContext())), impl, value, &result))
10608 return; 11093 return;
10609 v8SetReturnValueString(info, result, info.GetIsolate()); 11094 v8SetReturnValueString(info, result, info.GetIsolate());
10610 } 11095 }
10611 11096
10612 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 11097 static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
10613 { 11098 {
10614 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri ptMethod(info); 11099 TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScri ptMethod(info);
10615 } 11100 }
10616 11101
10617 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 11102 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
10618 { 11103 {
11104 TestObject* impl = V8TestObject::toImpl(info.Holder());
11105
10619 if (UNLIKELY(info.Length() < 1)) { 11106 if (UNLIKELY(info.Length() < 1)) {
10620 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("nodeMethodW ithNodeArgumentImplementedInPrivateScript", "TestObject", ExceptionMessages::not EnoughArguments(1, info.Length())))); 11107 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "TestObje ct", ExceptionMessages::notEnoughArguments(1, info.Length())));
10621 return; 11108 return;
10622 } 11109 }
10623 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11110
10624 Node* value; 11111 Node* value;
10625 { 11112 value = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]);
10626 value = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); 11113 if (!value) {
10627 if (!value) { 11114 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "TestObje ct", "parameter 1 is not of type 'Node'."));
10628 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "Test Object", "parameter 1 is not of type 'Node'.")); 11115
10629 return; 11116 return;
10630 }
10631 } 11117 }
11118
10632 Node* result = nullptr; 11119 Node* result = nullptr;
10633 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri vateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrent Context())), impl, value, &result)) 11120 if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPri vateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrent Context())), impl, value, &result))
10634 return; 11121 return;
10635 v8SetReturnValue(info, result); 11122 v8SetReturnValue(info, result);
10636 } 11123 }
10637 11124
10638 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 11125 static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
10639 { 11126 {
10640 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe thod(info); 11127 TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMe thod(info);
10641 } 11128 }
10642 11129
10643 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11130 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10644 { 11131 {
10645 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), inf o.GetIsolate()); 11132 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript") ;
11133
11134 TestObject* impl = V8TestObject::toImpl(info.Holder());
11135
10646 if (UNLIKELY(info.Length() < 5)) { 11136 if (UNLIKELY(info.Length() < 5)) {
10647 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(5, i nfo.Length())); 11137 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(5, i nfo.Length()));
10648 return; 11138 return;
10649 } 11139 }
10650 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11140
10651 Document* document; 11141 Document* document;
10652 Node* node; 11142 Node* node;
10653 int value1; 11143 int value1;
10654 double value2; 11144 double value2;
10655 V8StringResource<> string; 11145 V8StringResource<> string;
10656 { 11146 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]);
10657 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); 11147 if (!document) {
10658 if (!document) { 11148 exceptionState.throwTypeError("parameter 1 is not of type 'Document'.");
10659 exceptionState.throwTypeError("parameter 1 is not of type 'Document' ."); 11149
10660 return; 11150 return;
10661 }
10662 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
10663 if (!node) {
10664 exceptionState.throwTypeError("parameter 2 is not of type 'Node'.");
10665 return;
10666 }
10667 value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exception State);
10668 if (exceptionState.hadException())
10669 return;
10670 value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState);
10671 if (exceptionState.hadException())
10672 return;
10673 string = info[4];
10674 if (!string.prepare())
10675 return;
10676 } 11151 }
11152
11153 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
11154 if (!node) {
11155 exceptionState.throwTypeError("parameter 2 is not of type 'Node'.");
11156
11157 return;
11158 }
11159
11160 value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exceptionStat e);
11161 if (exceptionState.hadException())
11162 return;
11163
11164 value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState);
11165 if (exceptionState.hadException())
11166 return;
11167
11168 string = info[4];
11169 if (!string.prepare())
11170 return;
11171
10677 Node* result = nullptr; 11172 Node* result = nullptr;
10678 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur rentContext())), impl, document, node, value1, value2, string, &result)) 11173 if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedI nPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCur rentContext())), impl, document, node, value1, value2, string, &result))
10679 return; 11174 return;
10680 v8SetReturnValue(info, result); 11175 v8SetReturnValue(info, result);
10681 } 11176 }
10682 11177
10683 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 11178 static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
10684 { 11179 {
10685 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri ptMethod(info); 11180 TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScri ptMethod(info);
10686 } 11181 }
10687 11182
10688 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC allbackInfo<v8::Value>& info) 11183 static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
10689 { 11184 {
10690 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImple mentedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate() ); 11185 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "methodImplementedInCPPForPrivateScriptOnly");
11186
11187 TestObject* impl = V8TestObject::toImpl(info.Holder());
11188
10691 if (UNLIKELY(info.Length() < 2)) { 11189 if (UNLIKELY(info.Length() < 2)) {
10692 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 11190 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
10693 return; 11191 return;
10694 } 11192 }
10695 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11193
10696 int value1; 11194 int value1;
10697 int value2; 11195 int value2;
10698 { 11196 value1 = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionStat e);
10699 value1 = toInt16(info.GetIsolate(), info[0], NormalConversion, exception State); 11197 if (exceptionState.hadException())
10700 if (exceptionState.hadException()) 11198 return;
10701 return; 11199
10702 value2 = toInt16(info.GetIsolate(), info[1], NormalConversion, exception State); 11200 value2 = toInt16(info.GetIsolate(), info[1], NormalConversion, exceptionStat e);
10703 if (exceptionState.hadException()) 11201 if (exceptionState.hadException())
10704 return; 11202 return;
10705 } 11203
10706 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v alue1, value2)); 11204 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v alue1, value2));
10707 } 11205 }
10708 11206
10709 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 11207 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
10710 { 11208 {
10711 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info) ; 11209 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info) ;
10712 } 11210 }
10713 11211
10714 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11212 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10715 { 11213 {
10716 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tObject", info.Holder(), info.GetIsolate()); 11214 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "keys");
11215
10717 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11216 TestObject* impl = V8TestObject::toImpl(info.Holder());
11217
10718 ScriptState* scriptState = ScriptState::forReceiverObject(info); 11218 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11219
10719 Iterator* result = impl->keysForBinding(scriptState, exceptionState); 11220 Iterator* result = impl->keysForBinding(scriptState, exceptionState);
10720 if (exceptionState.hadException()) { 11221 if (exceptionState.hadException()) {
10721 return; 11222 return;
10722 } 11223 }
10723 v8SetReturnValue(info, result); 11224 v8SetReturnValue(info, result);
10724 } 11225 }
10725 11226
10726 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 11227 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10727 { 11228 {
10728 TestObjectV8Internal::keysMethod(info); 11229 TestObjectV8Internal::keysMethod(info);
10729 } 11230 }
10730 11231
10731 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11232 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10732 { 11233 {
10733 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estObject", info.Holder(), info.GetIsolate()); 11234 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "values");
11235
10734 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11236 TestObject* impl = V8TestObject::toImpl(info.Holder());
11237
10735 ScriptState* scriptState = ScriptState::forReceiverObject(info); 11238 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11239
10736 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); 11240 Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
10737 if (exceptionState.hadException()) { 11241 if (exceptionState.hadException()) {
10738 return; 11242 return;
10739 } 11243 }
10740 v8SetReturnValue(info, result); 11244 v8SetReturnValue(info, result);
10741 } 11245 }
10742 11246
10743 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 11247 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
10744 { 11248 {
10745 TestObjectV8Internal::valuesMethod(info); 11249 TestObjectV8Internal::valuesMethod(info);
10746 } 11250 }
10747 11251
10748 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11252 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10749 { 11253 {
10750 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestObject", info.Holder(), info.GetIsolate()); 11254 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "entries");
11255
10751 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11256 TestObject* impl = V8TestObject::toImpl(info.Holder());
11257
10752 ScriptState* scriptState = ScriptState::forReceiverObject(info); 11258 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11259
10753 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); 11260 Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
10754 if (exceptionState.hadException()) { 11261 if (exceptionState.hadException()) {
10755 return; 11262 return;
10756 } 11263 }
10757 v8SetReturnValue(info, result); 11264 v8SetReturnValue(info, result);
10758 } 11265 }
10759 11266
10760 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 11267 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
10761 { 11268 {
10762 TestObjectV8Internal::entriesMethod(info); 11269 TestObjectV8Internal::entriesMethod(info);
10763 } 11270 }
10764 11271
10765 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11272 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10766 { 11273 {
10767 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", " TestObject", info.Holder(), info.GetIsolate()); 11274 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "forEach");
11275
11276 TestObject* impl = V8TestObject::toImpl(info.Holder());
11277
11278 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11279
10768 if (UNLIKELY(info.Length() < 1)) { 11280 if (UNLIKELY(info.Length() < 1)) {
10769 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 11281 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10770 return; 11282 return;
10771 } 11283 }
10772 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11284
10773 ScriptValue callback; 11285 ScriptValue callback;
10774 ScriptValue thisArg; 11286 ScriptValue thisArg;
10775 { 11287 if (!info[0]->IsFunction()) {
10776 if (!info[0]->IsFunction()) { 11288 exceptionState.throwTypeError("The callback provided as parameter 1 is n ot a function.");
10777 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); 11289
10778 return; 11290 return;
10779 }
10780 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ;
10781 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
10782 } 11291 }
10783 ScriptState* scriptState = ScriptState::forReceiverObject(info); 11292 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
11293
11294 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
11295
10784 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState); 11296 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState);
10785 if (exceptionState.hadException()) { 11297 if (exceptionState.hadException()) {
10786 return; 11298 return;
10787 } 11299 }
10788 } 11300 }
10789 11301
10790 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 11302 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
10791 { 11303 {
10792 TestObjectV8Internal::forEachMethod(info); 11304 TestObjectV8Internal::forEachMethod(info);
10793 } 11305 }
10794 11306
10795 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11307 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10796 { 11308 {
10797 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test Object", info.Holder(), info.GetIsolate()); 11309 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "has");
11310
11311 TestObject* impl = V8TestObject::toImpl(info.Holder());
11312
11313 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11314
10798 if (UNLIKELY(info.Length() < 1)) { 11315 if (UNLIKELY(info.Length() < 1)) {
10799 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 11316 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10800 return; 11317 return;
10801 } 11318 }
10802 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11319
10803 int key; 11320 int key;
10804 { 11321 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
10805 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 11322 if (exceptionState.hadException())
10806 if (exceptionState.hadException()) 11323 return;
10807 return; 11324
10808 }
10809 ScriptState* scriptState = ScriptState::forReceiverObject(info);
10810 bool result = impl->hasForBinding(scriptState, key, exceptionState); 11325 bool result = impl->hasForBinding(scriptState, key, exceptionState);
10811 if (exceptionState.hadException()) { 11326 if (exceptionState.hadException()) {
10812 return; 11327 return;
10813 } 11328 }
10814 v8SetReturnValueBool(info, result); 11329 v8SetReturnValueBool(info, result);
10815 } 11330 }
10816 11331
10817 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 11332 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10818 { 11333 {
10819 TestObjectV8Internal::hasMethod(info); 11334 TestObjectV8Internal::hasMethod(info);
10820 } 11335 }
10821 11336
10822 static void getMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11337 static void getMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10823 { 11338 {
10824 ExceptionState exceptionState(ExceptionState::ExecutionContext, "get", "Test Object", info.Holder(), info.GetIsolate()); 11339 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "get");
11340
11341 TestObject* impl = V8TestObject::toImpl(info.Holder());
11342
11343 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11344
10825 if (UNLIKELY(info.Length() < 1)) { 11345 if (UNLIKELY(info.Length() < 1)) {
10826 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 11346 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10827 return; 11347 return;
10828 } 11348 }
10829 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11349
10830 int key; 11350 int key;
10831 { 11351 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
10832 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 11352 if (exceptionState.hadException())
10833 if (exceptionState.hadException()) 11353 return;
10834 return; 11354
10835 }
10836 ScriptState* scriptState = ScriptState::forReceiverObject(info);
10837 ScriptValue result = impl->getForBinding(scriptState, key, exceptionState); 11355 ScriptValue result = impl->getForBinding(scriptState, key, exceptionState);
10838 if (exceptionState.hadException()) { 11356 if (exceptionState.hadException()) {
10839 return; 11357 return;
10840 } 11358 }
10841 v8SetReturnValue(info, result.v8Value()); 11359 v8SetReturnValue(info, result.v8Value());
10842 } 11360 }
10843 11361
10844 static void getMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 11362 static void getMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10845 { 11363 {
10846 TestObjectV8Internal::getMethod(info); 11364 TestObjectV8Internal::getMethod(info);
10847 } 11365 }
10848 11366
10849 static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11367 static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10850 { 11368 {
10851 ExceptionState exceptionState(ExceptionState::ExecutionContext, "clear", "Te stObject", info.Holder(), info.GetIsolate()); 11369 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "clear");
11370
10852 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11371 TestObject* impl = V8TestObject::toImpl(info.Holder());
11372
10853 ScriptState* scriptState = ScriptState::forReceiverObject(info); 11373 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11374
10854 impl->clearForBinding(scriptState, exceptionState); 11375 impl->clearForBinding(scriptState, exceptionState);
10855 if (exceptionState.hadException()) { 11376 if (exceptionState.hadException()) {
10856 return; 11377 return;
10857 } 11378 }
10858 } 11379 }
10859 11380
10860 static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 11381 static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10861 { 11382 {
10862 TestObjectV8Internal::clearMethod(info); 11383 TestObjectV8Internal::clearMethod(info);
10863 } 11384 }
10864 11385
10865 static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11386 static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10866 { 11387 {
10867 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T estObject", info.Holder(), info.GetIsolate()); 11388 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "delete");
11389
11390 TestObject* impl = V8TestObject::toImpl(info.Holder());
11391
11392 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11393
10868 if (UNLIKELY(info.Length() < 1)) { 11394 if (UNLIKELY(info.Length() < 1)) {
10869 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 11395 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
10870 return; 11396 return;
10871 } 11397 }
10872 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11398
10873 int key; 11399 int key;
10874 { 11400 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
10875 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 11401 if (exceptionState.hadException())
10876 if (exceptionState.hadException()) 11402 return;
10877 return; 11403
10878 }
10879 ScriptState* scriptState = ScriptState::forReceiverObject(info);
10880 bool result = impl->deleteForBinding(scriptState, key, exceptionState); 11404 bool result = impl->deleteForBinding(scriptState, key, exceptionState);
10881 if (exceptionState.hadException()) { 11405 if (exceptionState.hadException()) {
10882 return; 11406 return;
10883 } 11407 }
10884 v8SetReturnValueBool(info, result); 11408 v8SetReturnValueBool(info, result);
10885 } 11409 }
10886 11410
10887 static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 11411 static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
10888 { 11412 {
10889 TestObjectV8Internal::deleteMethod(info); 11413 TestObjectV8Internal::deleteMethod(info);
10890 } 11414 }
10891 11415
10892 static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11416 static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10893 { 11417 {
10894 ExceptionState exceptionState(ExceptionState::ExecutionContext, "set", "Test Object", info.Holder(), info.GetIsolate()); 11418 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "set");
11419
11420 TestObject* impl = V8TestObject::toImpl(info.Holder());
11421
11422 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11423
10895 if (UNLIKELY(info.Length() < 2)) { 11424 if (UNLIKELY(info.Length() < 2)) {
10896 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 11425 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
10897 return; 11426 return;
10898 } 11427 }
10899 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11428
10900 int key; 11429 int key;
10901 StringOrDouble value; 11430 StringOrDouble value;
10902 { 11431 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
10903 key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionSta te); 11432 if (exceptionState.hadException())
10904 if (exceptionState.hadException()) 11433 return;
10905 return; 11434
10906 V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeCon versionMode::NotNullable, exceptionState); 11435 V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeConvers ionMode::NotNullable, exceptionState);
10907 if (exceptionState.hadException()) 11436 if (exceptionState.hadException())
10908 return; 11437 return;
10909 } 11438
10910 ScriptState* scriptState = ScriptState::forReceiverObject(info);
10911 TestObject* result = impl->setForBinding(scriptState, key, value, exceptionS tate); 11439 TestObject* result = impl->setForBinding(scriptState, key, value, exceptionS tate);
10912 if (exceptionState.hadException()) { 11440 if (exceptionState.hadException()) {
10913 return; 11441 return;
10914 } 11442 }
10915 v8SetReturnValue(info, result); 11443 v8SetReturnValue(info, result);
10916 } 11444 }
10917 11445
10918 static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 11446 static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
10919 { 11447 {
10920 TestObjectV8Internal::setMethod(info); 11448 TestObjectV8Internal::setMethod(info);
10921 } 11449 }
10922 11450
10923 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11451 static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10924 { 11452 {
10925 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11453 TestObject* impl = V8TestObject::toImpl(info.Holder());
11454
10926 v8SetReturnValueString(info, impl->serializerMethod(), info.GetIsolate()); 11455 v8SetReturnValueString(info, impl->serializerMethod(), info.GetIsolate());
10927 } 11456 }
10928 11457
10929 static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 11458 static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
10930 { 11459 {
10931 TestObjectV8Internal::toJSONMethod(info); 11460 TestObjectV8Internal::toJSONMethod(info);
10932 } 11461 }
10933 11462
10934 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11463 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10935 { 11464 {
10936 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11465 TestObject* impl = V8TestObject::toImpl(info.Holder());
11466
10937 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() ); 11467 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() );
10938 } 11468 }
10939 11469
10940 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 11470 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
10941 { 11471 {
10942 TestObjectV8Internal::toStringMethod(info); 11472 TestObjectV8Internal::toStringMethod(info);
10943 } 11473 }
10944 11474
10945 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 11475 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
10946 { 11476 {
10947 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestObject", info.Holder(), info.GetIsolate()); 11477 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestObject", "iterator");
11478
10948 TestObject* impl = V8TestObject::toImpl(info.Holder()); 11479 TestObject* impl = V8TestObject::toImpl(info.Holder());
11480
10949 ScriptState* scriptState = ScriptState::forReceiverObject(info); 11481 ScriptState* scriptState = ScriptState::forReceiverObject(info);
11482
10950 Iterator* result = impl->iterator(scriptState, exceptionState); 11483 Iterator* result = impl->iterator(scriptState, exceptionState);
10951 if (exceptionState.hadException()) { 11484 if (exceptionState.hadException()) {
10952 return; 11485 return;
10953 } 11486 }
10954 v8SetReturnValue(info, result); 11487 v8SetReturnValue(info, result);
10955 } 11488 }
10956 11489
10957 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 11490 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
10958 { 11491 {
10959 TestObjectV8Internal::iteratorMethod(info); 11492 TestObjectV8Internal::iteratorMethod(info);
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
11787 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12320 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
11788 if (!scriptState) 12321 if (!scriptState)
11789 return false; 12322 return false;
11790 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 12323 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
11791 if (!scriptStateInUserScript) 12324 if (!scriptStateInUserScript)
11792 return false; 12325 return false;
11793 12326
11794 ScriptState::Scope scope(scriptState); 12327 ScriptState::Scope scope(scriptState);
11795 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12328 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11796 v8::Local<v8::Value> *argv = 0; 12329 v8::Local<v8::Value> *argv = 0;
11797 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodI mplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scri ptState->isolate()); 12330 ExceptionState exceptionState(scriptState->isolate(), ExceptionState::Execut ionContext, "TestObject", "voidMethodImplementedInPrivateScript");
11798 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "voidMethodImplementedInPrivateScript", holder, 0, argv); 12331 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "voidMethodImplementedInPrivateScript", holder, 0, argv);
11799 if (v8Value.IsEmpty()) 12332 if (v8Value.IsEmpty())
11800 return false; 12333 return false;
11801 RELEASE_ASSERT(!exceptionState.hadException()); 12334 CHECK(!exceptionState.hadException());
11802 return true; 12335 return true;
11803 } 12336 }
11804 12337
11805 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo calFrame* frame, TestObject* holderImpl, int* result) 12338 bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(Lo calFrame* frame, TestObject* holderImpl, int* result)
11806 { 12339 {
11807 if (!frame) 12340 if (!frame)
11808 return false; 12341 return false;
11809 v8::HandleScope handleScope(toIsolate(frame)); 12342 v8::HandleScope handleScope(toIsolate(frame));
11810 ScriptForbiddenScope::AllowUserAgentScript script; 12343 ScriptForbiddenScope::AllowUserAgentScript script;
11811 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12344 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
11812 if (!scriptState) 12345 if (!scriptState)
11813 return false; 12346 return false;
11814 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 12347 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
11815 if (!scriptStateInUserScript) 12348 if (!scriptStateInUserScript)
11816 return false; 12349 return false;
11817 12350
11818 ScriptState::Scope scope(scriptState); 12351 ScriptState::Scope scope(scriptState);
11819 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12352 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11820 v8::Local<v8::Value> *argv = 0; 12353 v8::Local<v8::Value> *argv = 0;
11821 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod ImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scr iptState->isolate()); 12354 ExceptionState exceptionState(scriptState->isolate(), ExceptionState::Execut ionContext, "TestObject", "shortMethodImplementedInPrivateScript");
11822 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "shortMethodImplementedInPrivateScript" , holder, 0, argv); 12355 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "shortMethodImplementedInPrivateScript" , holder, 0, argv);
11823 if (v8Value.IsEmpty()) 12356 if (v8Value.IsEmpty())
11824 return false; 12357 return false;
11825 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState); 12358 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState);
11826 if (exceptionState.hadException()) 12359 if (exceptionState.hadException())
11827 return false; 12360 return false;
11828 *result = cppValue; 12361 *result = cppValue;
11829 RELEASE_ASSERT(!exceptionState.hadException()); 12362 CHECK(!exceptionState.hadException());
11830 return true; 12363 return true;
11831 } 12364 }
11832 12365
11833 bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPriva teScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result ) 12366 bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPriva teScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result )
11834 { 12367 {
11835 if (!frame) 12368 if (!frame)
11836 return false; 12369 return false;
11837 v8::HandleScope handleScope(toIsolate(frame)); 12370 v8::HandleScope handleScope(toIsolate(frame));
11838 ScriptForbiddenScope::AllowUserAgentScript script; 12371 ScriptForbiddenScope::AllowUserAgentScript script;
11839 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12372 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
11840 if (!scriptState) 12373 if (!scriptState)
11841 return false; 12374 return false;
11842 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 12375 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
11843 if (!scriptStateInUserScript) 12376 if (!scriptStateInUserScript)
11844 return false; 12377 return false;
11845 12378
11846 ScriptState::Scope scope(scriptState); 12379 ScriptState::Scope scope(scriptState);
11847 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12380 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11848 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value); 12381 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value);
11849 v8::Local<v8::Value> argv[] = { valueHandle }; 12382 v8::Local<v8::Value> argv[] = { valueHandle };
11850 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context ()->Global(), scriptState->isolate()); 12383 ExceptionState exceptionState(scriptState->isolate(), ExceptionState::Execut ionContext, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScrip t");
11851 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "shortMethodWithShortArgumentImplemente dInPrivateScript", holder, 1, argv); 12384 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "shortMethodWithShortArgumentImplemente dInPrivateScript", holder, 1, argv);
11852 if (v8Value.IsEmpty()) 12385 if (v8Value.IsEmpty())
11853 return false; 12386 return false;
11854 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState); 12387 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState);
11855 if (exceptionState.hadException()) 12388 if (exceptionState.hadException())
11856 return false; 12389 return false;
11857 *result = cppValue; 12390 *result = cppValue;
11858 RELEASE_ASSERT(!exceptionState.hadException()); 12391 CHECK(!exceptionState.hadException());
11859 return true; 12392 return true;
11860 } 12393 }
11861 12394
11862 bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPri vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String * result) 12395 bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPri vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String * result)
11863 { 12396 {
11864 if (!frame) 12397 if (!frame)
11865 return false; 12398 return false;
11866 v8::HandleScope handleScope(toIsolate(frame)); 12399 v8::HandleScope handleScope(toIsolate(frame));
11867 ScriptForbiddenScope::AllowUserAgentScript script; 12400 ScriptForbiddenScope::AllowUserAgentScript script;
11868 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12401 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
11869 if (!scriptState) 12402 if (!scriptState)
11870 return false; 12403 return false;
11871 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 12404 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
11872 if (!scriptStateInUserScript) 12405 if (!scriptStateInUserScript)
11873 return false; 12406 return false;
11874 12407
11875 ScriptState::Scope scope(scriptState); 12408 ScriptState::Scope scope(scriptState);
11876 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12409 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11877 v8::Local<v8::Value> valueHandle = v8String(scriptState->isolate(), value); 12410 v8::Local<v8::Value> valueHandle = v8String(scriptState->isolate(), value);
11878 v8::Local<v8::Value> argv[] = { valueHandle }; 12411 v8::Local<v8::Value> argv[] = { valueHandle };
11879 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho dWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->conte xt()->Global(), scriptState->isolate()); 12412 ExceptionState exceptionState(scriptState->isolate(), ExceptionState::Execut ionContext, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScr ipt");
11880 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "stringMethodWithStringArgumentImplemen tedInPrivateScript", holder, 1, argv); 12413 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "stringMethodWithStringArgumentImplemen tedInPrivateScript", holder, 1, argv);
11881 if (v8Value.IsEmpty()) 12414 if (v8Value.IsEmpty())
11882 return false; 12415 return false;
11883 V8StringResource<> cppValue = v8Value; 12416 V8StringResource<> cppValue = v8Value;
11884 if (!cppValue.prepare()) 12417 if (!cppValue.prepare())
11885 return false; 12418 return false;
11886 *result = cppValue; 12419 *result = cppValue;
11887 RELEASE_ASSERT(!exceptionState.hadException()); 12420 CHECK(!exceptionState.hadException());
11888 return true; 12421 return true;
11889 } 12422 }
11890 12423
11891 bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivate ScriptMethod(LocalFrame* frame, TestObject* holderImpl, Node* value, Node** resu lt) 12424 bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivate ScriptMethod(LocalFrame* frame, TestObject* holderImpl, Node* value, Node** resu lt)
11892 { 12425 {
11893 if (!frame) 12426 if (!frame)
11894 return false; 12427 return false;
11895 v8::HandleScope handleScope(toIsolate(frame)); 12428 v8::HandleScope handleScope(toIsolate(frame));
11896 ScriptForbiddenScope::AllowUserAgentScript script; 12429 ScriptForbiddenScope::AllowUserAgentScript script;
11897 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12430 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
11898 if (!scriptState) 12431 if (!scriptState)
11899 return false; 12432 return false;
11900 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 12433 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
11901 if (!scriptStateInUserScript) 12434 if (!scriptStateInUserScript)
11902 return false; 12435 return false;
11903 12436
11904 ScriptState::Scope scope(scriptState); 12437 ScriptState::Scope scope(scriptState);
11905 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12438 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11906 v8::Local<v8::Value> valueHandle = toV8(value, scriptState->context()->Globa l(), scriptState->isolate()); 12439 v8::Local<v8::Value> valueHandle = toV8(value, scriptState->context()->Globa l(), scriptState->isolate());
11907 v8::Local<v8::Value> argv[] = { valueHandle }; 12440 v8::Local<v8::Value> argv[] = { valueHandle };
11908 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context() ->Global(), scriptState->isolate()); 12441 ExceptionState exceptionState(scriptState->isolate(), ExceptionState::Execut ionContext, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript" );
11909 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "nodeMethodWithNodeArgumentImplementedI nPrivateScript", holder, 1, argv); 12442 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "nodeMethodWithNodeArgumentImplementedI nPrivateScript", holder, 1, argv);
11910 if (v8Value.IsEmpty()) 12443 if (v8Value.IsEmpty())
11911 return false; 12444 return false;
11912 Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value ); 12445 Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value );
11913 *result = cppValue; 12446 *result = cppValue;
11914 RELEASE_ASSERT(!exceptionState.hadException()); 12447 CHECK(!exceptionState.hadException());
11915 return true; 12448 return true;
11916 } 12449 }
11917 12450
11918 bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPri vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Document* document, Node* node, int value1, double value2, String string, Node** result) 12451 bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPri vateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Document* document, Node* node, int value1, double value2, String string, Node** result)
11919 { 12452 {
11920 if (!frame) 12453 if (!frame)
11921 return false; 12454 return false;
11922 v8::HandleScope handleScope(toIsolate(frame)); 12455 v8::HandleScope handleScope(toIsolate(frame));
11923 ScriptForbiddenScope::AllowUserAgentScript script; 12456 ScriptForbiddenScope::AllowUserAgentScript script;
11924 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12457 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
11925 if (!scriptState) 12458 if (!scriptState)
11926 return false; 12459 return false;
11927 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 12460 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
11928 if (!scriptStateInUserScript) 12461 if (!scriptStateInUserScript)
11929 return false; 12462 return false;
11930 12463
11931 ScriptState::Scope scope(scriptState); 12464 ScriptState::Scope scope(scriptState);
11932 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12465 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11933 v8::Local<v8::Value> documentHandle = toV8(document, scriptState->context()- >Global(), scriptState->isolate()); 12466 v8::Local<v8::Value> documentHandle = toV8(document, scriptState->context()- >Global(), scriptState->isolate());
11934 v8::Local<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global( ), scriptState->isolate()); 12467 v8::Local<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global( ), scriptState->isolate());
11935 v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1); 12468 v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1);
11936 v8::Local<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(), value2); 12469 v8::Local<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(), value2);
11937 v8::Local<v8::Value> stringHandle = v8String(scriptState->isolate(), string) ; 12470 v8::Local<v8::Value> stringHandle = v8String(scriptState->isolate(), string) ;
11938 v8::Local<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, va lue2Handle, stringHandle }; 12471 v8::Local<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, va lue2Handle, stringHandle };
11939 ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodW ithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->conte xt()->Global(), scriptState->isolate()); 12472 ExceptionState exceptionState(scriptState->isolate(), ExceptionState::Execut ionContext, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScr ipt");
11940 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "nodeMethodWithVariousArgumentsImplemen tedInPrivateScript", holder, 5, argv); 12473 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "nodeMethodWithVariousArgumentsImplemen tedInPrivateScript", holder, 5, argv);
11941 if (v8Value.IsEmpty()) 12474 if (v8Value.IsEmpty())
11942 return false; 12475 return false;
11943 Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value ); 12476 Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value );
11944 *result = cppValue; 12477 *result = cppValue;
11945 RELEASE_ASSERT(!exceptionState.hadException()); 12478 CHECK(!exceptionState.hadException());
11946 return true; 12479 return true;
11947 } 12480 }
11948 12481
11949 bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* f rame, TestObject* holderImpl, int value1, int value2, int* result) 12482 bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* f rame, TestObject* holderImpl, int value1, int value2, int* result)
11950 { 12483 {
11951 if (!frame) 12484 if (!frame)
11952 return false; 12485 return false;
11953 v8::HandleScope handleScope(toIsolate(frame)); 12486 v8::HandleScope handleScope(toIsolate(frame));
11954 ScriptForbiddenScope::AllowUserAgentScript script; 12487 ScriptForbiddenScope::AllowUserAgentScript script;
11955 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12488 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
11956 if (!scriptState) 12489 if (!scriptState)
11957 return false; 12490 return false;
11958 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 12491 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
11959 if (!scriptStateInUserScript) 12492 if (!scriptStateInUserScript)
11960 return false; 12493 return false;
11961 12494
11962 ScriptState::Scope scope(scriptState); 12495 ScriptState::Scope scope(scriptState);
11963 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12496 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11964 v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1); 12497 v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1);
11965 v8::Local<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate(), value2); 12498 v8::Local<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate(), value2);
11966 v8::Local<v8::Value> argv[] = { value1Handle, value2Handle }; 12499 v8::Local<v8::Value> argv[] = { value1Handle, value2Handle };
11967 ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPr ivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->i solate()); 12500 ExceptionState exceptionState(scriptState->isolate(), ExceptionState::Execut ionContext, "TestObject", "methodForPrivateScriptOnly");
11968 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "methodForPrivateScriptOnly", holder, 2 , argv); 12501 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestObject", "methodForPrivateScriptOnly", holder, 2 , argv);
11969 if (v8Value.IsEmpty()) 12502 if (v8Value.IsEmpty())
11970 return false; 12503 return false;
11971 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState); 12504 int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, ex ceptionState);
11972 if (exceptionState.hadException()) 12505 if (exceptionState.hadException())
11973 return false; 12506 return false;
11974 *result = cppValue; 12507 *result = cppValue;
11975 RELEASE_ASSERT(!exceptionState.hadException()); 12508 CHECK(!exceptionState.hadException());
11976 return true; 12509 return true;
11977 } 12510 }
11978 12511
11979 bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFra me* frame, TestObject* holderImpl, int* result) 12512 bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFra me* frame, TestObject* holderImpl, int* result)
11980 { 12513 {
11981 if (!frame) 12514 if (!frame)
11982 return false; 12515 return false;
11983 v8::HandleScope handleScope(toIsolate(frame)); 12516 v8::HandleScope handleScope(toIsolate(frame));
11984 ScriptForbiddenScope::AllowUserAgentScript script; 12517 ScriptForbiddenScope::AllowUserAgentScript script;
11985 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld()); 12518 ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::pri vateScriptIsolatedWorld());
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
12225 if (!scriptStateInUserScript) 12758 if (!scriptStateInUserScript)
12226 return false; 12759 return false;
12227 12760
12228 ScriptState::Scope scope(scriptState); 12761 ScriptState::Scope scope(scriptState);
12229 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 12762 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
12230 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 12763 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
12231 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 12764 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
12232 } 12765 }
12233 12766
12234 } // namespace blink 12767 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698