OLD | NEW |
1 /* | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 // Use of this source code is governed by a BSD-style license that can be |
3 * | 3 // found in the LICENSE file. |
4 * Redistribution and use in source and binary forms, with or without | |
5 * modification, are permitted provided that the following conditions are | |
6 * met: | |
7 * | |
8 * * Redistributions of source code must retain the above copyright | |
9 * notice, this list of conditions and the following disclaimer. | |
10 * * Redistributions in binary form must reproduce the above | |
11 * copyright notice, this list of conditions and the following disclaimer | |
12 * in the documentation and/or other materials provided with the | |
13 * distribution. | |
14 * * Neither the name of Google Inc. nor the names of its | |
15 * contributors may be used to endorse or promote products derived from | |
16 * this software without specific prior written permission. | |
17 * | |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 */ | |
30 | 4 |
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
32 | 6 |
33 #include "config.h" | 7 #include "config.h" |
34 #include "V8TestInterfaceCheckSecurity.h" | 8 #include "V8TestInterfaceCheckSecurity.h" |
35 | 9 |
36 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
37 #include "bindings/v8/BindingSecurity.h" | 11 #include "bindings/v8/BindingSecurity.h" |
38 #include "bindings/v8/ExceptionState.h" | 12 #include "bindings/v8/ExceptionState.h" |
39 #include "bindings/v8/V8DOMConfiguration.h" | 13 #include "bindings/v8/V8DOMConfiguration.h" |
40 #include "bindings/v8/V8HiddenValue.h" | 14 #include "bindings/v8/V8HiddenValue.h" |
41 #include "bindings/v8/V8ObjectConstructor.h" | 15 #include "bindings/v8/V8ObjectConstructor.h" |
42 #include "core/dom/ContextFeatures.h" | 16 #include "core/dom/ContextFeatures.h" |
43 #include "core/dom/Document.h" | 17 #include "core/dom/Document.h" |
44 #include "platform/TraceEvent.h" | 18 #include "platform/TraceEvent.h" |
45 #include "wtf/GetPtr.h" | 19 #include "wtf/GetPtr.h" |
46 #include "wtf/RefPtr.h" | 20 #include "wtf/RefPtr.h" |
47 | 21 |
48 namespace WebCore { | 22 namespace WebCore { |
49 | 23 |
50 static void initializeScriptWrappableForInterface(TestInterfaceCheckSecurity* ob
ject) | 24 static void initializeScriptWrappableForInterface(TestInterfaceCheckSecurity* ob
ject) |
51 { | 25 { |
52 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 26 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
53 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceCheckSecuri
ty::wrapperTypeInfo); | 27 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceCheckSecuri
ty::wrapperTypeInfo); |
54 else | 28 else |
55 ASSERT_NOT_REACHED(); | 29 ASSERT_NOT_REACHED(); |
56 } | 30 } |
57 | 31 |
58 } // namespace WebCore | 32 } // namespace WebCore |
59 | 33 |
60 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | |
61 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | |
62 // in the global namespace. | |
63 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | |
64 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceCheckSec
urity* object) | 34 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceCheckSec
urity* object) |
65 { | 35 { |
66 WebCore::initializeScriptWrappableForInterface(object); | 36 WebCore::initializeScriptWrappableForInterface(object); |
67 } | 37 } |
68 | 38 |
69 namespace WebCore { | 39 namespace WebCore { |
70 const WrapperTypeInfo V8TestInterfaceCheckSecurity::wrapperTypeInfo = { gin::kEm
bedderBlink, V8TestInterfaceCheckSecurity::domTemplate, V8TestInterfaceCheckSecu
rity::derefObject, 0, 0, 0, V8TestInterfaceCheckSecurity::installPerContextEnabl
edMethods, 0, WrapperTypeObjectPrototype, false }; | 40 const WrapperTypeInfo V8TestInterfaceCheckSecurity::wrapperTypeInfo = { gin::kEm
bedderBlink, V8TestInterfaceCheckSecurity::domTemplate, V8TestInterfaceCheckSecu
rity::derefObject, 0, 0, 0, V8TestInterfaceCheckSecurity::installPerContextEnabl
edMethods, 0, WrapperTypeObjectPrototype, false }; |
71 | 41 |
72 namespace TestInterfaceCheckSecurityV8Internal { | 42 namespace TestInterfaceCheckSecurityV8Internal { |
73 | 43 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 134 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
165 { | 135 { |
166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 136 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
167 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeGetter(info); | 137 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeGetter(info); |
168 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 138 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
169 } | 139 } |
170 | 140 |
171 static void TestInterfaceCheckSecurityReplaceableAttributeSetter(v8::Local<v8::S
tring> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) | 141 static void TestInterfaceCheckSecurityReplaceableAttributeSetter(v8::Local<v8::S
tring> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
172 { | 142 { |
173 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(in
fo.Holder()); | 143 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(in
fo.Holder()); |
| 144 v8::Isolate* isolate = info.GetIsolate(); |
174 v8::String::Utf8Value attributeName(name); | 145 v8::String::Utf8Value attributeName(name); |
175 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); | 146 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), isolate); |
176 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { | 147 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), excep
tionState)) { |
177 exceptionState.throwIfNeeded(); | 148 exceptionState.throwIfNeeded(); |
178 return; | 149 return; |
179 } | 150 } |
180 info.This()->ForceSet(name, jsValue); | 151 info.This()->ForceSet(name, jsValue); |
181 } | 152 } |
182 | 153 |
183 static void TestInterfaceCheckSecurityReplaceableAttributeSetterCallback(v8::Loc
al<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInf
o<void>& info) | 154 static void TestInterfaceCheckSecurityReplaceableAttributeSetterCallback(v8::Loc
al<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInf
o<void>& info) |
184 { | 155 { |
185 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityReplaceableA
ttributeSetter(name, jsValue, info); | 156 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityReplaceableA
ttributeSetter(name, jsValue, info); |
186 } | 157 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 194 |
224 static void doNotCheckSecurityVoidMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 195 static void doNotCheckSecurityVoidMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
225 { | 196 { |
226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 197 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
227 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMethod(inf
o); | 198 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMethod(inf
o); |
228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 199 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
229 } | 200 } |
230 | 201 |
231 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 202 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
232 { | 203 { |
| 204 v8::Isolate* isolate = info.GetIsolate(); |
233 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 205 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
234 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 206 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
235 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMeth
odCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInterface
CheckSecurity::domTemplate(info.GetIsolate())), 0); | 207 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodMeth
odCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInterface
CheckSecurity::domTemplate(info.GetIsolate())), 0); |
236 | 208 |
237 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 209 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), isolate); |
238 if (holder.IsEmpty()) { | 210 if (holder.IsEmpty()) { |
239 // This is only reachable via |object.__proto__.func|, in which case it | 211 // This is only reachable via |object.__proto__.func|, in which case it |
240 // has already passed the same origin security check | 212 // has already passed the same origin security check |
241 v8SetReturnValue(info, privateTemplate->GetFunction()); | 213 v8SetReturnValue(info, privateTemplate->GetFunction()); |
242 return; | 214 return; |
243 } | 215 } |
244 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); | 216 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); |
245 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 217 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), DoNot
ReportSecurityError)) { |
246 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 218 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
247 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMeth
odMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInt
erfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 219 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMeth
odMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestInt
erfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
248 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 220 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
249 return; | 221 return; |
250 } | 222 } |
251 | 223 |
252 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(info.GetIsolate(), "doNotCheckSecurityVoidMethod")); | 224 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(isolate, "doNotCheckSecurityVoidMethod")); |
253 if (!hiddenValue.IsEmpty()) { | 225 if (!hiddenValue.IsEmpty()) { |
254 v8SetReturnValue(info, hiddenValue); | 226 v8SetReturnValue(info, hiddenValue); |
255 return; | 227 return; |
256 } | 228 } |
257 | 229 |
258 v8SetReturnValue(info, privateTemplate->GetFunction()); | 230 v8SetReturnValue(info, privateTemplate->GetFunction()); |
259 } | 231 } |
260 | 232 |
261 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 233 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
262 { | 234 { |
(...skipping 10 matching lines...) Expand all Loading... |
273 | 245 |
274 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 246 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
275 { | 247 { |
276 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 248 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
277 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSignatureV
oidMethodMethod(info); | 249 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSignatureV
oidMethodMethod(info); |
278 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 250 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
279 } | 251 } |
280 | 252 |
281 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
r(const v8::PropertyCallbackInfo<v8::Value>& info) | 253 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
r(const v8::PropertyCallbackInfo<v8::Value>& info) |
282 { | 254 { |
| 255 v8::Isolate* isolate = info.GetIsolate(); |
283 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 256 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
284 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 257 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
285 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSign
atureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0); | 258 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSign
atureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0); |
286 | 259 |
287 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 260 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), isolate); |
288 if (holder.IsEmpty()) { | 261 if (holder.IsEmpty()) { |
289 // This is only reachable via |object.__proto__.func|, in which case it | 262 // This is only reachable via |object.__proto__.func|, in which case it |
290 // has already passed the same origin security check | 263 // has already passed the same origin security check |
291 v8SetReturnValue(info, privateTemplate->GetFunction()); | 264 v8SetReturnValue(info, privateTemplate->GetFunction()); |
292 return; | 265 return; |
293 } | 266 } |
294 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); | 267 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); |
295 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 268 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), DoNot
ReportSecurityError)) { |
296 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 269 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
297 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotChe
ckSignatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(),
0); | 270 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotChe
ckSignatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(),
0); |
298 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 271 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
299 return; | 272 return; |
300 } | 273 } |
301 | 274 |
302 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(info.GetIsolate(), "doNotCheckSecurityDoNotCheckSignatureVoidMethod")); | 275 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(isolate, "doNotCheckSecurityDoNotCheckSignatureVoidMethod")); |
303 if (!hiddenValue.IsEmpty()) { | 276 if (!hiddenValue.IsEmpty()) { |
304 v8SetReturnValue(info, hiddenValue); | 277 v8SetReturnValue(info, hiddenValue); |
305 return; | 278 return; |
306 } | 279 } |
307 | 280 |
308 v8SetReturnValue(info, privateTemplate->GetFunction()); | 281 v8SetReturnValue(info, privateTemplate->GetFunction()); |
309 } | 282 } |
310 | 283 |
311 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
rCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
) | 284 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
rCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
) |
312 { | 285 { |
(...skipping 10 matching lines...) Expand all Loading... |
323 | 296 |
324 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 297 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
325 { | 298 { |
326 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
327 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethod(info); | 300 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethod(info); |
328 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 301 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
329 } | 302 } |
330 | 303 |
331 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 304 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
332 { | 305 { |
| 306 v8::Isolate* isolate = info.GetIsolate(); |
333 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 307 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
334 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 308 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
335 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindin
gsVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(),
V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 309 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindin
gsVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(),
V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
336 | 310 |
337 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 311 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), isolate); |
338 if (holder.IsEmpty()) { | 312 if (holder.IsEmpty()) { |
339 // This is only reachable via |object.__proto__.func|, in which case it | 313 // This is only reachable via |object.__proto__.func|, in which case it |
340 // has already passed the same origin security check | 314 // has already passed the same origin security check |
341 v8SetReturnValue(info, privateTemplate->GetFunction()); | 315 v8SetReturnValue(info, privateTemplate->GetFunction()); |
342 return; | 316 return; |
343 } | 317 } |
344 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); | 318 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); |
345 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 319 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), DoNot
ReportSecurityError)) { |
346 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 320 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
347 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorld
BindingsVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsol
ate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 321 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorld
BindingsVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsol
ate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
348 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 322 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
349 return; | 323 return; |
350 } | 324 } |
351 | 325 |
352 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(info.GetIsolate(), "doNotCheckSecurityPerWorldBindingsVoidMethod")); | 326 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(isolate, "doNotCheckSecurityPerWorldBindingsVoidMethod")); |
353 if (!hiddenValue.IsEmpty()) { | 327 if (!hiddenValue.IsEmpty()) { |
354 v8SetReturnValue(info, hiddenValue); | 328 v8SetReturnValue(info, hiddenValue); |
355 return; | 329 return; |
356 } | 330 } |
357 | 331 |
358 v8SetReturnValue(info, privateTemplate->GetFunction()); | 332 v8SetReturnValue(info, privateTemplate->GetFunction()); |
359 } | 333 } |
360 | 334 |
361 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 335 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
362 { | 336 { |
(...skipping 10 matching lines...) Expand all Loading... |
373 | 347 |
374 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethodCallbackForMainWor
ld(const v8::FunctionCallbackInfo<v8::Value>& info) | 348 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethodCallbackForMainWor
ld(const v8::FunctionCallbackInfo<v8::Value>& info) |
375 { | 349 { |
376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
377 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethodForMainWorld(info); | 351 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethodForMainWorld(info); |
378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
379 } | 353 } |
380 | 354 |
381 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 355 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
382 { | 356 { |
| 357 v8::Isolate* isolate = info.GetIsolate(); |
383 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 358 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
384 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 359 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
385 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindin
gsVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(info.G
etIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 360 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindin
gsVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(info.G
etIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
386 | 361 |
387 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 362 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), isolate); |
388 if (holder.IsEmpty()) { | 363 if (holder.IsEmpty()) { |
389 // This is only reachable via |object.__proto__.func|, in which case it | 364 // This is only reachable via |object.__proto__.func|, in which case it |
390 // has already passed the same origin security check | 365 // has already passed the same origin security check |
391 v8SetReturnValue(info, privateTemplate->GetFunction()); | 366 v8SetReturnValue(info, privateTemplate->GetFunction()); |
392 return; | 367 return; |
393 } | 368 } |
394 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); | 369 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); |
395 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 370 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), DoNot
ReportSecurityError)) { |
396 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 371 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
397 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorld
BindingsVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(
info.GetIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate()))
, 0); | 372 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorld
BindingsVoidMethodMethodCallbackForMainWorld, v8Undefined(), v8::Signature::New(
info.GetIsolate(), V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate()))
, 0); |
398 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 373 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
399 return; | 374 return; |
400 } | 375 } |
401 | 376 |
402 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(info.GetIsolate(), "doNotCheckSecurityPerWorldBindingsVoidMethod")); | 377 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(isolate, "doNotCheckSecurityPerWorldBindingsVoidMethod")); |
403 if (!hiddenValue.IsEmpty()) { | 378 if (!hiddenValue.IsEmpty()) { |
404 v8SetReturnValue(info, hiddenValue); | 379 v8SetReturnValue(info, hiddenValue); |
405 return; | 380 return; |
406 } | 381 } |
407 | 382 |
408 v8SetReturnValue(info, privateTemplate->GetFunction()); | 383 v8SetReturnValue(info, privateTemplate->GetFunction()); |
409 } | 384 } |
410 | 385 |
411 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 386 static void doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
412 { | 387 { |
(...skipping 10 matching lines...) Expand all Loading... |
423 | 398 |
424 static void doNotCheckSecurityReadOnlyVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 399 static void doNotCheckSecurityReadOnlyVoidMethodMethodCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
425 { | 400 { |
426 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
427 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadOnlyVoidMethodMe
thod(info); | 402 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadOnlyVoidMethodMe
thod(info); |
428 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
429 } | 404 } |
430 | 405 |
431 static void doNotCheckSecurityReadOnlyVoidMethodOriginSafeMethodGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) | 406 static void doNotCheckSecurityReadOnlyVoidMethodOriginSafeMethodGetter(const v8:
:PropertyCallbackInfo<v8::Value>& info) |
432 { | 407 { |
| 408 v8::Isolate* isolate = info.GetIsolate(); |
433 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 409 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
434 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 410 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
435 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadOnlyVoidMe
thodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestI
nterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 411 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadOnlyVoidMe
thodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8TestI
nterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
436 | 412 |
437 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 413 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), isolate); |
438 if (holder.IsEmpty()) { | 414 if (holder.IsEmpty()) { |
439 // This is only reachable via |object.__proto__.func|, in which case it | 415 // This is only reachable via |object.__proto__.func|, in which case it |
440 // has already passed the same origin security check | 416 // has already passed the same origin security check |
441 v8SetReturnValue(info, privateTemplate->GetFunction()); | 417 v8SetReturnValue(info, privateTemplate->GetFunction()); |
442 return; | 418 return; |
443 } | 419 } |
444 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); | 420 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); |
445 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 421 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), DoNot
ReportSecurityError)) { |
446 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 422 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
447 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadOnly
VoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V
8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 423 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadOnly
VoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V
8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
448 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 424 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
449 return; | 425 return; |
450 } | 426 } |
451 | 427 |
452 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(info.GetIsolate(), "doNotCheckSecurityReadOnlyVoidMethod")); | 428 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(isolate, "doNotCheckSecurityReadOnlyVoidMethod")); |
453 if (!hiddenValue.IsEmpty()) { | 429 if (!hiddenValue.IsEmpty()) { |
454 v8SetReturnValue(info, hiddenValue); | 430 v8SetReturnValue(info, hiddenValue); |
455 return; | 431 return; |
456 } | 432 } |
457 | 433 |
458 v8SetReturnValue(info, privateTemplate->GetFunction()); | 434 v8SetReturnValue(info, privateTemplate->GetFunction()); |
459 } | 435 } |
460 | 436 |
461 static void doNotCheckSecurityReadOnlyVoidMethodOriginSafeMethodGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 437 static void doNotCheckSecurityReadOnlyVoidMethodOriginSafeMethodGetterCallback(v
8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
462 { | 438 { |
(...skipping 10 matching lines...) Expand all Loading... |
473 | 449 |
474 static void doNotCheckSecurityUnforgeableVoidMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 450 static void doNotCheckSecurityUnforgeableVoidMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
475 { | 451 { |
476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 452 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
477 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dMethod(info); | 453 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dMethod(info); |
478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 454 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
479 } | 455 } |
480 | 456 |
481 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) | 457 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetter(const
v8::PropertyCallbackInfo<v8::Value>& info) |
482 { | 458 { |
| 459 v8::Isolate* isolate = info.GetIsolate(); |
483 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 460 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
484 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); | 461 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
485 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoi
dMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8Te
stInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 462 v8::Handle<v8::FunctionTemplate> privateTemplate = data->domTemplate(&domTem
plateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoi
dMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate(), V8Te
stInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
486 | 463 |
487 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 464 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), isolate); |
488 if (holder.IsEmpty()) { | 465 if (holder.IsEmpty()) { |
489 // This is only reachable via |object.__proto__.func|, in which case it | 466 // This is only reachable via |object.__proto__.func|, in which case it |
490 // has already passed the same origin security check | 467 // has already passed the same origin security check |
491 v8SetReturnValue(info, privateTemplate->GetFunction()); | 468 v8SetReturnValue(info, privateTemplate->GetFunction()); |
492 return; | 469 return; |
493 } | 470 } |
494 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); | 471 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); |
495 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), DoNotReportSecurityError)) { | 472 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), DoNot
ReportSecurityError)) { |
496 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. | 473 static int sharedTemplateKey; // This address is used for a key to look
up the dom template. |
497 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgea
bleVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate()
, V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); | 474 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->domTemplate(&sha
redTemplateKey, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgea
bleVoidMethodMethodCallback, v8Undefined(), v8::Signature::New(info.GetIsolate()
, V8TestInterfaceCheckSecurity::domTemplate(info.GetIsolate())), 0); |
498 v8SetReturnValue(info, sharedTemplate->GetFunction()); | 475 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
499 return; | 476 return; |
500 } | 477 } |
501 | 478 |
502 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(info.GetIsolate(), "doNotCheckSecurityUnforgeableVoidMethod")); | 479 v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicStrin
g(isolate, "doNotCheckSecurityUnforgeableVoidMethod")); |
503 if (!hiddenValue.IsEmpty()) { | 480 if (!hiddenValue.IsEmpty()) { |
504 v8SetReturnValue(info, hiddenValue); | 481 v8SetReturnValue(info, hiddenValue); |
505 return; | 482 return; |
506 } | 483 } |
507 | 484 |
508 v8SetReturnValue(info, privateTemplate->GetFunction()); | 485 v8SetReturnValue(info, privateTemplate->GetFunction()); |
509 } | 486 } |
510 | 487 |
511 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 488 static void doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallbac
k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
512 { | 489 { |
513 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 490 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
514 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dOriginSafeMethodGetter(info); | 491 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMetho
dOriginSafeMethodGetter(info); |
515 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 492 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
516 } | 493 } |
517 | 494 |
518 static void TestInterfaceCheckSecurityOriginSafeMethodSetter(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) | 495 static void TestInterfaceCheckSecurityOriginSafeMethodSetter(v8::Local<v8::Strin
g> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& inf
o) |
519 { | 496 { |
520 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), info.GetIsolate()); | 497 v8::Isolate* isolate = info.GetIsolate(); |
| 498 v8::Handle<v8::Object> holder = V8TestInterfaceCheckSecurity::findInstanceIn
PrototypeChain(info.This(), isolate); |
521 if (holder.IsEmpty()) | 499 if (holder.IsEmpty()) |
522 return; | 500 return; |
523 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); | 501 TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(ho
lder); |
524 v8::String::Utf8Value attributeName(name); | 502 v8::String::Utf8Value attributeName(name); |
525 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); | 503 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), isolate); |
526 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), impl->fram
e(), exceptionState)) { | 504 if (!BindingSecurity::shouldAllowAccessToFrame(isolate, impl->frame(), excep
tionState)) { |
527 exceptionState.throwIfNeeded(); | 505 exceptionState.throwIfNeeded(); |
528 return; | 506 return; |
529 } | 507 } |
530 | 508 |
531 V8HiddenValue::setHiddenValue(info.GetIsolate(), info.This(), name, jsValue)
; | 509 V8HiddenValue::setHiddenValue(isolate, info.This(), name, jsValue); |
532 } | 510 } |
533 | 511 |
534 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<vo
id>& info) | 512 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<vo
id>& info) |
535 { | 513 { |
536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 514 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
537 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, jsValue, info); | 515 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, jsValue, info); |
538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 516 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
539 } | 517 } |
540 | 518 |
541 } // namespace TestInterfaceCheckSecurityV8Internal | 519 } // namespace TestInterfaceCheckSecurityV8Internal |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 fromInternalPointer(object)->deref(); | 611 fromInternalPointer(object)->deref(); |
634 } | 612 } |
635 | 613 |
636 template<> | 614 template<> |
637 v8::Handle<v8::Value> toV8NoInline(TestInterfaceCheckSecurity* impl, v8::Handle<
v8::Object> creationContext, v8::Isolate* isolate) | 615 v8::Handle<v8::Value> toV8NoInline(TestInterfaceCheckSecurity* impl, v8::Handle<
v8::Object> creationContext, v8::Isolate* isolate) |
638 { | 616 { |
639 return toV8(impl, creationContext, isolate); | 617 return toV8(impl, creationContext, isolate); |
640 } | 618 } |
641 | 619 |
642 } // namespace WebCore | 620 } // namespace WebCore |
OLD | NEW |