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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
9 #include "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
10 | 10 |
11 #include "bindings/core/v8/ExceptionState.h" | 11 #include "bindings/core/v8/ExceptionState.h" |
12 #include "bindings/core/v8/ScriptState.h" | 12 #include "bindings/core/v8/ScriptState.h" |
| 13 #include "bindings/core/v8/ScriptValue.h" |
13 #include "bindings/core/v8/V8DOMConfiguration.h" | 14 #include "bindings/core/v8/V8DOMConfiguration.h" |
14 #include "bindings/core/v8/V8HiddenValue.h" | 15 #include "bindings/core/v8/V8HiddenValue.h" |
15 #include "bindings/core/v8/V8Iterator.h" | 16 #include "bindings/core/v8/V8Iterator.h" |
16 #include "bindings/core/v8/V8ObjectConstructor.h" | 17 #include "bindings/core/v8/V8ObjectConstructor.h" |
17 #include "bindings/core/v8/V8TestInterfaceEmpty.h" | 18 #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
18 #include "bindings/modules/v8/UnionTypesModules.h" | 19 #include "bindings/modules/v8/UnionTypesModules.h" |
19 #include "bindings/modules/v8/V8TestInterface5.h" | 20 #include "bindings/modules/v8/V8TestInterface5.h" |
20 #include "core/dom/ContextFeatures.h" | 21 #include "core/dom/ContextFeatures.h" |
21 #include "core/dom/Document.h" | 22 #include "core/dom/Document.h" |
22 #include "platform/RuntimeEnabledFeatures.h" | 23 #include "platform/RuntimeEnabledFeatures.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 v8SetReturnValue(info, result.release()); | 615 v8SetReturnValue(info, result.release()); |
615 } | 616 } |
616 | 617 |
617 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 618 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
618 { | 619 { |
619 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 620 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
620 TestInterface5ImplementationV8Internal::entriesMethod(info); | 621 TestInterface5ImplementationV8Internal::entriesMethod(info); |
621 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 622 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
622 } | 623 } |
623 | 624 |
| 625 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 626 { |
| 627 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface5", info.Holder(), info.GetIsolate()); |
| 628 if (UNLIKELY(info.Length() < 1)) { |
| 629 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 630 exceptionState.throwIfNeeded(); |
| 631 return; |
| 632 } |
| 633 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 634 ScriptValue callback; |
| 635 ScriptValue thisArg; |
| 636 { |
| 637 if (!info[0]->IsFunction()) { |
| 638 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 639 exceptionState.throwIfNeeded(); |
| 640 return; |
| 641 } |
| 642 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
| 643 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| 644 } |
| 645 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 646 impl->forEach(scriptState, ScriptValue(scriptState, info.This()), callback,
thisArg, exceptionState); |
| 647 if (exceptionState.hadException()) { |
| 648 exceptionState.throwIfNeeded(); |
| 649 return; |
| 650 } |
| 651 } |
| 652 |
| 653 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 654 { |
| 655 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 656 TestInterface5ImplementationV8Internal::forEachMethod(info); |
| 657 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 658 } |
| 659 |
624 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 660 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
625 { | 661 { |
626 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 662 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
627 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); | 663 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
628 } | 664 } |
629 | 665 |
630 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 666 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
631 { | 667 { |
632 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 668 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
633 TestInterface5ImplementationV8Internal::toStringMethod(info); | 669 TestInterface5ImplementationV8Internal::toStringMethod(info); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 881 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
846 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, | 882 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, |
847 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 883 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
848 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, V8DOMConfiguration::ExposedToAllScripts}, | 884 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, V8DOMConfiguration::ExposedToAllScripts}, |
849 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 885 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
850 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 886 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
851 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, | 887 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, |
852 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V
8DOMConfiguration::ExposedToAllScripts}, | 888 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V
8DOMConfiguration::ExposedToAllScripts}, |
853 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, V8DOMConfiguration::ExposedToAllScripts}, | 889 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, V8DOMConfiguration::ExposedToAllScripts}, |
854 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | 890 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 891 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, |
855 }; | 892 }; |
856 | 893 |
857 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) | 894 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) |
858 { | 895 { |
859 functionTemplate->ReadOnlyPrototype(); | 896 functionTemplate->ReadOnlyPrototype(); |
860 | 897 |
861 v8::Local<v8::Signature> defaultSignature; | 898 v8::Local<v8::Signature> defaultSignature; |
862 if (!RuntimeEnabledFeatures::featureNameEnabled()) | 899 if (!RuntimeEnabledFeatures::featureNameEnabled()) |
863 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac
e5::internalFieldCount, 0, 0, 0, 0, 0, 0); | 900 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterfac
e5::internalFieldCount, 0, 0, 0, 0, 0, 0); |
864 else | 901 else |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 1007 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
971 } | 1008 } |
972 | 1009 |
973 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 1010 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
974 { | 1011 { |
975 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 1012 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
976 } | 1013 } |
977 | 1014 |
978 } // namespace blink | 1015 } // namespace blink |
979 #endif // ENABLE(CONDITION) | 1016 #endif // ENABLE(CONDITION) |
OLD | NEW |