| 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 6420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6431 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6432 } | 6432 } |
| 6433 | 6433 |
| 6434 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6434 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 6435 { | 6435 { |
| 6436 if (UNLIKELY(info.Length() < 1)) { | 6436 if (UNLIKELY(info.Length() < 1)) { |
| 6437 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsol
ate()), info.GetIsolate()); | 6437 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsol
ate()), info.GetIsolate()); |
| 6438 return; | 6438 return; |
| 6439 } | 6439 } |
| 6440 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6440 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6441 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | 6441 TestCallbackInterface* testCallbackInterfaceArg; |
| 6442 { | 6442 { |
| 6443 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 6443 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| 6444 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa
rameter 1 is not a function."), info.GetIsolate()); | 6444 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa
rameter 1 is not a function."), info.GetIsolate()); |
| 6445 return; | 6445 return; |
| 6446 } | 6446 } |
| 6447 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 6447 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| 6448 } | 6448 } |
| 6449 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release())
; | 6449 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg); |
| 6450 } | 6450 } |
| 6451 | 6451 |
| 6452 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6452 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 6453 { | 6453 { |
| 6454 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6454 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6455 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); | 6455 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); |
| 6456 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6456 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6457 } | 6457 } |
| 6458 | 6458 |
| 6459 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) | 6459 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
allbackInfo<v8::Value>& info) |
| 6460 { | 6460 { |
| 6461 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6461 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6462 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; | 6462 TestCallbackInterface* optionalTestCallbackInterfaceArg; |
| 6463 { | 6463 { |
| 6464 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 6464 if (!isUndefinedOrNull(info[0])) { |
| 6465 if (!info[0]->IsFunction()) { | 6465 if (!info[0]->IsFunction()) { |
| 6466 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback pr
ovided as parameter 1 is not a function."), info.GetIsolate()); | 6466 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec
ute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback pr
ovided as parameter 1 is not a function."), info.GetIsolate()); |
| 6467 return; | 6467 return; |
| 6468 } | 6468 } |
| 6469 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 6469 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; |
| 6470 } else { |
| 6471 optionalTestCallbackInterfaceArg = nullptr; |
| 6470 } | 6472 } |
| 6471 } | 6473 } |
| 6472 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg.release()); | 6474 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa
ceArg); |
| 6473 } | 6475 } |
| 6474 | 6476 |
| 6475 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 6477 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
| 6476 { | 6478 { |
| 6477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6479 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6478 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; | 6480 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info)
; |
| 6479 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6481 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6480 } | 6482 } |
| 6481 | 6483 |
| 6482 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 6484 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 6483 { | 6485 { |
| 6484 if (UNLIKELY(info.Length() < 1)) { | 6486 if (UNLIKELY(info.Length() < 1)) { |
| 6485 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); | 6487 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.G
etIsolate()), info.GetIsolate()); |
| 6486 return; | 6488 return; |
| 6487 } | 6489 } |
| 6488 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6490 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6489 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | 6491 TestCallbackInterface* testCallbackInterfaceArg; |
| 6490 { | 6492 { |
| 6491 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull()))
{ | 6493 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull()))
{ |
| 6492 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided
as parameter 1 is not a function."), info.GetIsolate()); | 6494 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided
as parameter 1 is not a function."), info.GetIsolate()); |
| 6493 return; | 6495 return; |
| 6494 } | 6496 } |
| 6495 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI
nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i
nfo.GetIsolate())); | 6497 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI
nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i
nfo.GetIsolate())); |
| 6496 } | 6498 } |
| 6497 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg.rele
ase()); | 6499 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg); |
| 6498 } | 6500 } |
| 6499 | 6501 |
| 6500 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 6502 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 6501 { | 6503 { |
| 6502 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6503 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); | 6505 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); |
| 6504 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6505 } | 6507 } |
| 6506 | 6508 |
| 6507 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) | 6509 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| (...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9300 | 9302 |
| 9301 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 9303 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 9302 { | 9304 { |
| 9303 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); | 9305 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIs
olate()); |
| 9304 if (UNLIKELY(info.Length() < 1)) { | 9306 if (UNLIKELY(info.Length() < 1)) { |
| 9305 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 9307 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 9306 exceptionState.throwIfNeeded(); | 9308 exceptionState.throwIfNeeded(); |
| 9307 return; | 9309 return; |
| 9308 } | 9310 } |
| 9309 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9311 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9310 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceArg = nullptr
;; | 9312 TestCallbackInterface* testCallbackInterfaceArg; |
| 9311 { | 9313 { |
| 9312 if (info.Length() <= 0 || !info[0]->IsFunction()) { | 9314 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| 9313 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 9315 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 9314 exceptionState.throwIfNeeded(); | 9316 exceptionState.throwIfNeeded(); |
| 9315 return; | 9317 return; |
| 9316 } | 9318 } |
| 9317 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); | 9319 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8
::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| 9318 } | 9320 } |
| 9319 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg.release(), exceptionState); | 9321 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac
eArg, exceptionState); |
| 9320 if (exceptionState.hadException()) { | 9322 if (exceptionState.hadException()) { |
| 9321 exceptionState.throwIfNeeded(); | 9323 exceptionState.throwIfNeeded(); |
| 9322 return; | 9324 return; |
| 9323 } | 9325 } |
| 9324 } | 9326 } |
| 9325 | 9327 |
| 9326 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9328 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 9327 { | 9329 { |
| 9328 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9329 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); | 9331 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMetho
d(info); |
| 9330 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 9332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 9331 } | 9333 } |
| 9332 | 9334 |
| 9333 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 9335 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 9334 { | 9336 { |
| 9335 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); | 9337 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), in
fo.GetIsolate()); |
| 9336 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 9338 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 9337 OwnPtrWillBeRawPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg =
nullptr;; | 9339 TestCallbackInterface* optionalTestCallbackInterfaceArg; |
| 9338 { | 9340 { |
| 9339 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) { | 9341 if (!isUndefinedOrNull(info[0])) { |
| 9340 if (!info[0]->IsFunction()) { | 9342 if (!info[0]->IsFunction()) { |
| 9341 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); | 9343 exceptionState.throwTypeError("The callback provided as paramete
r 1 is not a function."); |
| 9342 exceptionState.throwIfNeeded(); | 9344 exceptionState.throwIfNeeded(); |
| 9343 return; | 9345 return; |
| 9344 } | 9346 } |
| 9345 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; | 9347 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v
8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()))
; |
| 9348 } else { |
| 9349 optionalTestCallbackInterfaceArg = nullptr; |
| 9346 } | 9350 } |
| 9347 } | 9351 } |
| 9348 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg.release(), exceptionState); | 9352 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest
CallbackInterfaceArg, exceptionState); |
| 9349 if (exceptionState.hadException()) { | 9353 if (exceptionState.hadException()) { |
| 9350 exceptionState.throwIfNeeded(); | 9354 exceptionState.throwIfNeeded(); |
| 9351 return; | 9355 return; |
| 9352 } | 9356 } |
| 9353 } | 9357 } |
| 9354 | 9358 |
| 9355 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 9359 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9356 { | 9360 { |
| 9357 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 9361 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 9358 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); | 9362 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterface
ArgMethod(info); |
| (...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11118 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); | 11122 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF
orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); |
| 11119 if (block.HasCaught()) { | 11123 if (block.HasCaught()) { |
| 11120 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 11124 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
| 11121 block.ReThrow(); | 11125 block.ReThrow(); |
| 11122 return false; | 11126 return false; |
| 11123 } | 11127 } |
| 11124 return true; | 11128 return true; |
| 11125 } | 11129 } |
| 11126 | 11130 |
| 11127 } // namespace blink | 11131 } // namespace blink |
| OLD | NEW |