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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } | 242 } |
243 | 243 |
244 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 244 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
245 { | 245 { |
246 v8::Local<v8::Value> v8Value = info[0]; | 246 v8::Local<v8::Value> v8Value = info[0]; |
247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
248 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); | 248 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); |
249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
250 } | 250 } |
251 | 251 |
252 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 252 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
253 { | 253 { |
254 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri
bute(), info.GetIsolate()); | 254 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri
bute(), info.GetIsolate()); |
255 } | 255 } |
256 | 256 |
257 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 257 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
258 { | 258 { |
259 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 259 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
260 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter
(info); | 260 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter
(info); |
261 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 261 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
262 } | 262 } |
263 | 263 |
264 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 264 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
265 { | 265 { |
266 V8StringResource<> cppValue = v8Value; | 266 V8StringResource<> cppValue = v8Value; |
267 if (!cppValue.prepare()) | 267 if (!cppValue.prepare()) |
268 return; | 268 return; |
269 TestInterface5Implementation::setStaticStringAttribute(cppValue); | 269 TestInterface5Implementation::setStaticStringAttribute(cppValue); |
270 } | 270 } |
271 | 271 |
272 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 272 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
273 { | 273 { |
274 v8::Local<v8::Value> v8Value = info[0]; | |
275 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
276 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); | 275 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); |
277 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
278 } | 277 } |
279 | 278 |
280 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) | 279 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) |
281 { | 280 { |
282 v8::Local<v8::Object> holder = info.Holder(); | 281 v8::Local<v8::Object> holder = info.Holder(); |
283 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 282 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
284 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 283 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 #pragma clang diagnostic ignored "-Wglobal-constructors" | 922 #pragma clang diagnostic ignored "-Wglobal-constructors" |
924 #endif | 923 #endif |
925 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut
es[] = { | 924 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut
es[] = { |
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}, | 925 {"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 }; | 926 }; |
928 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 927 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
929 #pragma clang diagnostic pop | 928 #pragma clang diagnostic pop |
930 #endif | 929 #endif |
931 | 930 |
932 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors
[] = { | 931 static 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}, | 932 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter
faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te
stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::C
heckHolder}, |
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}, | 933 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnPrototype, 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}, | 934 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt
ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, 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}, | 935 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre
strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In
ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast
<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None),
V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMC
onfiguration::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}, | 936 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres
trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte
rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConf
iguration::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}, | 937 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp
osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al
waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::C
heckHolder}, |
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 }; | 938 }; |
941 | 939 |
942 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] =
{ | 940 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] =
{ |
943 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 941 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::
voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
944 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, | 942 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void
MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr
ipts}, |
945 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 943 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem
entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal
lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
946 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, V8DOMConfiguration::ExposedToAllScripts}, | 944 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb
ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl
d, 0, V8DOMConfiguration::ExposedToAllScripts}, |
947 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 945 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose
dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
948 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 946 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::
voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
949 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, | 947 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v
oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 if (context && (context->isDocument())) { | 998 if (context && (context->isDocument())) { |
1001 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = { | 999 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM
ethodConfiguration = { |
1002 "windowExposedStaticMethod", TestInterface5ImplementationV8Internal:
:windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll
Scripts, | 1000 "windowExposedStaticMethod", TestInterface5ImplementationV8Internal:
:windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll
Scripts, |
1003 }; | 1001 }; |
1004 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v
8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration); | 1002 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v
8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration); |
1005 } | 1003 } |
1006 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration =
{ | 1004 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration =
{ |
1007 "toString", TestInterface5ImplementationV8Internal::toStringMethodCallba
ck, 0, 0, V8DOMConfiguration::ExposedToAllScripts, | 1005 "toString", TestInterface5ImplementationV8Internal::toStringMethodCallba
ck, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
1008 }; | 1006 }; |
1009 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM
ethodConfiguration); | 1007 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM
ethodConfiguration); |
| 1008 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin
gAttribute"), TestInterface5ImplementationV8Internal::staticStringAttributeAttri
buteGetterCallback, TestInterface5ImplementationV8Internal::staticStringAttribut
eAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::Propert
yAttribute>(v8::None), v8::Local<v8::AccessorSignature>(), static_cast<v8::Acces
sControl>(v8::DEFAULT)); |
1010 | 1009 |
1011 // Custom toString template | 1010 // Custom toString template |
1012 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 1011 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
1013 } | 1012 } |
1014 | 1013 |
1015 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola
te) | 1014 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola
te) |
1016 { | 1015 { |
1017 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface5Template); | 1016 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface5Template); |
1018 } | 1017 } |
1019 | 1018 |
(...skipping 10 matching lines...) Expand all Loading... |
1030 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) | 1029 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate*
isolate, v8::Local<v8::Value> value) |
1031 { | 1030 { |
1032 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; | 1031 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
1033 } | 1032 } |
1034 | 1033 |
1035 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8
::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) | 1034 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8
::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) |
1036 { | 1035 { |
1037 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 1036 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
1038 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); | 1037 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); |
1039 if (context && (context->isWorkerGlobalScope())) { | 1038 if (context && (context->isWorkerGlobalScope())) { |
1040 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}; | 1039 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker
ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal:
:workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration
::CheckHolder}; |
1041 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); | 1040 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); |
1042 } | 1041 } |
1043 if (context && (context->isDocument())) { | 1042 if (context && (context->isDocument())) { |
1044 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}; | 1043 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window
ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal:
:windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu
ration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration
::CheckHolder}; |
1045 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); | 1044 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr
ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); |
1046 } | 1045 } |
1047 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 1046 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
1048 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 1047 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
1049 ASSERT(context); | 1048 ASSERT(context); |
1050 if (context && (context->isWorkerGlobalScope())) { | 1049 if (context && (context->isWorkerGlobalScope())) { |
1051 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate:
:New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC
allback, v8Undefined(), defaultSignature, 0); | 1050 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate:
:New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC
allback, v8Undefined(), defaultSignature, 0); |
1052 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont
ext())).ToLocalChecked(); | 1051 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont
ext())).ToLocalChecked(); |
1053 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi
cString(isolate, "workerExposedMethod"), function)); | 1052 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi
cString(isolate, "workerExposedMethod"), function)); |
1054 } | 1053 } |
(...skipping 19 matching lines...) Expand all Loading... |
1074 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 1073 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
1075 } | 1074 } |
1076 | 1075 |
1077 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 1076 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
1078 { | 1077 { |
1079 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 1078 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
1080 } | 1079 } |
1081 | 1080 |
1082 } // namespace blink | 1081 } // namespace blink |
1083 #endif // ENABLE(CONDITION) | 1082 #endif // ENABLE(CONDITION) |
OLD | NEW |