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 "V8TestInterface.h" | 9 #include "V8TestInterface.h" |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 } // namespace blink | 42 } // namespace blink |
43 | 43 |
44 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceImplementa
tion* object) | 44 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceImplementa
tion* object) |
45 { | 45 { |
46 blink::initializeScriptWrappableForInterface(object); | 46 blink::initializeScriptWrappableForInterface(object); |
47 } | 47 } |
48 | 48 |
49 namespace blink { | 49 namespace blink { |
50 const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface::domTemplate, V8TestInterface::derefObject, V8TestInterface::toA
ctiveDOMObject, 0, V8TestInterface::visitDOMWrapper, V8TestInterface::installPer
ContextEnabledMethods, &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeObject
Prototype, RefCountedObject }; | 50 const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface::domTemplate, V8TestInterface::derefObject, V8TestInterface::toA
ctiveDOMObject, 0, V8TestInterface::visitDOMWrapper, V8TestInterface::installCon
ditionallyEnabledMethods, &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeObj
ectPrototype, RefCountedObject }; |
51 | 51 |
52 namespace TestInterfaceImplementationV8Internal { | 52 namespace TestInterfaceImplementationV8Internal { |
53 | 53 |
54 template <typename T> void V8_USE(T) { } | 54 template <typename T> void V8_USE(T) { } |
55 | 55 |
56 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 56 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
57 { | 57 { |
58 v8::Handle<v8::Object> holder = info.Holder(); | 58 v8::Handle<v8::Object> holder = info.Holder(); |
59 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); | 59 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); |
60 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 60 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 TestInterfaceImplementation::setStaticStringAttribute(cppValue); | 234 TestInterfaceImplementation::setStaticStringAttribute(cppValue); |
235 } | 235 } |
236 | 236 |
237 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 237 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
238 { | 238 { |
239 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 239 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
240 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); | 240 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter(
v8Value, info); |
241 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 241 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
242 } | 242 } |
243 | 243 |
| 244 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 245 { |
| 246 v8::Handle<v8::Object> holder = info.Holder(); |
| 247 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); |
| 248 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
| 249 } |
| 250 |
| 251 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 252 { |
| 253 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 254 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter
(info); |
| 255 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 256 } |
| 257 |
| 258 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 259 { |
| 260 v8::Handle<v8::Object> holder = info.Holder(); |
| 261 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 262 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); |
| 263 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 264 impl->setAlwaysExposedAttribute(cppValue); |
| 265 } |
| 266 |
| 267 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 268 { |
| 269 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 270 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter
(v8Value, info); |
| 271 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 272 } |
| 273 |
| 274 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 275 { |
| 276 v8::Handle<v8::Object> holder = info.Holder(); |
| 277 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); |
| 278 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
| 279 } |
| 280 |
| 281 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 282 { |
| 283 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 284 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter
(info); |
| 285 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 286 } |
| 287 |
| 288 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 289 { |
| 290 v8::Handle<v8::Object> holder = info.Holder(); |
| 291 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 292 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); |
| 293 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 294 impl->setWorkerExposedAttribute(cppValue); |
| 295 } |
| 296 |
| 297 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 298 { |
| 299 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 300 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter
(v8Value, info); |
| 301 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 302 } |
| 303 |
| 304 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 305 { |
| 306 v8::Handle<v8::Object> holder = info.Holder(); |
| 307 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); |
| 308 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
| 309 } |
| 310 |
| 311 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 312 { |
| 313 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 314 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter
(info); |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 316 } |
| 317 |
| 318 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 319 { |
| 320 v8::Handle<v8::Object> holder = info.Holder(); |
| 321 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 322 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); |
| 323 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
| 324 impl->setWindowExposedAttribute(cppValue); |
| 325 } |
| 326 |
| 327 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 328 { |
| 329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 330 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter
(v8Value, info); |
| 331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 332 } |
| 333 |
244 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 334 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
245 { | 335 { |
246 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO
nlyLongAttribute()); | 336 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO
nlyLongAttribute()); |
247 } | 337 } |
248 | 338 |
249 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 339 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
250 { | 340 { |
251 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
252 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute
AttributeGetter(info); | 342 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute
AttributeGetter(info); |
253 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 impl->voidMethod(); | 987 impl->voidMethod(); |
898 } | 988 } |
899 | 989 |
900 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
v8::Value>& info) | 990 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
v8::Value>& info) |
901 { | 991 { |
902 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 992 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
903 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info); | 993 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info); |
904 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 994 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
905 } | 995 } |
906 | 996 |
| 997 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 998 { |
| 999 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 1000 impl->alwaysExposedMethod(); |
| 1001 } |
| 1002 |
| 1003 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 1004 { |
| 1005 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1006 TestInterfaceImplementationV8Internal::alwaysExposedMethodMethod(info); |
| 1007 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1008 } |
| 1009 |
| 1010 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 1011 { |
| 1012 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 1013 impl->workerExposedMethod(); |
| 1014 } |
| 1015 |
| 1016 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 1017 { |
| 1018 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1019 TestInterfaceImplementationV8Internal::workerExposedMethodMethod(info); |
| 1020 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1021 } |
| 1022 |
| 1023 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 1024 { |
| 1025 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 1026 impl->windowExposedMethod(); |
| 1027 } |
| 1028 |
| 1029 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 1030 { |
| 1031 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1032 TestInterfaceImplementationV8Internal::windowExposedMethodMethod(info); |
| 1033 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1034 } |
| 1035 |
| 1036 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 1037 { |
| 1038 TestInterfaceImplementation::alwaysExposedStaticMethod(); |
| 1039 } |
| 1040 |
| 1041 static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 1042 { |
| 1043 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1044 TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethod(info)
; |
| 1045 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1046 } |
| 1047 |
| 1048 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 1049 { |
| 1050 TestInterfaceImplementation::workerExposedStaticMethod(); |
| 1051 } |
| 1052 |
| 1053 static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 1054 { |
| 1055 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1056 TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethod(info)
; |
| 1057 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1058 } |
| 1059 |
| 1060 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 1061 { |
| 1062 TestInterfaceImplementation::windowExposedStaticMethod(); |
| 1063 } |
| 1064 |
| 1065 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 1066 { |
| 1067 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1068 TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info)
; |
| 1069 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1070 } |
| 1071 |
| 1072 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
| 1073 { |
| 1074 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 1075 impl->windowAndServiceWorkerExposedMethod(); |
| 1076 } |
| 1077 |
| 1078 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 1079 { |
| 1080 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1081 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe
thod(info); |
| 1082 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1083 } |
| 1084 |
907 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 1085 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
908 { | 1086 { |
909 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 1087 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
910 impl->implementsVoidMethod(); | 1088 impl->implementsVoidMethod(); |
911 } | 1089 } |
912 | 1090 |
913 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 1091 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
914 { | 1092 { |
915 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1093 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
916 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info); | 1094 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info); |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 setObjectGroup(object, wrapper, isolate); | 1505 setObjectGroup(object, wrapper, isolate); |
1328 } | 1506 } |
1329 | 1507 |
1330 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute
s[] = { | 1508 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute
s[] = { |
1331 {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterf
aceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::test
InterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1509 {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterf
aceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::test
InterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1332 {"testInterfaceConstructorAttribute", TestInterfaceImplementationV8Internal:
:TestInterfaceImplementationConstructorGetter, TestInterfaceImplementationV8Inte
rnal::TestInterfaceImplementationForceSetAttributeOnThisCallback, 0, 0, const_ca
st<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMCon
figuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1510 {"testInterfaceConstructorAttribute", TestInterfaceImplementationV8Internal:
:TestInterfaceImplementationConstructorGetter, TestInterfaceImplementationV8Inte
rnal::TestInterfaceImplementationForceSetAttributeOnThisCallback, 0, 0, const_ca
st<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessC
ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMCon
figuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1333 {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAt
tributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAtt
ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnInstance}, | 1511 {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAt
tributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAtt
ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat
ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnInstance}, |
1334 {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttr
ibuteGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttrib
uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInstance}, | 1512 {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttr
ibuteGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttrib
uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_
cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInstance}, |
1335 {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unres
trictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Inte
rnal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v
8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8
DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1513 {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unres
trictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Inte
rnal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v
8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8
DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1336 {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrest
rictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1514 {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrest
rictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| 1515 {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExpo
sedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwa
ysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro
l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio
n::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1337 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal:
:implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1516 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal:
:implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1338 {"implementsStringAttribute", TestInterfaceImplementationV8Internal::impleme
ntsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal
::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc
essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMCon
figuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1517 {"implementsStringAttribute", TestInterfaceImplementationV8Internal::impleme
ntsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal
::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc
essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMCon
figuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1339 {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implement
sNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im
plementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1518 {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implement
sNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im
plementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon
trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura
tion::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1340 {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::i
mplementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementati
onV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e}, | 1519 {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::i
mplementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementati
onV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e}, |
1341 {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implem
ents3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 1520 {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implem
ents3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern
al::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
1342 }; | 1521 }; |
1343 | 1522 |
1344 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] =
{ | 1523 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] =
{ |
1345 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v
oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT
oAllScripts}, | 1524 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v
oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT
oAllScripts}, |
1346 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM
ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri
pts}, | 1525 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM
ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri
pts}, |
1347 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme
ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall
back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 1526 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme
ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall
back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
1348 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba
ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld,
0, V8DOMConfiguration::ExposedToAllScripts}, | 1527 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba
ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld,
0, V8DOMConfiguration::ExposedToAllScripts}, |
| 1528 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed
MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1349 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo
idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 1529 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo
idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1350 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement
sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 1530 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement
sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
1351 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem
entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript
s}, | 1531 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem
entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript
s}, |
1352 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3
VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 1532 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3
VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1353 }; | 1533 }; |
1354 | 1534 |
1355 static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) | 1535 static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) |
1356 { | 1536 { |
1357 functionTemplate->ReadOnlyPrototype(); | 1537 functionTemplate->ReadOnlyPrototype(); |
1358 | 1538 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, | 1586 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, |
1407 }; | 1587 }; |
1408 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); | 1588 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); |
1409 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 1589 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
1410 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}; | 1590 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}; |
1411 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); | 1591 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); |
1412 } | 1592 } |
1413 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac
eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement
ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8
Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac
eImplementation>); | 1593 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac
eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement
ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8
Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac
eImplementation>); |
1414 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI
mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio
nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal:
:namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert
yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator
Callback); | 1594 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI
mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio
nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal:
:namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert
yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator
Callback); |
1415 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce::legacyCallCustom); | 1595 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce::legacyCallCustom); |
| 1596 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth
odMethodConfiguration = { |
| 1597 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa
ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts, |
| 1598 }; |
| 1599 V8DOMConfiguration::installMethodCustomSignature(functionTemplate, v8::Local
<v8::Signature>(), v8::None, alwaysExposedStaticMethodMethodConfiguration, isola
te); |
1416 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet
hodMethodConfiguration = { | 1600 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet
hodMethodConfiguration = { |
1417 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp
lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts, | 1601 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp
lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts, |
1418 }; | 1602 }; |
1419 V8DOMConfiguration::installMethodCustomSignature(functionTemplate, v8::Local
<v8::Signature>(), v8::None, implementsStaticVoidMethodMethodConfiguration, isol
ate); | 1603 V8DOMConfiguration::installMethodCustomSignature(functionTemplate, v8::Local
<v8::Signature>(), v8::None, implementsStaticVoidMethodMethodConfiguration, isol
ate); |
1420 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { | 1604 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { |
1421 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth
odMethodConfiguration = { | 1605 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth
odMethodConfiguration = { |
1422 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl
ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, | 1606 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl
ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, |
1423 }; | 1607 }; |
1424 V8DOMConfiguration::installMethodCustomSignature(prototypeTemplate, defa
ultSignature, v8::None, implements2VoidMethodMethodConfiguration, isolate); | 1608 V8DOMConfiguration::installMethodCustomSignature(prototypeTemplate, defa
ultSignature, v8::None, implements2VoidMethodMethodConfiguration, isolate); |
1425 } | 1609 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle<
v8::Value> v8Value, v8::Isolate* isolate) | 1682 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle<
v8::Value> v8Value, v8::Isolate* isolate) |
1499 { | 1683 { |
1500 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 1684 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
1501 } | 1685 } |
1502 | 1686 |
1503 TestInterfaceImplementation* V8TestInterface::toNativeWithTypeCheck(v8::Isolate*
isolate, v8::Handle<v8::Value> value) | 1687 TestInterfaceImplementation* V8TestInterface::toNativeWithTypeCheck(v8::Isolate*
isolate, v8::Handle<v8::Value> value) |
1504 { | 1688 { |
1505 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 1689 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; |
1506 } | 1690 } |
1507 | 1691 |
1508 void V8TestInterface::installPerContextEnabledProperties(v8::Handle<v8::Object>
instanceTemplate, TestInterfaceImplementation* impl, v8::Isolate* isolate) | 1692 void V8TestInterface::installConditionallyEnabledProperties(v8::Handle<v8::Objec
t> instanceTemplate, v8::Isolate* isolate) |
1509 { | 1693 { |
1510 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); | 1694 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan
ceTemplate->GetPrototype()); |
1511 if (ContextFeatures::implementsContextNameEnabled(impl->document())) { | 1695 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo
ntext()); |
| 1696 |
| 1697 if (context && (context->isWorkerGlobalScope())) { |
| 1698 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 1699 {"workerExposedAttribute", TestInterfaceImplementationV8Internal::worker
ExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::
workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 1700 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); |
| 1701 } |
| 1702 if (context && (context->isDocument())) { |
| 1703 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 1704 {"windowExposedAttribute", TestInterfaceImplementationV8Internal::window
ExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::
windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo
ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 1705 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); |
| 1706 } |
| 1707 if (context && context->isDocument() && ContextFeatures::implementsContextNa
meEnabled(toDocument(context))) { |
1512 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 1708 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
1513 {"implementsPerContextEnabledNodeAttribute", TestInterfaceImplementation
V8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, Tes
tInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}; | 1709 {"implementsPerContextEnabledNodeAttribute", TestInterfaceImplementation
V8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, Tes
tInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}; |
1514 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | 1710 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); |
1515 } | 1711 } |
1516 if (ContextFeatures::partialContextNameEnabled(impl->document())) { | 1712 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { |
1517 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 1713 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
1518 {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial
2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::pa
rtial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContr
ol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati
on::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; | 1714 {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial
2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::pa
rtial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContr
ol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati
on::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
1519 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | 1715 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); |
1520 } | 1716 } |
1521 if (ContextFeatures::partialContextNameEnabled(impl->document())) { | 1717 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { |
1522 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 1718 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
1523 {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::p
artial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8
Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; | 1719 {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::p
artial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8
Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
1524 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); | 1720 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate); |
1525 } | 1721 } |
1526 } | 1722 } |
1527 | 1723 |
1528 void V8TestInterface::installPerContextEnabledMethods(v8::Handle<v8::Object> pro
totypeTemplate, v8::Isolate* isolate) | 1724 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object>
prototypeTemplate, v8::Isolate* isolate) |
1529 { | 1725 { |
1530 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 1726 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
| 1727 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo
ntext()); |
1531 | 1728 |
1532 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo
ntext()); | 1729 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { |
1533 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) | |
1534 prototypeTemplate->Set(v8AtomicString(isolate, "partial2VoidMethod"), v8
::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::partial2
VoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | 1730 prototypeTemplate->Set(v8AtomicString(isolate, "partial2VoidMethod"), v8
::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::partial2
VoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
1535 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) | 1731 } |
| 1732 if (context && context->isDocument() && ContextFeatures::partialContextNameE
nabled(toDocument(context))) { |
1536 prototypeTemplate->Set(v8AtomicString(isolate, "partial2StaticVoidMethod
"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::pa
rtial2StaticVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu
nction()); | 1733 prototypeTemplate->Set(v8AtomicString(isolate, "partial2StaticVoidMethod
"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::pa
rtial2StaticVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu
nction()); |
| 1734 } |
| 1735 if (context && (context->isWorkerGlobalScope())) { |
| 1736 prototypeTemplate->Set(v8AtomicString(isolate, "workerExposedMethod"), v
8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerE
xposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
| 1737 } |
| 1738 if (context && (context->isDocument())) { |
| 1739 prototypeTemplate->Set(v8AtomicString(isolate, "windowExposedMethod"), v
8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowE
xposedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
| 1740 } |
| 1741 if (context && (context->isWorkerGlobalScope())) { |
| 1742 prototypeTemplate->Set(v8AtomicString(isolate, "workerExposedStaticMetho
d"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::w
orkerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->Get
Function()); |
| 1743 } |
| 1744 if (context && (context->isDocument())) { |
| 1745 prototypeTemplate->Set(v8AtomicString(isolate, "windowExposedStaticMetho
d"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::w
indowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->Get
Function()); |
| 1746 } |
| 1747 if (context && (context->isServiceWorkerGlobalScope() || context->isDocument
())) { |
| 1748 prototypeTemplate->Set(v8AtomicString(isolate, "windowAndServiceWorkerEx
posedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8I
nternal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), defau
ltSignature, 0)->GetFunction()); |
| 1749 } |
1537 } | 1750 } |
1538 | 1751 |
1539 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp
er) | 1752 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp
er) |
1540 { | 1753 { |
1541 return toNative(wrapper); | 1754 return toNative(wrapper); |
1542 } | 1755 } |
1543 | 1756 |
1544 void V8TestInterface::derefObject(void* object) | 1757 void V8TestInterface::derefObject(void* object) |
1545 { | 1758 { |
1546 fromInternalPointer(object)->deref(); | 1759 fromInternalPointer(object)->deref(); |
1547 } | 1760 } |
1548 | 1761 |
1549 template<> | 1762 template<> |
1550 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle
<v8::Object> creationContext, v8::Isolate* isolate) | 1763 v8::Handle<v8::Value> toV8NoInline(TestInterfaceImplementation* impl, v8::Handle
<v8::Object> creationContext, v8::Isolate* isolate) |
1551 { | 1764 { |
1552 return toV8(impl, creationContext, isolate); | 1765 return toV8(impl, creationContext, isolate); |
1553 } | 1766 } |
1554 | 1767 |
1555 } // namespace blink | 1768 } // namespace blink |
1556 #endif // ENABLE(CONDITION) | 1769 #endif // ENABLE(CONDITION) |
OLD | NEW |