OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 #include "config.h" | 7 #include "config.h" |
8 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
11 #include "bindings/core/v8/Dictionary.h" | 11 #include "bindings/core/v8/Dictionary.h" |
12 #include "bindings/core/v8/ExceptionState.h" | 12 #include "bindings/core/v8/ExceptionState.h" |
| 13 #include "bindings/core/v8/Optional.h" |
13 #include "bindings/core/v8/PrivateScriptRunner.h" | 14 #include "bindings/core/v8/PrivateScriptRunner.h" |
14 #include "bindings/core/v8/ScriptCallStackFactory.h" | 15 #include "bindings/core/v8/ScriptCallStackFactory.h" |
15 #include "bindings/core/v8/ScriptPromise.h" | 16 #include "bindings/core/v8/ScriptPromise.h" |
16 #include "bindings/core/v8/ScriptState.h" | 17 #include "bindings/core/v8/ScriptState.h" |
17 #include "bindings/core/v8/ScriptValue.h" | 18 #include "bindings/core/v8/ScriptValue.h" |
18 #include "bindings/core/v8/SerializedScriptValue.h" | 19 #include "bindings/core/v8/SerializedScriptValue.h" |
19 #include "bindings/core/v8/V8AbstractEventListener.h" | 20 #include "bindings/core/v8/V8AbstractEventListener.h" |
20 #include "bindings/core/v8/V8DOMActivityLogger.h" | 21 #include "bindings/core/v8/V8DOMActivityLogger.h" |
21 #include "bindings/core/v8/V8DOMConfiguration.h" | 22 #include "bindings/core/v8/V8DOMConfiguration.h" |
22 #include "bindings/core/v8/V8EventListenerList.h" | 23 #include "bindings/core/v8/V8EventListenerList.h" |
(...skipping 6634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6657 { | 6658 { |
6658 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6659 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
6659 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); | 6660 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); |
6660 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6661 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
6661 } | 6662 } |
6662 | 6663 |
6663 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6664 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
6664 { | 6665 { |
6665 TestObject* impl = V8TestObject::toNative(info.Holder()); | 6666 TestObject* impl = V8TestObject::toNative(info.Holder()); |
6666 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; | 6667 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; |
| 6668 bool optionalTestCallbackInterfaceArgMissing = false; |
6667 { | 6669 { |
6668 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 6670 if (!info[0]->IsUndefined()) { |
6669 if (!info[0]->IsFunction()) { | 6671 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
6670 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback pr
ovided as parameter 1 is not a function."), info.GetIsolate()); | 6672 if (!info[0]->IsFunction()) { |
6671 return; | 6673 V8ThrowException::throwTypeError(ExceptionMessages::failedTo
Execute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callbac
k provided as parameter 1 is not a function."), info.GetIsolate()); |
| 6674 return; |
| 6675 } |
| 6676 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::crea
te(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate
())); |
6672 } | 6677 } |
6673 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 6678 } else { |
| 6679 optionalTestCallbackInterfaceArgMissing = true; |
6674 } | 6680 } |
6675 } | 6681 } |
6676 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg.release()); | 6682 impl->voidMethodOptionalTestCallbackInterfaceArg(Optional<OwnPtr<TestCallbac
kInterface> >(optionalTestCallbackInterfaceArg, optionalTestCallbackInterfaceArg
Missing)); |
6677 } | 6683 } |
6678 | 6684 |
6679 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 6685 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
6680 { | 6686 { |
6681 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6687 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
6682 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; | 6688 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; |
6683 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6689 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
6684 } | 6690 } |
6685 | 6691 |
6686 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 6692 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7036 { | 7042 { |
7037 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7043 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7038 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); | 7044 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); |
7039 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7045 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7040 } | 7046 } |
7041 | 7047 |
7042 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7048 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7043 { | 7049 { |
7044 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7050 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7045 V8StringResource<> optionalStringArg; | 7051 V8StringResource<> optionalStringArg; |
| 7052 bool optionalStringArgMissing = false; |
7046 { | 7053 { |
7047 if (UNLIKELY(info.Length() <= 0)) { | 7054 if (!info[0]->IsUndefined()) { |
7048 impl->voidMethodOptionalStringArg(); | 7055 TOSTRING_VOID_INTERNAL(optionalStringArg, info[0]); |
7049 return; | 7056 } else { |
| 7057 optionalStringArgMissing = true; |
7050 } | 7058 } |
7051 TOSTRING_VOID_INTERNAL(optionalStringArg, info[0]); | |
7052 } | 7059 } |
7053 impl->voidMethodOptionalStringArg(optionalStringArg); | 7060 impl->voidMethodOptionalStringArg(Optional<V8StringResource<> >(optionalStri
ngArg, optionalStringArgMissing)); |
7054 } | 7061 } |
7055 | 7062 |
7056 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7063 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
7057 { | 7064 { |
7058 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7065 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7059 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); | 7066 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); |
7060 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7067 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7061 } | 7068 } |
7062 | 7069 |
7063 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7070 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
7064 { | 7071 { |
7065 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7072 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7066 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; | 7073 TestInterfaceEmpty* optionalTestInterfaceEmptyArg = nullptr; |
| 7074 bool optionalTestInterfaceEmptyArgMissing = false; |
7067 { | 7075 { |
7068 v8::TryCatch block; | 7076 v8::TryCatch block; |
7069 V8RethrowTryCatchScope rethrow(block); | 7077 V8RethrowTryCatchScope rethrow(block); |
7070 if (UNLIKELY(info.Length() <= 0)) { | 7078 if (!info[0]->IsUndefined()) { |
7071 impl->voidMethodOptionalTestInterfaceEmptyArg(); | 7079 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfac
eEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
7072 return; | 7080 } else { |
| 7081 optionalTestInterfaceEmptyArgMissing = true; |
7073 } | 7082 } |
7074 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
7075 } | 7083 } |
7076 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg)
; | 7084 impl->voidMethodOptionalTestInterfaceEmptyArg(Optional<RefPtr<TestInterfaceE
mpty> >(optionalTestInterfaceEmptyArg, optionalTestInterfaceEmptyArgMissing)); |
7077 } | 7085 } |
7078 | 7086 |
7079 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7087 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7080 { | 7088 { |
7081 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7089 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7082 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); | 7090 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); |
7083 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7091 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7084 } | 7092 } |
7085 | 7093 |
7086 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7094 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
7087 { | 7095 { |
7088 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7096 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7089 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7097 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7090 int optionalLongArg; | 7098 int optionalLongArg = 0; |
| 7099 bool optionalLongArgMissing = false; |
7091 { | 7100 { |
7092 v8::TryCatch block; | 7101 v8::TryCatch block; |
7093 V8RethrowTryCatchScope rethrow(block); | 7102 V8RethrowTryCatchScope rethrow(block); |
7094 if (UNLIKELY(info.Length() <= 0)) { | 7103 if (!info[0]->IsUndefined()) { |
7095 impl->voidMethodOptionalLongArg(); | 7104 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[
0], exceptionState), exceptionState); |
7096 return; | 7105 } else { |
| 7106 optionalLongArgMissing = true; |
7097 } | 7107 } |
7098 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
7099 } | 7108 } |
7100 impl->voidMethodOptionalLongArg(optionalLongArg); | 7109 impl->voidMethodOptionalLongArg(Optional<int>(optionalLongArg, optionalLongA
rgMissing)); |
7101 } | 7110 } |
7102 | 7111 |
7103 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7112 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
7104 { | 7113 { |
7105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7114 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7106 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); | 7115 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); |
7107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7116 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7108 } | 7117 } |
7109 | 7118 |
7110 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7119 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7111 { | 7120 { |
7112 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7121 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho
dOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7113 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7122 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7114 int optionalLongArg; | 7123 int optionalLongArg = 0; |
| 7124 bool optionalLongArgMissing = false; |
7115 { | 7125 { |
7116 v8::TryCatch block; | 7126 v8::TryCatch block; |
7117 V8RethrowTryCatchScope rethrow(block); | 7127 V8RethrowTryCatchScope rethrow(block); |
7118 if (UNLIKELY(info.Length() <= 0)) { | 7128 if (!info[0]->IsUndefined()) { |
7119 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), in
fo.GetIsolate()); | 7129 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[
0], exceptionState), exceptionState); |
7120 return; | 7130 } else { |
| 7131 optionalLongArgMissing = true; |
7121 } | 7132 } |
7122 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
7123 } | 7133 } |
7124 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA
rg), info.GetIsolate()); | 7134 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(Optional<int>
(optionalLongArg, optionalLongArgMissing)), info.GetIsolate()); |
7125 } | 7135 } |
7126 | 7136 |
7127 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 7137 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
7128 { | 7138 { |
7129 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7139 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7130 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); | 7140 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); |
7131 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7141 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7132 } | 7142 } |
7133 | 7143 |
7134 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 7144 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
7135 { | 7145 { |
7136 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7146 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa
ceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7137 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7147 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7138 int optionalLongArg; | 7148 int optionalLongArg = 0; |
| 7149 bool optionalLongArgMissing = false; |
7139 { | 7150 { |
7140 v8::TryCatch block; | 7151 v8::TryCatch block; |
7141 V8RethrowTryCatchScope rethrow(block); | 7152 V8RethrowTryCatchScope rethrow(block); |
7142 if (UNLIKELY(info.Length() <= 0)) { | 7153 if (!info[0]->IsUndefined()) { |
7143 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg
()); | 7154 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[
0], exceptionState), exceptionState); |
7144 return; | 7155 } else { |
| 7156 optionalLongArgMissing = true; |
7145 } | 7157 } |
7146 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
7147 } | 7158 } |
7148 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona
lLongArg)); | 7159 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(Optiona
l<int>(optionalLongArg, optionalLongArgMissing))); |
7149 } | 7160 } |
7150 | 7161 |
7151 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7162 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7152 { | 7163 { |
7153 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7154 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); | 7165 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); |
7155 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7156 } | 7167 } |
7157 | 7168 |
7158 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 7169 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
7159 { | 7170 { |
7160 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7171 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO
ptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7161 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7172 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7162 int optionalLongArg; | 7173 int optionalLongArg = 0; |
| 7174 bool optionalLongArgMissing = false; |
7163 { | 7175 { |
7164 v8::TryCatch block; | 7176 v8::TryCatch block; |
7165 V8RethrowTryCatchScope rethrow(block); | 7177 V8RethrowTryCatchScope rethrow(block); |
7166 if (UNLIKELY(info.Length() <= 0)) { | 7178 if (!info[0]->IsUndefined()) { |
7167 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); | 7179 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[
0], exceptionState), exceptionState); |
7168 return; | 7180 } else { |
| 7181 optionalLongArgMissing = true; |
7169 } | 7182 } |
7170 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
7171 } | 7183 } |
7172 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); | 7184 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(Optional<int>(opti
onalLongArg, optionalLongArgMissing))); |
7173 } | 7185 } |
7174 | 7186 |
7175 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 7187 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
7176 { | 7188 { |
7177 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7189 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7178 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); | 7190 TestObjectV8Internal::longMethodOptionalLongArgMethod(info); |
7179 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7191 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7180 } | 7192 } |
7181 | 7193 |
7182 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) | 7194 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf
o<v8::Value>& info) |
7183 { | 7195 { |
7184 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 7196 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
7185 if (UNLIKELY(info.Length() < 1)) { | 7197 if (UNLIKELY(info.Length() < 1)) { |
7186 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7198 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7187 exceptionState.throwIfNeeded(); | 7199 exceptionState.throwIfNeeded(); |
7188 return; | 7200 return; |
7189 } | 7201 } |
7190 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7202 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7191 int longArg; | 7203 int longArg; |
7192 int optionalLongArg; | 7204 int optionalLongArg = 0; |
| 7205 bool optionalLongArgMissing = false; |
7193 { | 7206 { |
7194 v8::TryCatch block; | 7207 v8::TryCatch block; |
7195 V8RethrowTryCatchScope rethrow(block); | 7208 V8RethrowTryCatchScope rethrow(block); |
7196 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7209 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
7197 if (UNLIKELY(info.Length() <= 1)) { | 7210 if (!info[1]->IsUndefined()) { |
7198 impl->voidMethodLongArgOptionalLongArg(longArg); | 7211 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[
1], exceptionState), exceptionState); |
7199 return; | 7212 } else { |
| 7213 optionalLongArgMissing = true; |
7200 } | 7214 } |
7201 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[1],
exceptionState), exceptionState); | |
7202 } | 7215 } |
7203 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); | 7216 impl->voidMethodLongArgOptionalLongArg(longArg, Optional<int>(optionalLongAr
g, optionalLongArgMissing)); |
7204 } | 7217 } |
7205 | 7218 |
7206 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 7219 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
7207 { | 7220 { |
7208 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7221 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7209 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); | 7222 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); |
7210 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7211 } | 7224 } |
7212 | 7225 |
7213 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | 7226 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
7214 { | 7227 { |
7215 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); | 7228 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsol
ate()); |
7216 if (UNLIKELY(info.Length() < 1)) { | 7229 if (UNLIKELY(info.Length() < 1)) { |
7217 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7230 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7218 exceptionState.throwIfNeeded(); | 7231 exceptionState.throwIfNeeded(); |
7219 return; | 7232 return; |
7220 } | 7233 } |
7221 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7234 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7222 int longArg; | 7235 int longArg; |
7223 int optionalLongArg1; | 7236 int optionalLongArg1 = 0; |
7224 int optionalLongArg2; | 7237 bool optionalLongArg1Missing = false; |
| 7238 int optionalLongArg2 = 0; |
| 7239 bool optionalLongArg2Missing = false; |
7225 { | 7240 { |
7226 v8::TryCatch block; | 7241 v8::TryCatch block; |
7227 V8RethrowTryCatchScope rethrow(block); | 7242 V8RethrowTryCatchScope rethrow(block); |
7228 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7243 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
7229 if (UNLIKELY(info.Length() <= 1)) { | 7244 if (!info[1]->IsUndefined()) { |
7230 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); | 7245 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg1, toInt32(info
[1], exceptionState), exceptionState); |
7231 return; | 7246 } else { |
| 7247 optionalLongArg1Missing = true; |
7232 } | 7248 } |
7233 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg1, toInt32(info[1],
exceptionState), exceptionState); | 7249 if (!info[2]->IsUndefined()) { |
7234 if (UNLIKELY(info.Length() <= 2)) { | 7250 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg2, toInt32(info
[2], exceptionState), exceptionState); |
7235 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optio
nalLongArg1); | 7251 } else { |
7236 return; | 7252 optionalLongArg2Missing = true; |
7237 } | 7253 } |
7238 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg2, toInt32(info[2],
exceptionState), exceptionState); | |
7239 } | 7254 } |
7240 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA
rg1, optionalLongArg2); | 7255 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, Optional<int>
(optionalLongArg1, optionalLongArg1Missing), Optional<int>(optionalLongArg2, opt
ionalLongArg2Missing)); |
7241 } | 7256 } |
7242 | 7257 |
7243 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 7258 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
7244 { | 7259 { |
7245 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7260 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7246 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(
info); | 7261 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(
info); |
7247 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7262 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7248 } | 7263 } |
7249 | 7264 |
7250 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7265 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
7251 { | 7266 { |
7252 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); | 7267 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL
ongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsola
te()); |
7253 if (UNLIKELY(info.Length() < 1)) { | 7268 if (UNLIKELY(info.Length() < 1)) { |
7254 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7269 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7255 exceptionState.throwIfNeeded(); | 7270 exceptionState.throwIfNeeded(); |
7256 return; | 7271 return; |
7257 } | 7272 } |
7258 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7273 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7259 int longArg; | 7274 int longArg; |
7260 TestInterfaceEmpty* optionalTestInterfaceEmpty; | 7275 TestInterfaceEmpty* optionalTestInterfaceEmpty = nullptr; |
| 7276 bool optionalTestInterfaceEmptyMissing = false; |
7261 { | 7277 { |
7262 v8::TryCatch block; | 7278 v8::TryCatch block; |
7263 V8RethrowTryCatchScope rethrow(block); | 7279 V8RethrowTryCatchScope rethrow(block); |
7264 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7280 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
7265 if (UNLIKELY(info.Length() <= 1)) { | 7281 if (!info[1]->IsUndefined()) { |
7266 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); | 7282 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEm
pty::toNativeWithTypeCheck(info.GetIsolate(), info[1])); |
7267 return; | 7283 } else { |
| 7284 optionalTestInterfaceEmptyMissing = true; |
7268 } | 7285 } |
7269 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toNativeWithTypeCheck(info.GetIsolate(), info[1])); | |
7270 } | 7286 } |
7271 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn
terfaceEmpty); | 7287 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, Optional<RefPt
r<TestInterfaceEmpty> >(optionalTestInterfaceEmpty, optionalTestInterfaceEmptyMi
ssing)); |
7272 } | 7288 } |
7273 | 7289 |
7274 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 7290 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
7275 { | 7291 { |
7276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7292 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7277 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); | 7293 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(i
nfo); |
7278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7294 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7279 } | 7295 } |
7280 | 7296 |
7281 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 7297 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
7282 { | 7298 { |
7283 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); | 7299 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT
estInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsola
te()); |
7284 if (UNLIKELY(info.Length() < 1)) { | 7300 if (UNLIKELY(info.Length() < 1)) { |
7285 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 7301 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
7286 exceptionState.throwIfNeeded(); | 7302 exceptionState.throwIfNeeded(); |
7287 return; | 7303 return; |
7288 } | 7304 } |
7289 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7305 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7290 TestInterfaceEmpty* optionalTestInterfaceEmpty; | 7306 TestInterfaceEmpty* optionalTestInterfaceEmpty; |
7291 int longArg; | 7307 int longArg = 0; |
| 7308 bool longArgMissing = false; |
7292 { | 7309 { |
7293 v8::TryCatch block; | 7310 v8::TryCatch block; |
7294 V8RethrowTryCatchScope rethrow(block); | 7311 V8RethrowTryCatchScope rethrow(block); |
7295 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 7312 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmpty, V8TestInterfaceEmpty:
:toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
7296 if (UNLIKELY(info.Length() <= 1)) { | 7313 if (!info[1]->IsUndefined()) { |
7297 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInt
erfaceEmpty); | 7314 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exce
ptionState), exceptionState); |
7298 return; | 7315 } else { |
| 7316 longArgMissing = true; |
7299 } | 7317 } |
7300 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | |
7301 } | 7318 } |
7302 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, longArg); | 7319 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm
pty, Optional<int>(longArg, longArgMissing)); |
7303 } | 7320 } |
7304 | 7321 |
7305 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 7322 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
7306 { | 7323 { |
7307 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7324 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7308 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); | 7325 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i
nfo); |
7309 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7326 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7310 } | 7327 } |
7311 | 7328 |
7312 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 7329 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
7313 { | 7330 { |
7314 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7331 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7315 Dictionary optionalDictionaryArg; | 7332 Dictionary optionalDictionaryArg; |
| 7333 bool optionalDictionaryArgMissing = false; |
7316 { | 7334 { |
7317 v8::TryCatch block; | 7335 v8::TryCatch block; |
7318 V8RethrowTryCatchScope rethrow(block); | 7336 V8RethrowTryCatchScope rethrow(block); |
7319 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.G
etIsolate())); | 7337 if (!info[0]->IsUndefined()) { |
7320 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { | 7338 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], in
fo.GetIsolate())); |
7321 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona
ryArg') is not an object."), info.GetIsolate()); | 7339 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionar
yArg.isObject()) { |
7322 return; | 7340 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDict
ionaryArg') is not an object."), info.GetIsolate()); |
| 7341 return; |
| 7342 } |
| 7343 } else { |
| 7344 optionalDictionaryArgMissing = true; |
7323 } | 7345 } |
7324 } | 7346 } |
7325 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); | 7347 impl->voidMethodOptionalDictionaryArg(Optional<Dictionary>(optionalDictionar
yArg, optionalDictionaryArgMissing)); |
7326 } | 7348 } |
7327 | 7349 |
7328 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 7350 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
7329 { | 7351 { |
7330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7352 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7331 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); | 7353 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); |
7332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7354 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7333 } | 7355 } |
7334 | 7356 |
7335 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 7357 static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7543 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); | 7565 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); |
7544 } | 7566 } |
7545 | 7567 |
7546 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 7568 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
7547 { | 7569 { |
7548 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7570 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7549 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); | 7571 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); |
7550 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7572 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7551 } | 7573 } |
7552 | 7574 |
| 7575 static void voidMethodOptionalArgWithoutDefaultMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
| 7576 { |
| 7577 TestObject* impl = V8TestObject::toNative(info.Holder()); |
| 7578 V8StringResource<> optionalStringArg; |
| 7579 bool optionalStringArgMissing = false; |
| 7580 bool defaultBooleanArg; |
| 7581 { |
| 7582 v8::TryCatch block; |
| 7583 V8RethrowTryCatchScope rethrow(block); |
| 7584 if (!info[0]->IsUndefined()) { |
| 7585 TOSTRING_VOID_INTERNAL(optionalStringArg, info[0]); |
| 7586 } else { |
| 7587 optionalStringArgMissing = true; |
| 7588 } |
| 7589 if (!info[1]->IsUndefined()) { |
| 7590 TONATIVE_VOID_INTERNAL(defaultBooleanArg, info[1]->BooleanValue()); |
| 7591 } else { |
| 7592 defaultBooleanArg = false; |
| 7593 } |
| 7594 } |
| 7595 impl->voidMethodOptionalArgWithoutDefault(Optional<V8StringResource<> >(opti
onalStringArg, optionalStringArgMissing), defaultBooleanArg); |
| 7596 } |
| 7597 |
| 7598 static void voidMethodOptionalArgWithoutDefaultMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 7599 { |
| 7600 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7601 TestObjectV8Internal::voidMethodOptionalArgWithoutDefaultMethod(info); |
| 7602 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7603 } |
| 7604 |
7553 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 7605 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
7554 { | 7606 { |
7555 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7607 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7556 Vector<String> variadicStringArgs; | 7608 Vector<String> variadicStringArgs; |
7557 { | 7609 { |
7558 v8::TryCatch block; | 7610 v8::TryCatch block; |
7559 V8RethrowTryCatchScope rethrow(block); | 7611 V8RethrowTryCatchScope rethrow(block); |
7560 TONATIVE_VOID_INTERNAL(variadicStringArgs, toNativeArguments<String>(inf
o, 0)); | 7612 TONATIVE_VOID_INTERNAL(variadicStringArgs, toNativeArguments<String>(inf
o, 0)); |
7561 } | 7613 } |
7562 impl->voidMethodVariadicStringArg(variadicStringArgs); | 7614 impl->voidMethodVariadicStringArg(variadicStringArgs); |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7765 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); | 7817 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
7766 } | 7818 } |
7767 impl->overloadedMethodB(longArg); | 7819 impl->overloadedMethodB(longArg); |
7768 } | 7820 } |
7769 | 7821 |
7770 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 7822 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7771 { | 7823 { |
7772 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 7824 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
7773 TestObject* impl = V8TestObject::toNative(info.Holder()); | 7825 TestObject* impl = V8TestObject::toNative(info.Holder()); |
7774 V8StringResource<> stringArg; | 7826 V8StringResource<> stringArg; |
7775 int longArg; | 7827 int longArg = 0; |
| 7828 bool longArgMissing = false; |
7776 { | 7829 { |
7777 v8::TryCatch block; | 7830 v8::TryCatch block; |
7778 V8RethrowTryCatchScope rethrow(block); | 7831 V8RethrowTryCatchScope rethrow(block); |
7779 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 7832 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
7780 if (UNLIKELY(info.Length() <= 1)) { | 7833 if (!info[1]->IsUndefined()) { |
7781 impl->overloadedMethodB(stringArg); | 7834 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exce
ptionState), exceptionState); |
7782 return; | 7835 } else { |
| 7836 longArgMissing = true; |
7783 } | 7837 } |
7784 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | |
7785 } | 7838 } |
7786 impl->overloadedMethodB(stringArg, longArg); | 7839 impl->overloadedMethodB(stringArg, Optional<int>(longArg, longArgMissing)); |
7787 } | 7840 } |
7788 | 7841 |
7789 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 7842 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
7790 { | 7843 { |
7791 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); | 7844 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodB", "TestObject", info.Holder(), info.GetIsolate()); |
7792 switch (std::min(2, info.Length())) { | 7845 switch (std::min(2, info.Length())) { |
7793 case 1: | 7846 case 1: |
7794 if (info[0]->IsNumber()) { | 7847 if (info[0]->IsNumber()) { |
7795 overloadedMethodB1Method(info); | 7848 overloadedMethodB1Method(info); |
7796 return; | 7849 return; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7992 { | 8045 { |
7993 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8046 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
7994 TestObjectV8Internal::overloadedMethodEMethod(info); | 8047 TestObjectV8Internal::overloadedMethodEMethod(info); |
7995 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8048 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
7996 } | 8049 } |
7997 | 8050 |
7998 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8051 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
7999 { | 8052 { |
8000 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8053 TestObject* impl = V8TestObject::toNative(info.Holder()); |
8001 V8StringResource<> stringArg; | 8054 V8StringResource<> stringArg; |
| 8055 bool stringArgMissing = false; |
8002 { | 8056 { |
8003 if (UNLIKELY(info.Length() <= 0)) { | 8057 if (!info[0]->IsUndefined()) { |
8004 impl->overloadedMethodF(); | 8058 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
8005 return; | 8059 } else { |
| 8060 stringArgMissing = true; |
8006 } | 8061 } |
8007 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | |
8008 } | 8062 } |
8009 impl->overloadedMethodF(stringArg); | 8063 impl->overloadedMethodF(Optional<V8StringResource<> >(stringArg, stringArgMi
ssing)); |
8010 } | 8064 } |
8011 | 8065 |
8012 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8066 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
8013 { | 8067 { |
8014 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8068 TestObject* impl = V8TestObject::toNative(info.Holder()); |
8015 double doubleArg; | 8069 double doubleArg; |
8016 { | 8070 { |
8017 v8::TryCatch block; | 8071 v8::TryCatch block; |
8018 V8RethrowTryCatchScope rethrow(block); | 8072 V8RethrowTryCatchScope rethrow(block); |
8019 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | 8073 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8509 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); | 8563 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); |
8510 } | 8564 } |
8511 | 8565 |
8512 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 8566 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
8513 { | 8567 { |
8514 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8568 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
8515 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); | 8569 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); |
8516 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8570 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
8517 } | 8571 } |
8518 | 8572 |
8519 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) | |
8520 { | |
8521 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
8522 TestInterfaceEmpty* defaultUndefinedTestInterfaceEmptyArg; | |
8523 { | |
8524 v8::TryCatch block; | |
8525 V8RethrowTryCatchScope rethrow(block); | |
8526 TONATIVE_VOID_INTERNAL(defaultUndefinedTestInterfaceEmptyArg, V8TestInte
rfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | |
8527 } | |
8528 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn
terfaceEmptyArg); | |
8529 } | |
8530 | |
8531 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | |
8532 { | |
8533 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
8534 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(
info); | |
8535 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
8536 } | |
8537 | |
8538 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn
fo<v8::Value>& info) | |
8539 { | |
8540 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
efaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); | |
8541 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
8542 int defaultUndefinedLongArg; | |
8543 { | |
8544 v8::TryCatch block; | |
8545 V8RethrowTryCatchScope rethrow(block); | |
8546 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedLongArg, toInt32(i
nfo[0], exceptionState), exceptionState); | |
8547 } | |
8548 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); | |
8549 } | |
8550 | |
8551 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) | |
8552 { | |
8553 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
8554 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); | |
8555 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
8556 } | |
8557 | |
8558 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback
Info<v8::Value>& info) | |
8559 { | |
8560 TestObject* impl = V8TestObject::toNative(info.Holder()); | |
8561 V8StringResource<> defaultUndefinedStringArg; | |
8562 { | |
8563 TOSTRING_VOID_INTERNAL(defaultUndefinedStringArg, info[0]); | |
8564 } | |
8565 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); | |
8566 } | |
8567 | |
8568 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | |
8569 { | |
8570 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
8571 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); | |
8572 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
8573 } | |
8574 | |
8575 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) | 8573 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v
8::Value>& info) |
8576 { | 8574 { |
8577 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 8575 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE
nforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
8578 if (UNLIKELY(info.Length() < 1)) { | 8576 if (UNLIKELY(info.Length() < 1)) { |
8579 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 8577 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
8580 exceptionState.throwIfNeeded(); | 8578 exceptionState.throwIfNeeded(); |
8581 return; | 8579 return; |
8582 } | 8580 } |
8583 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8581 TestObject* impl = V8TestObject::toNative(info.Holder()); |
8584 int enforceRangeLongArg; | 8582 int enforceRangeLongArg; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8748 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 8746 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
8749 { | 8747 { |
8750 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8748 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
8751 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); | 8749 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(inf
o); |
8752 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8750 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
8753 } | 8751 } |
8754 | 8752 |
8755 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) | 8753 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
(const v8::FunctionCallbackInfo<v8::Value>& info) |
8756 { | 8754 { |
8757 TestObject* impl = V8TestObject::toNative(info.Holder()); | 8755 TestObject* impl = V8TestObject::toNative(info.Holder()); |
8758 bool optionalBooleanArg; | 8756 bool optionalBooleanArg = false; |
| 8757 bool optionalBooleanArgMissing = false; |
8759 { | 8758 { |
8760 v8::TryCatch block; | 8759 v8::TryCatch block; |
8761 V8RethrowTryCatchScope rethrow(block); | 8760 V8RethrowTryCatchScope rethrow(block); |
8762 if (UNLIKELY(info.Length() <= 0)) { | 8761 if (!info[0]->IsUndefined()) { |
8763 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8762 TONATIVE_VOID_INTERNAL(optionalBooleanArg, info[0]->BooleanValue()); |
8764 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArgu
ments(scriptState, info, 1)); | 8763 } else { |
8765 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg
(scriptState, scriptArguments.release()); | 8764 optionalBooleanArgMissing = true; |
8766 return; | |
8767 } | 8765 } |
8768 TONATIVE_VOID_INTERNAL(optionalBooleanArg, info[0]->BooleanValue()); | |
8769 } | 8766 } |
8770 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 8767 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
8771 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 1)); | 8768 RefPtrWillBeRawPtr<ScriptArguments> scriptArguments(createScriptArguments(sc
riptState, info, 1)); |
8772 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments.release(), optionalBooleanArg); | 8769 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptS
tate, scriptArguments.release(), Optional<bool>(optionalBooleanArg, optionalBool
eanArgMissing)); |
8773 } | 8770 } |
8774 | 8771 |
8775 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) | 8772 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod
Callback(const v8::FunctionCallbackInfo<v8::Value>& info) |
8776 { | 8773 { |
8777 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8774 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
8778 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); | 8775 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBo
oleanArgMethod(info); |
8779 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8776 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
8780 } | 8777 } |
8781 | 8778 |
8782 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 8779 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9530 { | 9527 { |
9531 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9528 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9532 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); | 9529 TestObjectV8Internal::raisesExceptionStringMethodMethod(info); |
9533 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9530 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
9534 } | 9531 } |
9535 | 9532 |
9536 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 9533 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
9537 { | 9534 { |
9538 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); | 9535 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
9539 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9536 TestObject* impl = V8TestObject::toNative(info.Holder()); |
9540 int optionalLongArg; | 9537 int optionalLongArg = 0; |
| 9538 bool optionalLongArgMissing = false; |
9541 { | 9539 { |
9542 v8::TryCatch block; | 9540 v8::TryCatch block; |
9543 V8RethrowTryCatchScope rethrow(block); | 9541 V8RethrowTryCatchScope rethrow(block); |
9544 if (UNLIKELY(info.Length() <= 0)) { | 9542 if (!info[0]->IsUndefined()) { |
9545 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | 9543 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[
0], exceptionState), exceptionState); |
9546 if (exceptionState.hadException()) { | 9544 } else { |
9547 exceptionState.throwIfNeeded(); | 9545 optionalLongArgMissing = true; |
9548 return; | |
9549 } | |
9550 return; | |
9551 } | 9546 } |
9552 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(optionalLongArg, toInt32(info[0],
exceptionState), exceptionState); | |
9553 } | 9547 } |
9554 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta
te); | 9548 impl->raisesExceptionVoidMethodOptionalLongArg(Optional<int>(optionalLongArg
, optionalLongArgMissing), exceptionState); |
9555 if (exceptionState.hadException()) { | 9549 if (exceptionState.hadException()) { |
9556 exceptionState.throwIfNeeded(); | 9550 exceptionState.throwIfNeeded(); |
9557 return; | 9551 return; |
9558 } | 9552 } |
9559 } | 9553 } |
9560 | 9554 |
9561 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 9555 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
9562 { | 9556 { |
9563 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9557 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9564 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); | 9558 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); |
(...skipping 30 matching lines...) Expand all Loading... |
9595 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9589 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9596 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 9590 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); |
9597 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9591 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
9598 } | 9592 } |
9599 | 9593 |
9600 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9594 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
9601 { | 9595 { |
9602 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 9596 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); |
9603 TestObject* impl = V8TestObject::toNative(info.Holder()); | 9597 TestObject* impl = V8TestObject::toNative(info.Holder()); |
9604 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; | 9598 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg; |
| 9599 bool optionalTestCallbackInterfaceArgMissing = false; |
9605 { | 9600 { |
9606 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 9601 if (!info[0]->IsUndefined()) { |
9607 if (!info[0]->IsFunction()) { | 9602 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { |
9608 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); | 9603 if (!info[0]->IsFunction()) { |
9609 exceptionState.throwIfNeeded(); | 9604 exceptionState.throwTypeError("The callback provided as para
meter 1 is not a function."); |
9610 return; | 9605 exceptionState.throwIfNeeded(); |
| 9606 return; |
| 9607 } |
| 9608 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::crea
te(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate
())); |
9611 } | 9609 } |
9612 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 9610 } else { |
| 9611 optionalTestCallbackInterfaceArgMissing = true; |
9613 } | 9612 } |
9614 } | 9613 } |
9615 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); | 9614 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(Optional<Own
Ptr<TestCallbackInterface> >(optionalTestCallbackInterfaceArg, optionalTestCallb
ackInterfaceArgMissing), exceptionState); |
9616 if (exceptionState.hadException()) { | 9615 if (exceptionState.hadException()) { |
9617 exceptionState.throwIfNeeded(); | 9616 exceptionState.throwIfNeeded(); |
9618 return; | 9617 return; |
9619 } | 9618 } |
9620 } | 9619 } |
9621 | 9620 |
9622 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 9621 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
9623 { | 9622 { |
9624 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9623 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
9625 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 9624 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10584 {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptional
DictionaryArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10583 {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptional
DictionaryArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10585 {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultBy
teStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10584 {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultBy
teStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10586 {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultString
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10585 {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultString
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10587 {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultInte
gerArgsMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10586 {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultInte
gerArgsMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10588 {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDouble
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10587 {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDouble
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10589 {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultT
rueBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10588 {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultT
rueBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10590 {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefault
FalseBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10589 {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefault
FalseBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10591 {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodD
efaultNullableByteStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAl
lScripts}, | 10590 {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodD
efaultNullableByteStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAl
lScripts}, |
10592 {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefau
ltNullableStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts
}, | 10591 {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefau
ltNullableStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts
}, |
10593 {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMeth
odDefaultNullableTestInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Expos
edToAllScripts}, | 10592 {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMeth
odDefaultNullableTestInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Expos
edToAllScripts}, |
| 10593 {"voidMethodOptionalArgWithoutDefault", TestObjectV8Internal::voidMethodOpti
onalArgWithoutDefaultMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts}, |
10594 {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStri
ngArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10594 {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStri
ngArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10595 {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStr
ingArgVariadicStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScr
ipts}, | 10595 {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStr
ingArgVariadicStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScr
ipts}, |
10596 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
VariadicTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, | 10596 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod
VariadicTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, |
10597 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV
8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10597 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV
8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10598 {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal:
:voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, | 10598 {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal:
:voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, V8DOMCo
nfiguration::ExposedToAllScripts}, |
10599 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int
ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10599 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int
ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10600 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10600 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10601 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10601 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10602 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10602 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10603 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10603 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10604 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10604 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10605 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10605 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10606 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10606 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10607 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10607 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10608 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10608 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10609 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10609 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10610 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10610 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10611 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10611 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10612 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10612 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10613 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo
idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, | |
10614 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul
tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | |
10615 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa
ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts}, | |
10616 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10613 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10617 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth
odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos
edToAllScripts}, | 10614 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth
odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos
edToAllScripts}, |
10618 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 10615 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
10619 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO
bjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringString
ArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10616 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO
bjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringString
ArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10620 {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLo
ggingAccessForAllWorldsMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, | 10617 {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLo
ggingAccessForAllWorldsMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo
AllScripts}, |
10621 {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecuti
onContextVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts
}, | 10618 {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecuti
onContextVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts
}, |
10622 {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateV
oidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10619 {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateV
oidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10623 {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateL
ongMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10620 {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateL
ongMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10624 {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::call
WithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0, V8DOMConfiguratio
n::ExposedToAllScripts}, | 10621 {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::call
WithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0, V8DOMConfiguratio
n::ExposedToAllScripts}, |
10625 {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callW
ithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, | 10622 {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callW
ithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11417 // FIXME: We should support more exceptions. | 11414 // FIXME: We should support more exceptions. |
11418 RELEASE_ASSERT_NOT_REACHED(); | 11415 RELEASE_ASSERT_NOT_REACHED(); |
11419 } | 11416 } |
11420 block.ReThrow(); | 11417 block.ReThrow(); |
11421 return false; | 11418 return false; |
11422 } | 11419 } |
11423 return true; | 11420 return true; |
11424 } | 11421 } |
11425 | 11422 |
11426 } // namespace blink | 11423 } // namespace blink |
OLD | NEW |