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. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
10 | 10 |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 | 574 |
575 static void voidMethodVoidCallbackFunctionModulesArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) { | 575 static void voidMethodVoidCallbackFunctionModulesArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) { |
576 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); | 576 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
577 | 577 |
578 if (UNLIKELY(info.Length() < 1)) { | 578 if (UNLIKELY(info.Length() < 1)) { |
579 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", Excepti
onMessages::notEnoughArguments(1, info.Length()))); | 579 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", Excepti
onMessages::notEnoughArguments(1, info.Length()))); |
580 return; | 580 return; |
581 } | 581 } |
582 | 582 |
583 VoidCallbackFunctionModules* arg; | 583 VoidCallbackFunctionModules* arg; |
584 if (!info[0]->IsFunction()) { | 584 if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable(
)) { |
585 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", "The ca
llback provided as parameter 1 is not a function.")); | 585 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodVoidCallbackFunctionModulesArg", "TestInterface5", "The ca
llback provided as parameter 1 is not a function.")); |
586 | 586 |
587 return; | 587 return; |
588 } | 588 } |
589 arg = VoidCallbackFunctionModules::create(ScriptState::current(info.GetIsolate
()), v8::Local<v8::Function>::Cast(info[0])); | 589 arg = VoidCallbackFunctionModules::create(ScriptState::current(info.GetIsolate
()), v8::Local<v8::Function>::Cast(info[0])); |
590 | 590 |
591 impl->voidMethodVoidCallbackFunctionModulesArg(arg); | 591 impl->voidMethodVoidCallbackFunctionModulesArg(arg); |
592 } | 592 } |
593 | 593 |
594 void voidMethodVoidCallbackFunctionModulesArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) { | 594 void voidMethodVoidCallbackFunctionModulesArgMethodCallback(const v8::FunctionCa
llbackInfo<v8::Value>& info) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 | 656 |
657 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 657 ScriptState* scriptState = ScriptState::forReceiverObject(info); |
658 | 658 |
659 if (UNLIKELY(info.Length() < 1)) { | 659 if (UNLIKELY(info.Length() < 1)) { |
660 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.
Length())); | 660 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.
Length())); |
661 return; | 661 return; |
662 } | 662 } |
663 | 663 |
664 ScriptValue callback; | 664 ScriptValue callback; |
665 ScriptValue thisArg; | 665 ScriptValue thisArg; |
666 if (!info[0]->IsFunction()) { | 666 if (!info[0]->IsObject() || !v8::Local<v8::Object>::Cast(info[0])->IsCallable(
)) { |
667 exceptionState.throwTypeError("The callback provided as parameter 1 is not a
function."); | 667 exceptionState.throwTypeError("The callback provided as parameter 1 is not a
function."); |
668 | 668 |
669 return; | 669 return; |
670 } | 670 } |
671 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); | 671 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
672 | 672 |
673 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 673 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
674 | 674 |
675 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()),
callback, thisArg, exceptionState); | 675 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()),
callback, thisArg, exceptionState); |
676 if (exceptionState.hadException()) { | 676 if (exceptionState.hadException()) { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMetho
dConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Int
ernal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurati
on::OnInterface, V8DOMConfiguration::CheckHolder}; | 980 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMetho
dConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Int
ernal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurati
on::OnInterface, V8DOMConfiguration::CheckHolder}; |
981 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfi
guration); | 981 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfi
guration); |
982 } | 982 } |
983 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { | 983 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { |
984 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface
5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0,
0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 984 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface
5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0,
0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
985 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodM
ethodConfiguration); | 985 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodM
ethodConfiguration); |
986 } | 986 } |
987 } | 987 } |
988 | 988 |
989 } // namespace blink | 989 } // namespace blink |
OLD | NEW |