| 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 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 v8SetReturnValueInt(info, imp->doNotCheckSecurityReadonlyLongAttribute()); | 1830 v8SetReturnValueInt(info, imp->doNotCheckSecurityReadonlyLongAttribute()); |
| 1831 } | 1831 } |
| 1832 | 1832 |
| 1833 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1833 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1834 { | 1834 { |
| 1835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1836 TestObjectPythonV8Internal::doNotCheckSecurityReadonlyLongAttributeAttribute
Getter(info); | 1836 TestObjectPythonV8Internal::doNotCheckSecurityReadonlyLongAttributeAttribute
Getter(info); |
| 1837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 1837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 1838 } | 1838 } |
| 1839 | 1839 |
| 1840 static void doNotCheckSecurityOnGetterLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | |
| 1841 { | |
| 1842 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | |
| 1843 v8SetReturnValueInt(info, imp->doNotCheckSecurityOnGetterLongAttribute()); | |
| 1844 } | |
| 1845 | |
| 1846 static void doNotCheckSecurityOnGetterLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | |
| 1847 { | |
| 1848 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | |
| 1849 TestObjectPythonV8Internal::doNotCheckSecurityOnGetterLongAttributeAttribute
Getter(info); | |
| 1850 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | |
| 1851 } | |
| 1852 | |
| 1853 static void doNotCheckSecurityOnGetterLongAttributeAttributeSetter(v8::Local<v8:
:Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | |
| 1854 { | |
| 1855 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | |
| 1856 V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue)); | |
| 1857 imp->setDoNotCheckSecurityOnGetterLongAttribute(cppValue); | |
| 1858 } | |
| 1859 | |
| 1860 static void doNotCheckSecurityOnGetterLongAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) | |
| 1861 { | |
| 1862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | |
| 1863 TestObjectPythonV8Internal::doNotCheckSecurityOnGetterLongAttributeAttribute
Setter(jsValue, info); | |
| 1864 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | |
| 1865 } | |
| 1866 | |
| 1867 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 1840 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
| 1868 { | 1841 { |
| 1869 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 1842 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 1870 v8SetReturnValueInt(info, imp->doNotCheckSecurityOnSetterLongAttribute()); | 1843 v8SetReturnValueInt(info, imp->doNotCheckSecurityOnSetterLongAttribute()); |
| 1871 } | 1844 } |
| 1872 | 1845 |
| 1873 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 1846 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 1874 { | 1847 { |
| 1875 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 1848 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 1876 TestObjectPythonV8Internal::doNotCheckSecurityOnSetterLongAttributeAttribute
Getter(info); | 1849 TestObjectPythonV8Internal::doNotCheckSecurityOnSetterLongAttributeAttribute
Getter(info); |
| (...skipping 4292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6169 {"customGetterLongAttribute", TestObjectPythonV8Internal::customGetterLongAt
tributeAttributeGetterCallback, TestObjectPythonV8Internal::customGetterLongAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 6142 {"customGetterLongAttribute", TestObjectPythonV8Internal::customGetterLongAt
tributeAttributeGetterCallback, TestObjectPythonV8Internal::customGetterLongAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 6170 {"customGetterReadonlyObjectAttribute", TestObjectPythonV8Internal::customGe
tterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, | 6143 {"customGetterReadonlyObjectAttribute", TestObjectPythonV8Internal::customGe
tterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::
AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /*
on instance */}, |
| 6171 {"customSetterLongAttribute", TestObjectPythonV8Internal::customSetterLongAt
tributeAttributeGetterCallback, TestObjectPythonV8Internal::customSetterLongAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 6144 {"customSetterLongAttribute", TestObjectPythonV8Internal::customSetterLongAt
tributeAttributeGetterCallback, TestObjectPythonV8Internal::customSetterLongAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 6172 #if ENABLE(CONDITION) | 6145 #if ENABLE(CONDITION) |
| 6173 {"customLongAttribute", TestObjectPythonV8Internal::customLongAttributeAttri
buteGetterCallback, TestObjectPythonV8Internal::customLongAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, | 6146 {"customLongAttribute", TestObjectPythonV8Internal::customLongAttributeAttri
buteGetterCallback, TestObjectPythonV8Internal::customLongAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8
::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 6174 #endif // ENABLE(CONDITION) | 6147 #endif // ENABLE(CONDITION) |
| 6175 {"customElementsCallbacksReadonlyLongAttribute", TestObjectPythonV8Internal:
:customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0
, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute
>(v8::None), 0 /* on instance */}, | 6148 {"customElementsCallbacksReadonlyLongAttribute", TestObjectPythonV8Internal:
:customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0
, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute
>(v8::None), 0 /* on instance */}, |
| 6176 {"deprecatedLongAttribute", TestObjectPythonV8Internal::deprecatedLongAttrib
uteAttributeGetterCallback, TestObjectPythonV8Internal::deprecatedLongAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 6149 {"deprecatedLongAttribute", TestObjectPythonV8Internal::deprecatedLongAttrib
uteAttributeGetterCallback, TestObjectPythonV8Internal::deprecatedLongAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 6177 {"doNotCheckSecurityLongAttribute", TestObjectPythonV8Internal::doNotCheckSe
curityLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::doNotChe
ckSecurityLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute
>(v8::None), 0 /* on instance */}, | 6150 {"doNotCheckSecurityLongAttribute", TestObjectPythonV8Internal::doNotCheckSe
curityLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::doNotChe
ckSecurityLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC
ontrol>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute
>(v8::None), 0 /* on instance */}, |
| 6178 {"doNotCheckSecurityReadonlyLongAttribute", TestObjectPythonV8Internal::doNo
tCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttribute>(v8:
:None), 0 /* on instance */}, | 6151 {"doNotCheckSecurityReadonlyLongAttribute", TestObjectPythonV8Internal::doNo
tCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_c
ast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttribute>(v8:
:None), 0 /* on instance */}, |
| 6179 {"doNotCheckSecurityOnGetterLongAttribute", TestObjectPythonV8Internal::doNo
tCheckSecurityOnGetterLongAttributeAttributeGetterCallback, TestObjectPythonV8In
ternal::doNotCheckSecurityOnGetterLongAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttri
bute>(v8::None), 0 /* on instance */}, | |
| 6180 {"doNotCheckSecurityOnSetterLongAttribute", TestObjectPythonV8Internal::doNo
tCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestObjectPythonV8In
ternal::doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttr
ibute>(v8::None), 0 /* on instance */}, | 6152 {"doNotCheckSecurityOnSetterLongAttribute", TestObjectPythonV8Internal::doNo
tCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestObjectPythonV8In
ternal::doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback, 0, 0, 0,
static_cast<v8::AccessControl>(v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttr
ibute>(v8::None), 0 /* on instance */}, |
| 6181 {"enforceRangeLongAttribute", TestObjectPythonV8Internal::enforceRangeLongAt
tributeAttributeGetterCallback, TestObjectPythonV8Internal::enforceRangeLongAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 6153 {"enforceRangeLongAttribute", TestObjectPythonV8Internal::enforceRangeLongAt
tributeAttributeGetterCallback, TestObjectPythonV8Internal::enforceRangeLongAttr
ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL
T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 6182 {"getterRaisesExceptionLongAttribute", TestObjectPythonV8Internal::getterRai
sesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::ge
tterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, | 6154 {"getterRaisesExceptionLongAttribute", TestObjectPythonV8Internal::getterRai
sesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::ge
tterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8
::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, |
| 6183 {"implementedAsLongAttribute", TestObjectPythonV8Internal::implementedAsLong
AttributeAttributeGetterCallback, TestObjectPythonV8Internal::implementedAsLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 6155 {"implementedAsLongAttribute", TestObjectPythonV8Internal::implementedAsLong
AttributeAttributeGetterCallback, TestObjectPythonV8Internal::implementedAsLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 6184 {"customImplementedAsLongAttribute", TestObjectPythonV8Internal::customImple
mentedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::custom
ImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, | 6156 {"customImplementedAsLongAttribute", TestObjectPythonV8Internal::customImple
mentedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::custom
ImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}, |
| 6185 {"customGetterImplementedAsLongAttribute", TestObjectPythonV8Internal::custo
mGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Inte
rnal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | 6157 {"customGetterImplementedAsLongAttribute", TestObjectPythonV8Internal::custo
mGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Inte
rnal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, |
| 6186 {"customSetterImplementedAsLongAttribute", TestObjectPythonV8Internal::custo
mSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Inte
rnal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, | 6158 {"customSetterImplementedAsLongAttribute", TestObjectPythonV8Internal::custo
mSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Inte
rnal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, st
atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8
::None), 0 /* on instance */}, |
| 6187 {"measureAsLongAttribute", TestObjectPythonV8Internal::measureAsLongAttribut
eAttributeGetterCallback, TestObjectPythonV8Internal::measureAsLongAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 6159 {"measureAsLongAttribute", TestObjectPythonV8Internal::measureAsLongAttribut
eAttributeGetterCallback, TestObjectPythonV8Internal::measureAsLongAttributeAttr
ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 6188 {"notEnumerableLongAttribute", TestObjectPythonV8Internal::notEnumerableLong
AttributeAttributeGetterCallback, TestObjectPythonV8Internal::notEnumerableLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */}, | 6160 {"notEnumerableLongAttribute", TestObjectPythonV8Internal::notEnumerableLong
AttributeAttributeGetterCallback, TestObjectPythonV8Internal::notEnumerableLongA
ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF
AULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */}, |
| 6189 {"perWorldBindingsLongAttribute", TestObjectPythonV8Internal::perWorldBindin
gsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perWorldBind
ingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::perWorldBi
ndingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Intern
al::perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_
cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::Non
e), 0 /* on instance */}, | 6161 {"perWorldBindingsLongAttribute", TestObjectPythonV8Internal::perWorldBindin
gsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perWorldBind
ingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::perWorldBi
ndingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Intern
al::perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_
cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::Non
e), 0 /* on instance */}, |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6585 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT
ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 6557 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT
ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 6586 return wrapper; | 6558 return wrapper; |
| 6587 } | 6559 } |
| 6588 | 6560 |
| 6589 void V8TestObjectPython::derefObject(void* object) | 6561 void V8TestObjectPython::derefObject(void* object) |
| 6590 { | 6562 { |
| 6591 fromInternalPointer(object)->deref(); | 6563 fromInternalPointer(object)->deref(); |
| 6592 } | 6564 } |
| 6593 | 6565 |
| 6594 } // namespace WebCore | 6566 } // namespace WebCore |
| OLD | NEW |