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