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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 const WrapperTypeInfo V8TestInterfaceCheckSecurity::wrapperTypeInfo = { gin::kEm
bedderBlink, V8TestInterfaceCheckSecurity::domTemplate, V8TestInterfaceCheckSecu
rity::refObject, V8TestInterfaceCheckSecurity::derefObject, V8TestInterfaceCheck
Security::trace, 0, 0, V8TestInterfaceCheckSecurity::installConditionallyEnabled
Methods, V8TestInterfaceCheckSecurity::installConditionallyEnabledProperties, 0,
WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, Wr
apperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperT
ypeInfo::RefCountedObject }; | 24 const WrapperTypeInfo V8TestInterfaceCheckSecurity::wrapperTypeInfo = { gin::kEm
bedderBlink, V8TestInterfaceCheckSecurity::domTemplate, V8TestInterfaceCheckSecu
rity::refObject, V8TestInterfaceCheckSecurity::derefObject, V8TestInterfaceCheck
Security::trace, 0, 0, V8TestInterfaceCheckSecurity::installConditionallyEnabled
Methods, V8TestInterfaceCheckSecurity::installConditionallyEnabledProperties, 0,
WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, Wr
apperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperT
ypeInfo::RefCountedObject }; |
25 | 25 |
26 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eCheckSecurity.h. | 26 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eCheckSecurity.h. |
27 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 27 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
28 // bindings/core/v8/ScriptWrappable.h. | 28 // bindings/core/v8/ScriptWrappable.h. |
29 const WrapperTypeInfo& TestInterfaceCheckSecurity::s_wrapperTypeInfo = V8TestInt
erfaceCheckSecurity::wrapperTypeInfo; | 29 const WrapperTypeInfo& TestInterfaceCheckSecurity::s_wrapperTypeInfo = V8TestInt
erfaceCheckSecurity::wrapperTypeInfo; |
30 | 30 |
31 namespace TestInterfaceCheckSecurityV8Internal { | 31 namespace TestInterfaceCheckSecurityV8Internal { |
32 | 32 |
33 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu
e>& info) | 33 static void longAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
34 { | 34 { |
35 v8::Local<v8::Object> holder = info.Holder(); | 35 v8::Local<v8::Object> holder = info.Holder(); |
36 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 36 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
37 v8SetReturnValueInt(info, impl->longAttribute()); | 37 v8SetReturnValueInt(info, impl->longAttribute()); |
38 } | 38 } |
39 | 39 |
40 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<v8::Value>& info) | 40 static void longAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
41 { | 41 { |
42 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 42 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
43 TestInterfaceCheckSecurityV8Internal::longAttributeAttributeGetter(info); | 43 TestInterfaceCheckSecurityV8Internal::longAttributeAttributeGetter(info); |
44 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 44 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
45 } | 45 } |
46 | 46 |
47 static void doNotCheckSecurityLongAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) | 47 static void doNotCheckSecurityLongAttributeAttributeGetter(const v8::FunctionCal
lbackInfo<v8::Value>& 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->doNotCheckSecurityLongAttribute()); | 51 v8SetReturnValueInt(info, impl->doNotCheckSecurityLongAttribute()); |
52 } | 52 } |
53 | 53 |
54 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 54 static void doNotCheckSecurityLongAttributeAttributeGetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
55 { | 55 { |
56 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 56 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
57 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teGetter(info); | 57 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teGetter(info); |
58 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 58 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
59 } | 59 } |
60 | 60 |
61 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<void>& info) | 61 static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value>
v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
62 { | 62 { |
63 v8::Local<v8::Object> holder = info.Holder(); | 63 v8::Local<v8::Object> holder = info.Holder(); |
64 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate()); | 64 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate()); |
65 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 65 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
66 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 66 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
67 impl->setDoNotCheckSecurityLongAttribute(cppValue); | 67 impl->setDoNotCheckSecurityLongAttribute(cppValue); |
68 } | 68 } |
69 | 69 |
70 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) | 70 static void doNotCheckSecurityLongAttributeAttributeSetterCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
71 { | 71 { |
| 72 v8::Local<v8::Value> v8Value = info[0]; |
72 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 73 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
73 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teSetter(v8Value, info); | 74 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teSetter(v8Value, info); |
74 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 75 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
75 } | 76 } |
76 | 77 |
77 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 78 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
78 { | 79 { |
79 v8::Local<v8::Object> holder = info.Holder(); | 80 v8::Local<v8::Object> holder = info.Holder(); |
80 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 81 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
81 v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute()); | 82 v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute()); |
82 } | 83 } |
83 | 84 |
84 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 85 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
85 { | 86 { |
86 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 87 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
87 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttribut
eAttributeGetter(info); | 88 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttribut
eAttributeGetter(info); |
88 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
89 } | 90 } |
90 | 91 |
91 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 92 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
92 { | 93 { |
93 v8::Local<v8::Object> holder = info.Holder(); | 94 v8::Local<v8::Object> holder = info.Holder(); |
94 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 95 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
95 v8SetReturnValueInt(info, impl->doNotCheckSecurityOnSetterLongAttribute()); | 96 v8SetReturnValueInt(info, impl->doNotCheckSecurityOnSetterLongAttribute()); |
96 } | 97 } |
97 | 98 |
98 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 99 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
99 { | 100 { |
100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
101 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeGetter(info); | 102 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeGetter(info); |
102 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
103 } | 104 } |
104 | 105 |
105 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 106 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
106 { | 107 { |
107 v8::Local<v8::Object> holder = info.Holder(); | 108 v8::Local<v8::Object> holder = info.Holder(); |
108 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolat
e()); | 109 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolat
e()); |
109 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 110 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
110 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 111 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
111 impl->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); | 112 impl->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); |
112 } | 113 } |
113 | 114 |
114 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v
oid>& info) | 115 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
115 { | 116 { |
| 117 v8::Local<v8::Value> v8Value = info[0]; |
116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
117 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(v8Value, info); | 119 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(v8Value, info); |
118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
119 } | 121 } |
120 | 122 |
121 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 123 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
122 { | 124 { |
123 v8::Local<v8::Object> holder = info.Holder(); | 125 v8::Local<v8::Object> holder = info.Holder(); |
124 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 126 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
125 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAtt
ribute()); | 127 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAtt
ribute()); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 451 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
450 { | 452 { |
451 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 453 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
452 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, v8Value, info); | 454 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, v8Value, info); |
453 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 455 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
454 } | 456 } |
455 | 457 |
456 } // namespace TestInterfaceCheckSecurityV8Internal | 458 } // namespace TestInterfaceCheckSecurityV8Internal |
457 | 459 |
458 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecu
rityAttributes[] = { | 460 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecu
rityAttributes[] = { |
459 {"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}, | |
460 {"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}, | |
461 {"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}, | |
462 {"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}, | |
463 {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSec
urityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGett
erCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityForc
eSetAttributeOnThisCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN
_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute>(v8::None), V8DOMC
onfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 461 {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSec
urityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGett
erCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityForc
eSetAttributeOnThisCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN
_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute>(v8::None), V8DOMC
onfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
464 }; | 462 }; |
465 | 463 |
| 464 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceCheckSecur
ityAccessors[] = { |
| 465 {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts
}, |
| 466 {"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}, |
| 467 {"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}, |
| 468 {"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}, |
| 469 }; |
| 470 |
466 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurit
yMethods[] = { | 471 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurit
yMethods[] = { |
467 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 472 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac
k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
468 }; | 473 }; |
469 | 474 |
470 static void installV8TestInterfaceCheckSecurityTemplate(v8::Local<v8::FunctionTe
mplate> functionTemplate, v8::Isolate* isolate) | 475 static void installV8TestInterfaceCheckSecurityTemplate(v8::Local<v8::FunctionTe
mplate> functionTemplate, v8::Isolate* isolate) |
471 { | 476 { |
472 functionTemplate->ReadOnlyPrototype(); | 477 functionTemplate->ReadOnlyPrototype(); |
473 | 478 |
474 v8::Local<v8::Signature> defaultSignature; | 479 v8::Local<v8::Signature> defaultSignature; |
475 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceCheckSecurity", v8::Local<v8::FunctionTemplate>(), V
8TestInterfaceCheckSecurity::internalFieldCount, | 480 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceCheckSecurity", v8::Local<v8::FunctionTemplate>(), V
8TestInterfaceCheckSecurity::internalFieldCount, |
476 V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInterface
CheckSecurityAttributes), | 481 V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInterface
CheckSecurityAttributes), |
477 0, 0, | 482 V8TestInterfaceCheckSecurityAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceC
heckSecurityAccessors), |
478 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods)); | 483 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods)); |
479 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 484 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
480 ALLOW_UNUSED_LOCAL(instanceTemplate); | 485 ALLOW_UNUSED_LOCAL(instanceTemplate); |
481 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 486 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
482 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 487 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
483 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); | 488 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); |
484 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVo
idMethodOriginSafeAttributeConfiguration = { | 489 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVo
idMethodOriginSafeAttributeConfiguration = { |
485 "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, | 490 "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, |
486 }; | 491 }; |
487 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Local<v8::Object
Template>(), doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration, isola
te); | 492 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Local<v8::Object
Template>(), doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration, isola
te); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 { | 531 { |
527 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); | 532 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); |
528 } | 533 } |
529 | 534 |
530 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) | 535 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) |
531 { | 536 { |
532 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); | 537 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); |
533 } | 538 } |
534 | 539 |
535 } // namespace blink | 540 } // namespace blink |
OLD | NEW |