| 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 |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); | 915 DOMDataStore::setWrapperReference(wrapper, referencedName, isolate); |
| 916 } | 916 } |
| 917 } | 917 } |
| 918 | 918 |
| 919 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial | 919 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial |
| 920 // and does not depend on another global objects. | 920 // and does not depend on another global objects. |
| 921 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 921 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 922 #pragma clang diagnostic push | 922 #pragma clang diagnostic push |
| 923 #pragma clang diagnostic ignored "-Wglobal-constructors" | 923 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 924 #endif | 924 #endif |
| 925 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut
es[] = { | 925 const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attributes[] =
{ |
| 926 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte
rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter
Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo)
, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute
>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On
Instance, V8DOMConfiguration::CheckHolder}, | 926 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte
rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter
Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo)
, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute
>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On
Instance, V8DOMConfiguration::CheckHolder}, |
| 927 }; | 927 }; |
| 928 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 928 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 929 #pragma clang diagnostic pop | 929 #pragma clang diagnostic pop |
| 930 #endif | 930 #endif |
| 931 | 931 |
| 932 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors
[] = { | 932 const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors[] = { |
| 933 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter
faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te
stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC
onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 933 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter
faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te
stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC
onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| 934 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>
(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto
type, V8DOMConfiguration::CheckHolder}, | 934 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>
(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto
type, V8DOMConfiguration::CheckHolder}, |
| 935 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt
ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr
ibuteSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8
::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp
e, V8DOMConfiguration::CheckHolder}, | 935 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt
ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr
ibuteSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8
::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp
e, V8DOMConfiguration::CheckHolder}, |
| 936 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre
strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In
ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 936 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre
strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In
ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| 937 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres
trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte
rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, s
tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr
ipts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 937 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres
trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte
rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, s
tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr
ipts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| 938 {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStri
ngAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::stat
icStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::
PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf
iguration::OnInterface, V8DOMConfiguration::CheckHolder}, | 938 {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStri
ngAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::stat
icStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::
PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf
iguration::OnInterface, V8DOMConfiguration::CheckHolder}, |
| 939 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp
osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al
waysExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC
onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 939 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp
osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al
waysExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC
onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| 940 }; | 940 }; |
| 941 | 941 |
| 942 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] =
{ | 942 const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { |
| 943 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 943 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
| 944 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, | 944 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, |
| 945 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 945 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
| 946 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, V8DOMConfiguration::ExposedToAllScripts}, | 946 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 947 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 947 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 948 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 948 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
| 949 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, | 949 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, |
| 950 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V
8DOMConfiguration::ExposedToAllScripts}, | 950 {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, V
8DOMConfiguration::ExposedToAllScripts}, |
| 951 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, V8DOMConfiguration::ExposedToAllScripts}, | 951 {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0,
0, V8DOMConfiguration::ExposedToAllScripts}, |
| 952 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, | 952 {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0
, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 964 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate),
V8TestInterface5::internalFieldCount, | 964 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate,
functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate),
V8TestInterface5::internalFieldCount, |
| 965 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attribu
tes), | 965 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attribu
tes), |
| 966 V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessor
s), | 966 V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessor
s), |
| 967 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods)); | 967 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods)); |
| 968 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 968 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 969 ALLOW_UNUSED_LOCAL(instanceTemplate); | 969 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 970 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 970 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 971 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 971 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 972 ExecutionContext* context = currentExecutionContext(isolate); | 972 ExecutionContext* context = currentExecutionContext(isolate); |
| 973 ALLOW_UNUSED_LOCAL(context); | 973 ALLOW_UNUSED_LOCAL(context); |
| 974 static const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Const
ants[] = { | 974 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[]
= { |
| 975 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, | 975 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, |
| 976 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, | 976 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, |
| 977 }; | 977 }; |
| 978 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem
plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); | 978 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem
plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); |
| 979 { | 979 { |
| 980 v8::IndexedPropertyHandlerConfiguration config(TestInterface5Implementat
ionV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Inte
rnal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal::
indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implemen
tation>); | 980 v8::IndexedPropertyHandlerConfiguration config(TestInterface5Implementat
ionV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Inte
rnal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal::
indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implemen
tation>); |
| 981 functionTemplate->InstanceTemplate()->SetHandler(config); | 981 functionTemplate->InstanceTemplate()->SetHandler(config); |
| 982 } | 982 } |
| 983 { | 983 { |
| 984 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr
ings); | 984 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr
ings); |
| 985 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); | 985 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); |
| 986 v8::NamedPropertyHandlerConfiguration config(TestInterface5Implementatio
nV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal
::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedProp
ertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterC
allback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback
, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags)); | 986 v8::NamedPropertyHandlerConfiguration config(TestInterface5Implementatio
nV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal
::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedProp
ertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterC
allback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback
, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags)); |
| 987 functionTemplate->InstanceTemplate()->SetHandler(config); | 987 functionTemplate->InstanceTemplate()->SetHandler(config); |
| 988 } | 988 } |
| 989 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8
Internal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 989 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator
Configuration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Interna
l::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
| 990 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); | 990 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); |
| 991 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce5::legacyCallCustom); | 991 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce5::legacyCallCustom); |
| 992 const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMethodMetho
dConfiguration = { | 992 const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMethodMetho
dConfiguration = { |
| 993 "alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::alw
aysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScri
pts, | 993 "alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::alw
aysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScri
pts, |
| 994 }; | 994 }; |
| 995 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S
ignature>(), v8::None, alwaysExposedStaticMethodMethodConfiguration); | 995 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S
ignature>(), v8::None, alwaysExposedStaticMethodMethodConfiguration); |
| 996 if (context && (context->isWorkerGlobalScope())) { | 996 if (context && (context->isWorkerGlobalScope())) { |
| 997 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM
ethodConfiguration = { | 997 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM
ethodConfiguration = { |
| 998 "workerExposedStaticMethod", TestInterface5ImplementationV8Internal:
:workerExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll
Scripts, | 998 "workerExposedStaticMethod", TestInterface5ImplementationV8Internal:
:workerExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll
Scripts, |
| 999 }; | 999 }; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) | 1032 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) |
| 1033 { | 1033 { |
| 1034 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; | 1034 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8
::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) | 1037 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8
::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) |
| 1038 { | 1038 { |
| 1039 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 1039 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
| 1040 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); | 1040 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); |
| 1041 if (context && (context->isWorkerGlobalScope())) { | 1041 if (context && (context->isWorkerGlobalScope())) { |
| 1042 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker
ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal:
:workerExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8D
OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 1042 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration =
{"workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposed
AttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::worker
ExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::P
ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi
guration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 1043 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); | 1043 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); |
| 1044 } | 1044 } |
| 1045 if (context && (context->isDocument())) { | 1045 if (context && (context->isDocument())) { |
| 1046 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window
ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal:
:windowExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8D
OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 1046 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration =
{"windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposed
AttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::window
ExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::P
ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi
guration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 1047 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); | 1047 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); |
| 1048 } | 1048 } |
| 1049 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 1049 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
| 1050 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 1050 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
| 1051 ASSERT(context); | 1051 ASSERT(context); |
| 1052 if (context && (context->isWorkerGlobalScope())) { | 1052 if (context && (context->isWorkerGlobalScope())) { |
| 1053 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate:
:New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC
allback, v8Undefined(), defaultSignature, 0); | 1053 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate:
:New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC
allback, v8Undefined(), defaultSignature, 0); |
| 1054 v8::Local<v8::Function> function = v8CallOrCrash(functionTemplate->GetFu
nction(isolate->GetCurrentContext())); | 1054 v8::Local<v8::Function> function = v8CallOrCrash(functionTemplate->GetFu
nction(isolate->GetCurrentContext())); |
| 1055 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi
cString(isolate, "workerExposedMethod"), function)); | 1055 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi
cString(isolate, "workerExposedMethod"), function)); |
| 1056 } | 1056 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1076 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 1076 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 1079 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
| 1080 { | 1080 { |
| 1081 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 1081 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
| 1082 } | 1082 } |
| 1083 | 1083 |
| 1084 } // namespace blink | 1084 } // namespace blink |
| 1085 #endif // ENABLE(CONDITION) | 1085 #endif // ENABLE(CONDITION) |
| OLD | NEW |