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 14 matching lines...) Expand all Loading... |
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::PropertyCallbackInfo<v8::Valu
e>& info) |
34 { | 34 { |
35 v8::Handle<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(v8::Local<v8::String>, const v8
::PropertyCallbackInfo<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::PropertyCal
lbackInfo<v8::Value>& info) |
48 { | 48 { |
49 v8::Handle<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(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<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::PropertyCallbackInfo<void>& info) |
62 { | 62 { |
63 v8::Handle<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(v8::Local<v8:
:String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in
fo) |
71 { | 71 { |
72 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 72 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
73 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teSetter(v8Value, info); | 73 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttribu
teSetter(v8Value, info); |
74 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 74 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
75 } | 75 } |
76 | 76 |
77 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 77 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
78 { | 78 { |
79 v8::Handle<v8::Object> holder = info.Holder(); | 79 v8::Local<v8::Object> holder = info.Holder(); |
80 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 80 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
81 v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute()); | 81 v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute()); |
82 } | 82 } |
83 | 83 |
84 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 84 static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
85 { | 85 { |
86 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 86 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
87 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttribut
eAttributeGetter(info); | 87 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttribut
eAttributeGetter(info); |
88 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 88 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
89 } | 89 } |
90 | 90 |
91 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 91 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
92 { | 92 { |
93 v8::Handle<v8::Object> holder = info.Holder(); | 93 v8::Local<v8::Object> holder = info.Holder(); |
94 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 94 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
95 v8SetReturnValueInt(info, impl->doNotCheckSecurityOnSetterLongAttribute()); | 95 v8SetReturnValueInt(info, impl->doNotCheckSecurityOnSetterLongAttribute()); |
96 } | 96 } |
97 | 97 |
98 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 98 static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
99 { | 99 { |
100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
101 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeGetter(info); | 101 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeGetter(info); |
102 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 102 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
103 } | 103 } |
104 | 104 |
105 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 105 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8:
:Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
106 { | 106 { |
107 v8::Handle<v8::Object> holder = info.Holder(); | 107 v8::Local<v8::Object> holder = info.Holder(); |
108 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolat
e()); | 108 ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecu
rityOnSetterLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolat
e()); |
109 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 109 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
110 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 110 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); |
111 impl->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); | 111 impl->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); |
112 } | 112 } |
113 | 113 |
114 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v
oid>& info) | 114 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v
oid>& info) |
115 { | 115 { |
116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 116 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
117 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(v8Value, info); | 117 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(v8Value, info); |
118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 118 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
119 } | 119 } |
120 | 120 |
121 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) | 121 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
122 { | 122 { |
123 v8::Handle<v8::Object> holder = info.Holder(); | 123 v8::Local<v8::Object> holder = info.Holder(); |
124 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 124 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
125 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAtt
ribute()); | 125 v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAtt
ribute()); |
126 } | 126 } |
127 | 127 |
128 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 128 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
129 { | 129 { |
130 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 130 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
131 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeGetter(info); | 131 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeGetter(info); |
132 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 132 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
133 } | 133 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 { | 190 { |
191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
192 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMethod(inf
o); | 192 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMethod(inf
o); |
193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
194 } | 194 } |
195 | 195 |
196 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 196 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
197 { | 197 { |
198 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 198 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
199 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 199 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); |
200 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMeth
odCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInterface
CheckSecurity::domTemplate(info.GetIsolate())), 0); | 200 v8::Local<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTemp
lateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMetho
dCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInterfaceC
heckSecurity::domTemplate(info.GetIsolate())), 0); |
201 | 201 |
202 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 202 v8::Local<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceInP
rototypeChain(info.This(), info.GetIsolate()); |
203 if (holder.IsEmpty()) { | 203 if (holder.IsEmpty()) { |
204 // This is only reachable via |object.__proto__.func|, in which case it | 204 // This is only reachable via |object.__proto__.func|, in which case it |
205 // has already passed the same origin security check | 205 // has already passed the same origin security check |
206 v8SetReturnValue(info, privateTemplate->GetFunction()); | 206 v8SetReturnValue(info, privateTemplate->GetFunction()); |
207 return; | 207 return; |
208 } | 208 } |
209 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 209 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
210 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 210 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { |
211 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 211 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
212 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMeth
odMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInt
erfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 212 v8::Local<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&shar
edTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMetho
dMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInte
rfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
213 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 213 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
214 return; | 214 return; |
215 } | 215 } |
216 | 216 |
217 v8::Local<v8::Value> hiddenValue = v8::Handle<v8::Object>::Cast(info.This())
->GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityVoidMethod
")); | 217 v8::Local<v8::Value> hiddenValue = v8::Local<v8::Object>::Cast(info.This())-
>GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityVoidMethod"
)); |
218 if (!hiddenValue.IsEmpty()) { | 218 if (!hiddenValue.IsEmpty()) { |
219 v8SetReturnValue(info, hiddenValue); | 219 v8SetReturnValue(info, hiddenValue); |
220 return; | 220 return; |
221 } | 221 } |
222 | 222 |
223 v8SetReturnValue(info, privateTemplate->GetFunction()); | 223 v8SetReturnValue(info, privateTemplate->GetFunction()); |
224 } | 224 } |
225 | 225 |
226 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 226 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
227 { | 227 { |
(...skipping 12 matching lines...) Expand all Loading... |
240 { | 240 { |
241 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 241 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
242 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSignatureV
oidMethodMethod(info); | 242 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSignatureV
oidMethodMethod(info); |
243 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 243 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
244 } | 244 } |
245 | 245 |
246 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
r(const v8::PropertyCallbackInfo<v8::Value>& info) | 246 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
r(const v8::PropertyCallbackInfo<v8::Value>& info) |
247 { | 247 { |
248 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 248 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
249 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 249 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); |
250 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSign
atureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0); | 250 v8::Local<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTemp
lateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSigna
tureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0); |
251 | 251 |
252 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 252 v8::Local<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceInP
rototypeChain(info.This(), info.GetIsolate()); |
253 if (holder.IsEmpty()) { | 253 if (holder.IsEmpty()) { |
254 // This is only reachable via |object.__proto__.func|, in which case it | 254 // This is only reachable via |object.__proto__.func|, in which case it |
255 // has already passed the same origin security check | 255 // has already passed the same origin security check |
256 v8SetReturnValue(info, privateTemplate->GetFunction()); | 256 v8SetReturnValue(info, privateTemplate->GetFunction()); |
257 return; | 257 return; |
258 } | 258 } |
259 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 259 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
260 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 260 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { |
261 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 261 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
262 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotChe
ckSignatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(),
0); | 262 v8::Local<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&shar
edTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotChec
kSignatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0
); |
263 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 263 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
264 return; | 264 return; |
265 } | 265 } |
266 | 266 |
267 v8::Local<v8::Value> hiddenValue = v8::Handle<v8::Object>::Cast(info.This())
->GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityDoNotCheck
SignatureVoidMethod")); | 267 v8::Local<v8::Value> hiddenValue = v8::Local<v8::Object>::Cast(info.This())-
>GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityDoNotCheckS
ignatureVoidMethod")); |
268 if (!hiddenValue.IsEmpty()) { | 268 if (!hiddenValue.IsEmpty()) { |
269 v8SetReturnValue(info, hiddenValue); | 269 v8SetReturnValue(info, hiddenValue); |
270 return; | 270 return; |
271 } | 271 } |
272 | 272 |
273 v8SetReturnValue(info, privateTemplate->GetFunction()); | 273 v8SetReturnValue(info, privateTemplate->GetFunction()); |
274 } | 274 } |
275 | 275 |
276 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
rCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
) | 276 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
rCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
) |
277 { | 277 { |
(...skipping 12 matching lines...) Expand all Loading... |
290 { | 290 { |
291 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 291 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
292 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethod(info); | 292 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethod(info); |
293 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 293 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
294 } | 294 } |
295 | 295 |
296 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 296 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
297 { | 297 { |
298 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 298 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
299 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 299 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); |
300 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindin
gsVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(),
V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 300 v8::Local<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTemp
lateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBinding
sVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(),
V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
301 | 301 |
302 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 302 v8::Local<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceInP
rototypeChain(info.This(), info.GetIsolate()); |
303 if (holder.IsEmpty()) { | 303 if (holder.IsEmpty()) { |
304 // This is only reachable via |object.__proto__.func|, in which case it | 304 // This is only reachable via |object.__proto__.func|, in which case it |
305 // has already passed the same origin security check | 305 // has already passed the same origin security check |
306 v8SetReturnValue(info, privateTemplate->GetFunction()); | 306 v8SetReturnValue(info, privateTemplate->GetFunction()); |
307 return; | 307 return; |
308 } | 308 } |
309 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 309 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
310 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 310 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { |
311 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 311 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
312 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorld
BindingsVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsol
ate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 312 v8::Local<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&shar
edTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldB
indingsVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsola
te(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
313 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 313 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
314 return; | 314 return; |
315 } | 315 } |
316 | 316 |
317 v8::Local<v8::Value> hiddenValue = v8::Handle<v8::Object>::Cast(info.This())
->GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityPerWorldBi
ndingsVoidMethod")); | 317 v8::Local<v8::Value> hiddenValue = v8::Local<v8::Object>::Cast(info.This())-
>GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityPerWorldBin
dingsVoidMethod")); |
318 if (!hiddenValue.IsEmpty()) { | 318 if (!hiddenValue.IsEmpty()) { |
319 v8SetReturnValue(info, hiddenValue); | 319 v8SetReturnValue(info, hiddenValue); |
320 return; | 320 return; |
321 } | 321 } |
322 | 322 |
323 v8SetReturnValue(info, privateTemplate->GetFunction()); | 323 v8SetReturnValue(info, privateTemplate->GetFunction()); |
324 } | 324 } |
325 | 325 |
326 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 326 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
327 { | 327 { |
(...skipping 12 matching lines...) Expand all Loading... |
340 { | 340 { |
341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 341 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
342 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethodForMainWorld(info); | 342 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethodForMainWorld(info); |
343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 343 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
344 } | 344 } |
345 | 345 |
346 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 346 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
347 { | 347 { |
348 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 348 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
349 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 349 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); |
350 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindin
gsVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(info.G
etIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 350 v8::Local<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTemp
lateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBinding
sVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(info.Ge
tIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
351 | 351 |
352 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 352 v8::Local<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceInP
rototypeChain(info.This(), info.GetIsolate()); |
353 if (holder.IsEmpty()) { | 353 if (holder.IsEmpty()) { |
354 // This is only reachable via |object.__proto__.func|, in which case it | 354 // This is only reachable via |object.__proto__.func|, in which case it |
355 // has already passed the same origin security check | 355 // has already passed the same origin security check |
356 v8SetReturnValue(info, privateTemplate->GetFunction()); | 356 v8SetReturnValue(info, privateTemplate->GetFunction()); |
357 return; | 357 return; |
358 } | 358 } |
359 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 359 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
360 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 360 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { |
361 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 361 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
362 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorld
BindingsVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(
info.GetIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate()))
, 0); | 362 v8::Local<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&shar
edTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldB
indingsVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(i
nfo.GetIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())),
0); |
363 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 363 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
364 return; | 364 return; |
365 } | 365 } |
366 | 366 |
367 v8::Local<v8::Value> hiddenValue = v8::Handle<v8::Object>::Cast(info.This())
->GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityPerWorldBi
ndingsVoidMethod")); | 367 v8::Local<v8::Value> hiddenValue = v8::Local<v8::Object>::Cast(info.This())-
>GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityPerWorldBin
dingsVoidMethod")); |
368 if (!hiddenValue.IsEmpty()) { | 368 if (!hiddenValue.IsEmpty()) { |
369 v8SetReturnValue(info, hiddenValue); | 369 v8SetReturnValue(info, hiddenValue); |
370 return; | 370 return; |
371 } | 371 } |
372 | 372 |
373 v8SetReturnValue(info, privateTemplate->GetFunction()); | 373 v8SetReturnValue(info, privateTemplate->GetFunction()); |
374 } | 374 } |
375 | 375 |
376 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 376 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
377 { | 377 { |
(...skipping 12 matching lines...) Expand all Loading... |
390 { | 390 { |
391 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 391 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
392 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dMethod(info); | 392 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dMethod(info); |
393 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 393 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
394 } | 394 } |
395 | 395 |
396 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 396 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
397 { | 397 { |
398 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 398 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
399 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 399 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); |
400 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoi
dMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8Te
stInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 400 v8::Local<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTemp
lateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoid
MethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8Tes
tInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
401 | 401 |
402 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 402 v8::Local<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceInP
rototypeChain(info.This(), info.GetIsolate()); |
403 if (holder.IsEmpty()) { | 403 if (holder.IsEmpty()) { |
404 // This is only reachable via |object.__proto__.func|, in which case it | 404 // This is only reachable via |object.__proto__.func|, in which case it |
405 // has already passed the same origin security check | 405 // has already passed the same origin security check |
406 v8SetReturnValue(info, privateTemplate->GetFunction()); | 406 v8SetReturnValue(info, privateTemplate->GetFunction()); |
407 return; | 407 return; |
408 } | 408 } |
409 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 409 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
410 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 410 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { |
411 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 411 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
412 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgea
bleVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate()
, V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 412 v8::Local<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&shar
edTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeab
leVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(),
V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
413 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 413 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
414 return; | 414 return; |
415 } | 415 } |
416 | 416 |
417 v8::Local<v8::Value> hiddenValue = v8::Handle<v8::Object>::Cast(info.This())
->GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityUnforgeabl
eVoidMethod")); | 417 v8::Local<v8::Value> hiddenValue = v8::Local<v8::Object>::Cast(info.This())-
>GetHiddenValue(v8AtomicString(info.GetIsolate(), "doNotCheckSecurityUnforgeable
VoidMethod")); |
418 if (!hiddenValue.IsEmpty()) { | 418 if (!hiddenValue.IsEmpty()) { |
419 v8SetReturnValue(info, hiddenValue); | 419 v8SetReturnValue(info, hiddenValue); |
420 return; | 420 return; |
421 } | 421 } |
422 | 422 |
423 v8SetReturnValue(info, privateTemplate->GetFunction()); | 423 v8SetReturnValue(info, privateTemplate->GetFunction()); |
424 } | 424 } |
425 | 425 |
426 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 426 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
427 { | 427 { |
428 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 428 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
429 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dOriginSafeMethodGetter(info); | 429 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dOriginSafeMethodGetter(info); |
430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 430 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
431 } | 431 } |
432 | 432 |
433 static void TestInterfaceCheckSecurityOriginSafeMethodSetter(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) | 433 static void TestInterfaceCheckSecurityOriginSafeMethodSetter(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf
o) |
434 { | 434 { |
435 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 435 v8::Local<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceInP
rototypeChain(info.This(), info.GetIsolate()); |
436 if (holder.IsEmpty()) | 436 if (holder.IsEmpty()) |
437 return; | 437 return; |
438 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); | 438 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toImpl(hold
er); |
439 v8::String::Utf8Value attributeName(name); | 439 v8::String::Utf8Value attributeName(name); |
440 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); | 440 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); |
441 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { | 441 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { |
442 exceptionState.throwIfNeeded(); | 442 exceptionState.throwIfNeeded(); |
443 return; | 443 return; |
444 } | 444 } |
445 | 445 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 { | 526 { |
527 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); | 527 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->ref(); |
528 } | 528 } |
529 | 529 |
530 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) | 530 void V8TestInterfaceCheckSecurity::derefObject(ScriptWrappable* scriptWrappable) |
531 { | 531 { |
532 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); | 532 scriptWrappable->toImpl<TestInterfaceCheckSecurity>()->deref(); |
533 } | 533 } |
534 | 534 |
535 } // namespace blink | 535 } // namespace blink |
OLD | NEW |