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 // clang-format off | 8 // clang-format off |
9 #include "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
10 | 10 |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 } | 853 } |
854 } | 854 } |
855 | 855 |
856 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial | 856 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial |
857 // and does not depend on another global objects. | 857 // and does not depend on another global objects. |
858 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 858 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
859 #pragma clang diagnostic push | 859 #pragma clang diagnostic push |
860 #pragma clang diagnostic ignored "-Wglobal-constructors" | 860 #pragma clang diagnostic ignored "-Wglobal-constructors" |
861 #endif | 861 #endif |
862 const V8DOMConfiguration::AttributeConfiguration V8TestInterface5LazyDataAttribu
tes[] = { | 862 const V8DOMConfiguration::AttributeConfiguration V8TestInterface5LazyDataAttribu
tes[] = { |
863 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0,
nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), stat
ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::
DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstan
ce, V8DOMConfiguration::CheckHolder}, | 863 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0,
nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), stat
ic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::
DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, |
864 }; | 864 }; |
865 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 865 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
866 #pragma clang diagnostic pop | 866 #pragma clang diagnostic pop |
867 #endif | 867 #endif |
868 | 868 |
869 const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors[] = { | 869 const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors[] = { |
870 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter
faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te
stInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 870 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter
faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te
stInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOM
Configuration::CheckHolder}, |
871 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnPrototype, V8DOMConfiguration::CheckHolder}, | 871 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckH
older}, |
872 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt
ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr
ibuteSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttr
ibute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nPrototype, V8DOMConfiguration::CheckHolder}, | 872 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt
ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr
ibuteSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttr
ibute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHold
er}, |
873 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre
strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In
ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8
::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp
osedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHold
er}, | 873 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre
strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In
ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8
::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnP
rototype, V8DOMConfiguration::CheckHolder}, |
874 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres
trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte
rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::D
EFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expose
dToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}
, | 874 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres
trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte
rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::D
EFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnProt
otype, V8DOMConfiguration::CheckHolder}, |
875 {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStri
ngAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::stat
icStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, | 875 {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStri
ngAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::stat
icStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMCon
figuration::CheckHolder}, |
876 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp
osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al
waysExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 876 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp
osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al
waysExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOM
Configuration::CheckHolder}, |
877 }; | 877 }; |
878 | 878 |
879 const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { | 879 const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { |
880 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Che
ckHolder}, | 880 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguratio
n::OnPrototype, V8DOMConfiguration::CheckHolder}, |
881 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::Expos
edToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder
}, | 881 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPro
totype, V8DOMConfiguration::CheckHolder}, |
882 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnPrototype, V8DOMConfiguration::CheckHolder}, | 882 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Chec
kHolder}, |
883 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnP
rototype, V8DOMConfiguration::CheckHolder}, | 883 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder
}, |
884 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 884 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMCon
figuration::CheckHolder}, |
885 {"alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::always
ExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedTo
AllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, | 885 {"alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::always
ExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterfa
ce, V8DOMConfiguration::CheckHolder}, |
886 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Che
ckHolder}, | 886 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguratio
n::OnPrototype, V8DOMConfiguration::CheckHolder}, |
887 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration:
:ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Check
Holder}, | 887 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration:
:OnPrototype, V8DOMConfiguration::CheckHolder}, |
888 {"voidMethodVoidExperimentalCallbackFunction", TestInterface5ImplementationV
8Internal::voidMethodVoidExperimentalCallbackFunctionMethodCallback, 0, 1, v8::N
one, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V
8DOMConfiguration::CheckHolder}, | 888 {"voidMethodVoidExperimentalCallbackFunction", TestInterface5ImplementationV
8Internal::voidMethodVoidExperimentalCallbackFunctionMethodCallback, 0, 1, v8::N
one, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
889 {"voidMethodVoidCallbackFunctionModulesArg", TestInterface5ImplementationV8I
nternal::voidMethodVoidCallbackFunctionModulesArgMethodCallback, 0, 1, v8::None,
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOM
Configuration::CheckHolder}, | 889 {"voidMethodVoidCallbackFunctionModulesArg", TestInterface5ImplementationV8I
nternal::voidMethodVoidCallbackFunctionModulesArgMethodCallback, 0, 1, v8::None,
V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
890 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp
e, V8DOMConfiguration::CheckHolder}, | 890 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, v
8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
891 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProt
otype, V8DOMConfiguration::CheckHolder}, | 891 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
892 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPr
ototype, V8DOMConfiguration::CheckHolder}, | 892 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}
, |
893 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0
, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPr
ototype, V8DOMConfiguration::CheckHolder}, | 893 {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0
, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}
, |
894 {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback,
0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::Exp
osedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHold
er}, | 894 {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback,
0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnP
rototype, V8DOMConfiguration::CheckHolder}, |
895 }; | 895 }; |
896 | 896 |
897 static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapp
erWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { | 897 static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapp
erWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { |
898 // Initialize the interface object's template. | 898 // Initialize the interface object's template. |
899 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface5::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface5::internalFieldCount); | 899 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface5::wrapperTypeInfo.interfaceName, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface5::internalFieldCount); |
900 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 900 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
901 ALLOW_UNUSED_LOCAL(signature); | 901 ALLOW_UNUSED_LOCAL(signature); |
902 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); | 902 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
903 ALLOW_UNUSED_LOCAL(instanceTemplate); | 903 ALLOW_UNUSED_LOCAL(instanceTemplate); |
904 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); | 904 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
(...skipping 12 matching lines...) Expand all Loading... |
917 } | 917 } |
918 | 918 |
919 // Indexed properties | 919 // Indexed properties |
920 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInter
face5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5Impl
ementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5Implementa
tionV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestIn
terface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone
); | 920 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInter
face5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5Impl
ementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5Implementa
tionV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestIn
terface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone
); |
921 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); | 921 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); |
922 // Named properties | 922 // Named properties |
923 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface
5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5Implementa
tionV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Inter
nal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::namedPr
opertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEnum
eratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(in
t(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlag
s::kNonMasking))); | 923 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface
5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5Implementa
tionV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Inter
nal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::namedPr
opertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEnum
eratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(in
t(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlag
s::kNonMasking))); |
924 instanceTemplate->SetHandler(namedPropertyHandlerConfig); | 924 instanceTemplate->SetHandler(namedPropertyHandlerConfig); |
925 | 925 |
926 // Iterator (@@iterator) | 926 // Iterator (@@iterator) |
927 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal:
:iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnPrototype }; | 927 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo
nfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal:
:iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; |
928 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); | 928 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); |
929 | 929 |
930 instanceTemplate->SetCallAsFunctionHandler(V8TestInterface5::legacyCallCustom)
; | 930 instanceTemplate->SetCallAsFunctionHandler(V8TestInterface5::legacyCallCustom)
; |
931 } | 931 } |
932 | 932 |
933 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola
te, const DOMWrapperWorld& world) { | 933 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola
te, const DOMWrapperWorld& world) { |
934 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), installV8TestInterface5Template); | 934 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), installV8TestInterface5Template); |
935 } | 935 } |
936 | 936 |
937 bool V8TestInterface5::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* is
olate) { | 937 bool V8TestInterface5::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* is
olate) { |
938 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value)
; | 938 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value)
; |
939 } | 939 } |
940 | 940 |
941 v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) { | 941 v8::Local<v8::Object> V8TestInterface5::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) { |
942 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); | 942 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); |
943 } | 943 } |
944 | 944 |
945 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) { | 945 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) { |
946 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; | 946 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; |
947 } | 947 } |
948 | 948 |
949 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context>
context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v
8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac
eTemplate) { | 949 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context>
context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v
8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac
eTemplate) { |
950 v8::Isolate* isolate = context->GetIsolate(); | 950 v8::Isolate* isolate = context->GetIsolate(); |
951 ExecutionContext* executionContext = toExecutionContext(context); | 951 ExecutionContext* executionContext = toExecutionContext(context); |
952 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 952 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
953 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 953 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
954 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"
workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAt
tributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerEx
posedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8D
OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 954 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"
workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAt
tributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerEx
posedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfig
uration::CheckHolder}; |
955 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, accessorConfiguration); | 955 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, accessorConfiguration); |
956 } | 956 } |
957 if (executionContext && (executionContext->isDocument())) { | 957 if (executionContext && (executionContext->isDocument())) { |
958 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"
windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAt
tributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowEx
posedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8D
OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 958 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"
windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAt
tributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowEx
posedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfig
uration::CheckHolder}; |
959 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, accessorConfiguration); | 959 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(
), prototypeObject, interfaceObject, signature, accessorConfiguration); |
960 } | 960 } |
961 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 961 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
962 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creat
ionContext()); | 962 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creat
ionContext()); |
963 DCHECK(executionContext); | 963 DCHECK(executionContext); |
964 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 964 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
965 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodCon
figuration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::wor
kerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 965 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodCon
figuration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::wor
kerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype,
V8DOMConfiguration::CheckHolder}; |
966 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, workerExposedMethodMethodConfigura
tion); | 966 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, workerExposedMethodMethodConfigura
tion); |
967 } | 967 } |
968 if (executionContext && (executionContext->isDocument())) { | 968 if (executionContext && (executionContext->isDocument())) { |
969 const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodCon
figuration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::win
dowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 969 const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodCon
figuration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::win
dowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype,
V8DOMConfiguration::CheckHolder}; |
970 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowExposedMethodMethodConfigura
tion); | 970 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowExposedMethodMethodConfigura
tion); |
971 } | 971 } |
972 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 972 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
973 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMet
hodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8I
nternal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::
CheckHolder}; | 973 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMet
hodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8I
nternal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura
tion::OnInterface, V8DOMConfiguration::CheckHolder}; |
974 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodCon
figuration); | 974 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodCon
figuration); |
975 } | 975 } |
976 if (executionContext && (executionContext->isDocument())) { | 976 if (executionContext && (executionContext->isDocument())) { |
977 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMet
hodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8I
nternal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::
CheckHolder}; | 977 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMet
hodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8I
nternal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigura
tion::OnInterface, V8DOMConfiguration::CheckHolder}; |
978 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodCon
figuration); | 978 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodCon
figuration); |
979 } | 979 } |
980 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { | 980 if (executionContext && (executionContext->isDocument() || executionContext->i
sServiceWorkerGlobalScope())) { |
981 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpose
dMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfa
ce5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback,
0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnP
rototype, V8DOMConfiguration::CheckHolder}; | 981 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExpose
dMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfa
ce5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback,
0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder
}; |
982 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMetho
dMethodConfiguration); | 982 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMetho
dMethodConfiguration); |
983 } | 983 } |
984 } | 984 } |
985 | 985 |
986 } // namespace blink | 986 } // namespace blink |
OLD | NEW |