OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 3931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3942 static void TestObjectPythonConstructorGetter(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 3942 static void TestObjectPythonConstructorGetter(v8::Local<v8::String>, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
3943 { | 3943 { |
3944 v8::Handle<v8::Value> data = info.Data(); | 3944 v8::Handle<v8::Value> data = info.Data(); |
3945 ASSERT(data->IsExternal()); | 3945 ASSERT(data->IsExternal()); |
3946 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 3946 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
3947 if (!perContextData) | 3947 if (!perContextData) |
3948 return; | 3948 return; |
3949 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 3949 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
3950 } | 3950 } |
3951 | 3951 |
| 3952 static void testObjectAConstructorAttributeConstructorGetterCallback(v8::Local<v
8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 3953 { |
| 3954 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 3955 TestObjectPythonV8Internal::TestObjectPythonConstructorGetter(property, info
); |
| 3956 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 3957 } |
| 3958 |
3952 static void TestObjectPythonReplaceableAttributeSetter(v8::Local<v8::String> nam
e, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 3959 static void TestObjectPythonReplaceableAttributeSetter(v8::Local<v8::String> nam
e, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
3953 { | 3960 { |
3954 info.This()->ForceSet(name, jsValue); | 3961 info.This()->ForceSet(name, jsValue); |
3955 } | 3962 } |
3956 | 3963 |
3957 static void TestObjectPythonReplaceableAttributeSetterCallback(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) | 3964 static void TestObjectPythonReplaceableAttributeSetterCallback(v8::Local<v8::Str
ing> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i
nfo) |
3958 { | 3965 { |
3959 TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetter(name,
jsValue, info); | 3966 TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetter(name,
jsValue, info); |
3960 } | 3967 } |
3961 | 3968 |
(...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7293 {"readonlyWindowAttribute", TestObjectPythonV8Internal::readonlyWindowAttrib
uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU
LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7300 {"readonlyWindowAttribute", TestObjectPythonV8Internal::readonlyWindowAttrib
uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU
LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7294 {"htmlCollectionAttribute", TestObjectPythonV8Internal::htmlCollectionAttrib
uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU
LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7301 {"htmlCollectionAttribute", TestObjectPythonV8Internal::htmlCollectionAttrib
uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU
LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7295 {"htmlElementAttribute", TestObjectPythonV8Internal::htmlElementAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7302 {"htmlElementAttribute", TestObjectPythonV8Internal::htmlElementAttributeAtt
ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s
tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7296 {"stringArrayAttribute", TestObjectPythonV8Internal::stringArrayAttributeAtt
ributeGetterCallback, TestObjectPythonV8Internal::stringArrayAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7303 {"stringArrayAttribute", TestObjectPythonV8Internal::stringArrayAttributeAtt
ributeGetterCallback, TestObjectPythonV8Internal::stringArrayAttributeAttributeS
etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast
<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7297 {"testInterfaceEmptyArrayAttribute", TestObjectPythonV8Internal::testInterfa
ceEmptyArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testIn
terfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, | 7304 {"testInterfaceEmptyArrayAttribute", TestObjectPythonV8Internal::testInterfa
ceEmptyArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testIn
terfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, |
7298 {"floatArrayAttribute", TestObjectPythonV8Internal::floatArrayAttributeAttri
buteGetterCallback, TestObjectPythonV8Internal::floatArrayAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7305 {"floatArrayAttribute", TestObjectPythonV8Internal::floatArrayAttributeAttri
buteGetterCallback, TestObjectPythonV8Internal::floatArrayAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7299 {"nullableStringAttribute", TestObjectPythonV8Internal::nullableStringAttrib
uteAttributeGetterCallback, TestObjectPythonV8Internal::nullableStringAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7306 {"nullableStringAttribute", TestObjectPythonV8Internal::nullableStringAttrib
uteAttributeGetterCallback, TestObjectPythonV8Internal::nullableStringAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7300 {"nullableLongAttribute", TestObjectPythonV8Internal::nullableLongAttributeA
ttributeGetterCallback, TestObjectPythonV8Internal::nullableLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7307 {"nullableLongAttribute", TestObjectPythonV8Internal::nullableLongAttributeA
ttributeGetterCallback, TestObjectPythonV8Internal::nullableLongAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7301 {"nullableTestInterfaceAttribute", TestObjectPythonV8Internal::nullableTestI
nterfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nullableTe
stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, | 7308 {"nullableTestInterfaceAttribute", TestObjectPythonV8Internal::nullableTestI
nterfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nullableTe
stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}, |
7302 {"testEnumAttribute", TestObjectPythonV8Internal::testEnumAttributeAttribute
GetterCallback, TestObjectPythonV8Internal::testEnumAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, | 7309 {"testEnumAttribute", TestObjectPythonV8Internal::testEnumAttributeAttribute
GetterCallback, TestObjectPythonV8Internal::testEnumAttributeAttributeSetterCall
back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop
ertyAttribute>(v8::None), 0 /* on instance */}, |
7303 {"testObjectAConstructorAttribute", TestObjectPythonV8Internal::TestObjectPy
thonConstructorGetter, TestObjectPythonV8Internal::TestObjectPythonReplaceableAt
tributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestObjectA::wrappe
rTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert
yAttribute>(v8::DontEnum), 0 /* on instance */}, | 7310 {"testObjectAConstructorAttribute", TestObjectPythonV8Internal::testObjectAC
onstructorAttributeConstructorGetterCallback, TestObjectPythonV8Internal::TestOb
jectPythonReplaceableAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>
(&V8TestObjectA::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */}, |
7304 {"eventHandlerAttribute", TestObjectPythonV8Internal::eventHandlerAttributeA
ttributeGetterCallback, TestObjectPythonV8Internal::eventHandlerAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7311 {"eventHandlerAttribute", TestObjectPythonV8Internal::eventHandlerAttributeA
ttributeGetterCallback, TestObjectPythonV8Internal::eventHandlerAttributeAttribu
teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c
ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7305 {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectPythonV8Interna
l::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestOb
jectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7312 {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectPythonV8Interna
l::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestOb
jectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7306 {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectPythonV8Interna
l::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestOb
jectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7313 {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectPythonV8Interna
l::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestOb
jectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7307 {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectPythonV8Interna
l::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestOb
jectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7314 {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectPythonV8Interna
l::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestOb
jectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSet
terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v
8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7308 {"cachedAttributeAnyAttribute", TestObjectPythonV8Internal::cachedAttributeA
nyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeA
nyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::
DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7315 {"cachedAttributeAnyAttribute", TestObjectPythonV8Internal::cachedAttributeA
nyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeA
nyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::
DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7309 {"callWithExecutionContextAnyAttribute", TestObjectPythonV8Internal::callWit
hExecutionContextAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal
::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), 0 /* on instance */}, | 7316 {"callWithExecutionContextAnyAttribute", TestObjectPythonV8Internal::callWit
hExecutionContextAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal
::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None
), 0 /* on instance */}, |
7310 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectPythonV8Internal
::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, | 7317 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectPythonV8Internal
::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0,
0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu
te>(v8::None), 0 /* on instance */}, |
7311 #if ENABLE(CONDITION) | 7318 #if ENABLE(CONDITION) |
7312 {"conditionalLongAttribute", TestObjectPythonV8Internal::conditionalLongAttr
ibuteAttributeGetterCallback, TestObjectPythonV8Internal::conditionalLongAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 7319 {"conditionalLongAttribute", TestObjectPythonV8Internal::conditionalLongAttr
ibuteAttributeGetterCallback, TestObjectPythonV8Internal::conditionalLongAttribu
teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT),
static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
7313 #endif // ENABLE(CONDITION) | 7320 #endif // ENABLE(CONDITION) |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7722 fromInternalPointer(object)->deref(); | 7729 fromInternalPointer(object)->deref(); |
7723 } | 7730 } |
7724 | 7731 |
7725 template<> | 7732 template<> |
7726 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 7733 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
7727 { | 7734 { |
7728 return toV8(impl, creationContext, isolate); | 7735 return toV8(impl, creationContext, isolate); |
7729 } | 7736 } |
7730 | 7737 |
7731 } // namespace WebCore | 7738 } // namespace WebCore |
OLD | NEW |