| 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 #include "V8TestInterfaceCheckSecurity.h" | 8 #include "V8TestInterfaceCheckSecurity.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 v8::String::Utf8Value attributeName(name); | 37 v8::String::Utf8Value attributeName(name); |
| 38 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); | 38 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); |
| 39 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { | 39 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { |
| 40 exceptionState.throwIfNeeded(); | 40 exceptionState.throwIfNeeded(); |
| 41 return; | 41 return; |
| 42 } | 42 } |
| 43 ASSERT(info.This()->IsObject()); | 43 ASSERT(info.This()->IsObject()); |
| 44 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 44 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
| 45 } | 45 } |
| 46 | 46 |
| 47 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 47 static void longAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
| 48 { | 48 { |
| 49 v8::Local<v8::Object> holder = info.Holder(); | 49 v8::Local<v8::Object> holder = info.Holder(); |
| 50 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 50 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 51 v8SetReturnValueInt(info, impl->longAttribute()); | 51 v8SetReturnValueInt(info, impl->longAttribute()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 54 static void longAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 55 { | 55 { |
| 56 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 56 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 57 TestInterfaceCheckSecurityV8Internal::longAttributeAttributeGetter(info); | 57 TestInterfaceCheckSecurityV8Internal::longAttributeAttributeGetter(info); |
| 58 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 58 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 59 } | 59 } |
| 60 | 60 |
| 61 static void doNotCheckSecurityLongAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 61 static void doNotCheckSecurityLongAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 62 { | 62 { |
| 63 v8::Local<v8::Object> holder = info.Holder(); | 63 v8::Local<v8::Object> holder = info.Holder(); |
| 64 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 64 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 65 v8SetReturnValueInt(info, impl->doNotCheckSecurityLongAttribute()); | 65 v8SetReturnValueInt(info, impl->doNotCheckSecurityLongAttribute()); |
| 66 } | 66 } |
| 67 | 67 |
| 68 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 68 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 69 { | 69 { |
| 70 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 70 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 71 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teGetter(info); | 71 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teGetter(info); |
| 72 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 72 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 73 } | 73 } |
| 74 | 74 |
| 75 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 75 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 76 { | 76 { |
| 77 v8::Local<v8::Object> holder = info.Holder(); | 77 v8::Local<v8::Object> holder = info.Holder(); |
| 78 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate()); | 78 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate()); |
| 79 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 79 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 80 int cppValue = toInt32(v8Value, exceptionState); | 80 int cppValue = toInt32(v8Value, exceptionState); |
| 81 if (exceptionState.throwIfNeeded()) | 81 if (exceptionState.throwIfNeeded()) |
| 82 return; | 82 return; |
| 83 impl->setDoNotCheckSecurityLongAttribute(cppValue); | 83 impl->setDoNotCheckSecurityLongAttribute(cppValue); |
| 84 } | 84 } |
| 85 | 85 |
| 86 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 86 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 87 { | 87 { |
| 88 v8::Local<v8::Value> v8Value = info[0]; |
| 88 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 89 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 89 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teSetter(v8Value, info); | 90 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teSetter(v8Value, info); |
| 90 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 91 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 91 } | 92 } |
| 92 | 93 |
| 93 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 94 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 94 { | 95 { |
| 95 v8::Local<v8::Object> holder = info.Holder(); | 96 v8::Local<v8::Object> holder = info.Holder(); |
| 96 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 97 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 97 v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute()); | 98 v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute()); |
| 98 } | 99 } |
| 99 | 100 |
| 100 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 101 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 101 { | 102 { |
| 102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 103 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttribut
eAttributeGetter(info); | 104 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttribut
eAttributeGetter(info); |
| 104 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 105 } | 106 } |
| 106 | 107 |
| 107 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 108 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
| 108 { | 109 { |
| 109 v8::Local<v8::Object> holder = info.Holder(); | 110 v8::Local<v8::Object> holder = info.Holder(); |
| 110 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 111 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 111 v8SetReturnValueInt(info, impl->doNotCheckSecurityOnSetterLongAttribute()); | 112 v8SetReturnValueInt(info, impl->doNotCheckSecurityOnSetterLongAttribute()); |
| 112 } | 113 } |
| 113 | 114 |
| 114 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 115 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 115 { | 116 { |
| 116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 117 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 117 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeGetter(info); | 118 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeGetter(info); |
| 118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 119 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 119 } | 120 } |
| 120 | 121 |
| 121 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 122 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 122 { | 123 { |
| 123 v8::Local<v8::Object> holder = info.Holder(); | 124 v8::Local<v8::Object> holder = info.Holder(); |
| 124 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolat
e()); | 125 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolat
e()); |
| 125 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 126 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 126 int cppValue = toInt32(v8Value, exceptionState); | 127 int cppValue = toInt32(v8Value, exceptionState); |
| 127 if (exceptionState.throwIfNeeded()) | 128 if (exceptionState.throwIfNeeded()) |
| 128 return; | 129 return; |
| 129 impl->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); | 130 impl->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); |
| 130 } | 131 } |
| 131 | 132 |
| 132 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v
oid>& info) | 133 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 133 { | 134 { |
| 135 v8::Local<v8::Value> v8Value = info[0]; |
| 134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 136 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 135 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(v8Value, info); | 137 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(v8Value, info); |
| 136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 138 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 137 } | 139 } |
| 138 | 140 |
| 139 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 141 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 140 { | 142 { |
| 141 v8::Local<v8::Object> holder = info.Holder(); | 143 v8::Local<v8::Object> holder = info.Holder(); |
| 142 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 144 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 143 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAtt
ribute()); | 145 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAtt
ribute()); |
| 144 } | 146 } |
| 145 | 147 |
| 146 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 148 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCal
lback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 147 { | 149 { |
| 148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 150 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 149 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeGetter(info); | 151 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeGetter(info); |
| 150 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 151 } | 153 } |
| 152 | 154 |
| 153 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 155 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeSetter(v8
::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 154 { | 156 { |
| 155 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "doNo
tCheckSecurityReplaceableReadonlyLongAttribute"); | 157 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "doNo
tCheckSecurityReplaceableReadonlyLongAttribute"); |
| 156 TestInterfaceCheckSecurityForceSetAttributeOnThis(propertyName, v8Value, inf
o); | 158 TestInterfaceCheckSecurityForceSetAttributeOnThis(propertyName, v8Value, inf
o); |
| 157 } | 159 } |
| 158 | 160 |
| 159 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeSetterCal
lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal
lbackInfo<void>& info) | 161 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeSetterCal
lback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 160 { | 162 { |
| 163 v8::Local<v8::Value> v8Value = info[0]; |
| 161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 164 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 162 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeSetter(v8Value, info); | 165 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeSetter(v8Value, info); |
| 163 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 164 } | 167 } |
| 165 | 168 |
| 166 static void doNotCheckSecurityReplaceableReadonlyLongAccessorAttributeGetter(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 169 static void doNotCheckSecurityReplaceableReadonlyLongAccessorAttributeGetter(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
| 167 { | 170 { |
| 168 v8::Local<v8::Object> holder = info.Holder(); | 171 v8::Local<v8::Object> holder = info.Holder(); |
| 169 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 172 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
| 170 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAcc
essor()); | 173 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAcc
essor()); |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 | 492 |
| 490 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 493 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
| 491 { | 494 { |
| 492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 495 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 493 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, v8Value, info); | 496 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, v8Value, info); |
| 494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 497 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 495 } | 498 } |
| 496 | 499 |
| 497 } // namespace TestInterfaceCheckSecurityV8Internal | 500 } // namespace TestInterfaceCheckSecurityV8Internal |
| 498 | 501 |
| 499 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecu
rityAttributes[] = { | |
| 500 {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
, V8DOMConfiguration::OnInstance}, | |
| 501 {"doNotCheckSecurityLongAttribute", TestInterfaceCheckSecurityV8Internal::do
NotCheckSecurityLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurity
V8Internal::doNotCheckSecurityLongAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC
onfiguration::OnInstance}, | |
| 502 {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Inte
rnal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0
, static_cast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttr
ibute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nInstance}, | |
| 503 {"doNotCheckSecurityOnSetterLongAttribute", TestInterfaceCheckSecurityV8Inte
rnal::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestInterf
aceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN_WRITE), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance}, | |
| 504 {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSec
urityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGett
erCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableR
eadonlyLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstanc
e}, | |
| 505 }; | |
| 506 | |
| 507 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceCheckSecur
ityAccessors[] = { | 502 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceCheckSecur
ityAccessors[] = { |
| 503 {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
}, |
| 504 {"doNotCheckSecurityLongAttribute", TestInterfaceCheckSecurityV8Internal::do
NotCheckSecurityLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurity
V8Internal::doNotCheckSecurityLongAttributeAttributeSetterCallback, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v
8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, |
| 505 {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Inte
rnal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0
, static_cast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttr
ibute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, |
| 506 {"doNotCheckSecurityOnSetterLongAttribute", TestInterfaceCheckSecurityV8Inte
rnal::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestInterf
aceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeSett
erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN_WRITE), static_c
ast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, |
| 507 {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSec
urityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGett
erCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableR
eadonlyLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute>(v
8::None), V8DOMConfiguration::ExposedToAllScripts}, |
| 508 {"doNotCheckSecurityReplaceableReadonlyLongAccessor", TestInterfaceCheckSecu
rityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAccessorAttributeGetter
Callback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableRea
donlyLongAccessorAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl
>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute>(v8::
None), V8DOMConfiguration::ExposedToAllScripts}, | 508 {"doNotCheckSecurityReplaceableReadonlyLongAccessor", TestInterfaceCheckSecu
rityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAccessorAttributeGetter
Callback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableRea
donlyLongAccessorAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl
>(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute>(v8::
None), V8DOMConfiguration::ExposedToAllScripts}, |
| 509 }; | 509 }; |
| 510 | 510 |
| 511 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurit
yMethods[] = { | 511 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurit
yMethods[] = { |
| 512 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 512 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
| 513 }; | 513 }; |
| 514 | 514 |
| 515 static void installV8TestInterfaceCheckSecurityTemplate(v8::Local<v8::FunctionTe
mplate> functionTemplate, v8::Isolate* isolate) | 515 static void installV8TestInterfaceCheckSecurityTemplate(v8::Local<v8::FunctionTe
mplate> functionTemplate, v8::Isolate* isolate) |
| 516 { | 516 { |
| 517 functionTemplate->ReadOnlyPrototype(); | 517 functionTemplate->ReadOnlyPrototype(); |
| 518 | 518 |
| 519 v8::Local<v8::Signature> defaultSignature; | 519 v8::Local<v8::Signature> defaultSignature; |
| 520 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceCheckSecurity", v8::Local<v8::FunctionTemplate>(), V
8TestInterfaceCheckSecurity::internalFieldCount, | 520 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceCheckSecurity", v8::Local<v8::FunctionTemplate>(), V
8TestInterfaceCheckSecurity::internalFieldCount, |
| 521 V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInterface
CheckSecurityAttributes), | 521 0, 0, |
| 522 V8TestInterfaceCheckSecurityAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceC
heckSecurityAccessors), | 522 V8TestInterfaceCheckSecurityAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceC
heckSecurityAccessors), |
| 523 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods)); | 523 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods)); |
| 524 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 524 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 525 ALLOW_UNUSED_LOCAL(instanceTemplate); | 525 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 526 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 526 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 527 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 527 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 528 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); | 528 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); |
| 529 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVo
idMethodOriginSafeAttributeConfiguration = { | 529 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVo
idMethodOriginSafeAttributeConfiguration = { |
| 530 "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::do
NotCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecu
rityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0,
&V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_READ, static_cast<v8
::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance, | 530 "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::do
NotCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecu
rityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0,
&V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_READ, static_cast<v8
::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance, |
| 531 }; | 531 }; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 { | 571 { |
| 572 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); | 572 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); |
| 573 } | 573 } |
| 574 | 574 |
| 575 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) | 575 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) |
| 576 { | 576 { |
| 577 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); | 577 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); |
| 578 } | 578 } |
| 579 | 579 |
| 580 } // namespace blink | 580 } // namespace blink |
| OLD | NEW |