| 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" |
| (...skipping 6600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6611 } | 6611 } |
| 6612 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6612 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6613 int arg1; | 6613 int arg1; |
| 6614 Dictionary arg2; | 6614 Dictionary arg2; |
| 6615 V8StringResource<> arg3; | 6615 V8StringResource<> arg3; |
| 6616 Vector<String> variadic; | 6616 Vector<String> variadic; |
| 6617 { | 6617 { |
| 6618 v8::TryCatch block; | 6618 v8::TryCatch block; |
| 6619 V8RethrowTryCatchScope rethrow(block); | 6619 V8RethrowTryCatchScope rethrow(block); |
| 6620 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exc
eptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); | 6620 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exc
eptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); |
| 6621 TONATIVE_VOID_PROMISE_INTERNAL(arg2, Dictionary(info[1], info.GetIsolate
()), info); | 6621 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { |
| 6622 if (!arg2.isUndefinedOrNull() && !arg2.isObject()) { | |
| 6623 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object
."); | 6622 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object
."); |
| 6624 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); | 6623 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in
fo.GetIsolate())).v8Value()); |
| 6625 return; | 6624 return; |
| 6626 } | 6625 } |
| 6626 TONATIVE_VOID_PROMISE_INTERNAL(arg2, Dictionary(info[1], info.GetIsolate
()), info); |
| 6627 TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info); | 6627 TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info); |
| 6628 TONATIVE_VOID_PROMISE_INTERNAL(variadic, toImplArguments<String>(info, 3
), info); | 6628 TONATIVE_VOID_PROMISE_INTERNAL(variadic, toImplArguments<String>(info, 3
), info); |
| 6629 } | 6629 } |
| 6630 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val
ue()); | 6630 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val
ue()); |
| 6631 } | 6631 } |
| 6632 | 6632 |
| 6633 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | 6633 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
| 6634 { | 6634 { |
| 6635 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6635 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6636 TestObjectV8Internal::promiseMethodMethod(info); | 6636 TestObjectV8Internal::promiseMethodMethod(info); |
| 6637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6638 } | 6638 } |
| 6639 | 6639 |
| 6640 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6640 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 6641 { | 6641 { |
| 6642 if (UNLIKELY(info.Length() < 1)) { | 6642 if (UNLIKELY(info.Length() < 1)) { |
| 6643 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat
eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec
t", 1, info.Length(), info.GetIsolate()))); | 6643 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat
eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec
t", 1, info.Length(), info.GetIsolate()))); |
| 6644 return; | 6644 return; |
| 6645 } | 6645 } |
| 6646 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6646 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6647 Dictionary arg1; | 6647 Dictionary arg1; |
| 6648 { | 6648 { |
| 6649 v8::TryCatch block; | 6649 v8::TryCatch block; |
| 6650 V8RethrowTryCatchScope rethrow(block); | 6650 V8RethrowTryCatchScope rethrow(block); |
| 6651 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate
()), info); | 6651 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| 6652 if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { | |
| 6653 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V
8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth
odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object."
), info.GetIsolate()))); | 6652 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V
8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth
odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object."
), info.GetIsolate()))); |
| 6654 return; | 6653 return; |
| 6655 } | 6654 } |
| 6655 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate
()), info); |
| 6656 } | 6656 } |
| 6657 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); | 6657 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu
e()); |
| 6658 } | 6658 } |
| 6659 | 6659 |
| 6660 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6660 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 6661 { | 6661 { |
| 6662 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6662 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6663 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); | 6663 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); |
| 6664 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6664 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6665 } | 6665 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 6694 { | 6694 { |
| 6695 if (UNLIKELY(info.Length() < 1)) { | 6695 if (UNLIKELY(info.Length() < 1)) { |
| 6696 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); | 6696 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf
o.GetIsolate()); |
| 6697 return; | 6697 return; |
| 6698 } | 6698 } |
| 6699 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6699 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6700 Dictionary dictionaryArg; | 6700 Dictionary dictionaryArg; |
| 6701 { | 6701 { |
| 6702 v8::TryCatch block; | 6702 v8::TryCatch block; |
| 6703 V8RethrowTryCatchScope rethrow(block); | 6703 V8RethrowTryCatchScope rethrow(block); |
| 6704 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); | 6704 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| 6705 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | |
| 6706 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a
n object."), info.GetIsolate()); | 6705 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a
n object."), info.GetIsolate()); |
| 6707 return; | 6706 return; |
| 6708 } | 6707 } |
| 6708 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat
e())); |
| 6709 } | 6709 } |
| 6710 impl->voidMethodDictionaryArg(dictionaryArg); | 6710 impl->voidMethodDictionaryArg(dictionaryArg); |
| 6711 } | 6711 } |
| 6712 | 6712 |
| 6713 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 6713 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 6714 { | 6714 { |
| 6715 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6715 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6716 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); | 6716 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); |
| 6717 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6717 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6718 } | 6718 } |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7181 } | 7181 } |
| 7182 | 7182 |
| 7183 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 7183 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 7184 { | 7184 { |
| 7185 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 7185 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 7186 Dictionary optionalDictionaryArg; | 7186 Dictionary optionalDictionaryArg; |
| 7187 { | 7187 { |
| 7188 v8::TryCatch block; | 7188 v8::TryCatch block; |
| 7189 V8RethrowTryCatchScope rethrow(block); | 7189 V8RethrowTryCatchScope rethrow(block); |
| 7190 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.G
etIsolate())); | 7190 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| 7191 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { | |
| 7192 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona
ryArg') is not an object."), info.GetIsolate()); | 7191 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona
ryArg') is not an object."), info.GetIsolate()); |
| 7193 return; | 7192 return; |
| 7194 } | 7193 } |
| 7194 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.G
etIsolate())); |
| 7195 } | 7195 } |
| 7196 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); | 7196 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); |
| 7197 } | 7197 } |
| 7198 | 7198 |
| 7199 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 7199 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 7200 { | 7200 { |
| 7201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 7201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 7202 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); | 7202 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); |
| 7203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 7203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 7204 } | 7204 } |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8104 impl->overloadedMethodJ(stringArg); | 8104 impl->overloadedMethodJ(stringArg); |
| 8105 } | 8105 } |
| 8106 | 8106 |
| 8107 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 8107 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8108 { | 8108 { |
| 8109 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); | 8109 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodJ", "TestObject", info.Holder(), info.GetIsolate()); |
| 8110 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8110 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8111 TestDictionary* testDictionaryArg; | 8111 TestDictionary* testDictionaryArg; |
| 8112 { | 8112 { |
| 8113 if (!info[0]->IsUndefined()) { | 8113 if (!info[0]->IsUndefined()) { |
| 8114 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| 8115 exceptionState.throwTypeError("parameter 1 ('testDictionaryArg')
is not an object."); |
| 8116 exceptionState.throwIfNeeded(); |
| 8117 return; |
| 8118 } |
| 8114 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(testDictionaryArg, V8TestDicti
onary::toImpl(info.GetIsolate(), info[0], exceptionState), exceptionState); | 8119 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(testDictionaryArg, V8TestDicti
onary::toImpl(info.GetIsolate(), info[0], exceptionState), exceptionState); |
| 8115 } else { | 8120 } else { |
| 8116 testDictionaryArg = TestDictionary::create(); | 8121 testDictionaryArg = TestDictionary::create(); |
| 8117 } | 8122 } |
| 8118 } | 8123 } |
| 8119 impl->overloadedMethodJ(*testDictionaryArg); | 8124 impl->overloadedMethodJ(*testDictionaryArg); |
| 8120 } | 8125 } |
| 8121 | 8126 |
| 8122 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 8127 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 8123 { | 8128 { |
| (...skipping 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11187 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); | 11192 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); |
| 11188 if (block.HasCaught()) { | 11193 if (block.HasCaught()) { |
| 11189 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 11194 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
| 11190 block.ReThrow(); | 11195 block.ReThrow(); |
| 11191 return false; | 11196 return false; |
| 11192 } | 11197 } |
| 11193 return true; | 11198 return true; |
| 11194 } | 11199 } |
| 11195 | 11200 |
| 11196 } // namespace blink | 11201 } // namespace blink |
| OLD | NEW |