OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 imp->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); | 147 imp->setDoNotCheckSecurityOnSetterLongAttribute(cppValue); |
148 } | 148 } |
149 | 149 |
150 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) | 150 static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
ocal<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v
oid>& info) |
151 { | 151 { |
152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
153 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(jsValue, info); | 153 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttribut
eAttributeSetter(jsValue, info); |
154 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 154 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
155 } | 155 } |
156 | 156 |
| 157 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(co
nst v8::PropertyCallbackInfo<v8::Value>& info) |
| 158 { |
| 159 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
o.Holder()); |
| 160 v8SetReturnValueInt(info, imp->doNotCheckSecurityReplaceableReadonlyLongAttr
ibute()); |
| 161 } |
| 162 |
| 163 static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCal
lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 164 { |
| 165 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 166 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyL
ongAttributeAttributeGetter(info); |
| 167 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 168 } |
| 169 |
| 170 static void TestInterfaceCheckSecurityReplaceableAttributeSetter(v8::Local<v8::S
tring> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>&
info) |
| 171 { |
| 172 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
o.Holder()); |
| 173 v8::String::Utf8Value attributeName(name); |
| 174 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate()); |
| 175 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), imp->frame
(), exceptionState)) { |
| 176 exceptionState.throwIfNeeded(); |
| 177 return; |
| 178 } |
| 179 info.This()->ForceSet(name, jsValue); |
| 180 } |
| 181 |
| 182 static void TestInterfaceCheckSecurityReplaceableAttributeSetterCallback(v8::Loc
al<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInf
o<void>& info) |
| 183 { |
| 184 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityReplaceableA
ttributeSetter(name, jsValue, info); |
| 185 } |
| 186 |
157 bool indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::Access
Type type, v8::Local<v8::Value>) | 187 bool indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::Access
Type type, v8::Local<v8::Value>) |
158 { | 188 { |
159 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(ho
st); | 189 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(ho
st); |
160 return BindingSecurity::shouldAllowAccessToFrame(v8::Isolate::GetCurrent(),
imp->frame(), DoNotReportSecurityError); | 190 return BindingSecurity::shouldAllowAccessToFrame(v8::Isolate::GetCurrent(),
imp->frame(), DoNotReportSecurityError); |
161 } | 191 } |
162 | 192 |
163 bool namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8
::AccessType type, v8::Local<v8::Value>) | 193 bool namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8
::AccessType type, v8::Local<v8::Value>) |
164 { | 194 { |
165 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(ho
st); | 195 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(ho
st); |
166 return BindingSecurity::shouldAllowAccessToFrame(v8::Isolate::GetCurrent(),
imp->frame(), DoNotReportSecurityError); | 196 return BindingSecurity::shouldAllowAccessToFrame(v8::Isolate::GetCurrent(),
imp->frame(), DoNotReportSecurityError); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 v8SetReturnValue(info, privateTemplate->GetFunction()); | 259 v8SetReturnValue(info, privateTemplate->GetFunction()); |
230 } | 260 } |
231 | 261 |
232 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 262 static void doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
233 { | 263 { |
234 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 264 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
235 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodOriginSafe
MethodGetter(info); | 265 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodOriginSafe
MethodGetter(info); |
236 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 266 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
237 } | 267 } |
238 | 268 |
| 269 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodMethod(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 270 { |
| 271 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
o.Holder()); |
| 272 imp->doNotCheckSecurityDoNotCheckSignatureVoidMethod(); |
| 273 } |
| 274 |
| 275 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 276 { |
| 277 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 278 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSignatureV
oidMethodMethod(info); |
| 279 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 280 } |
| 281 |
| 282 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
r(const v8::PropertyCallbackInfo<v8::Value>& info) |
| 283 { |
| 284 // This is only for getting a unique pointer which we can pass to privateTem
plate. |
| 285 static int privateTemplateUniqueKey; |
| 286 WrapperWorldType currentWorldType = worldType(info.GetIsolate()); |
| 287 V8PerIsolateData* data = V8PerIsolateData::from(info.GetIsolate()); |
| 288 v8::Handle<v8::FunctionTemplate> privateTemplate = data->privateTemplate(cur
rentWorldType, &privateTemplateUniqueKey, TestInterfaceCheckSecurityV8Internal::
doNotCheckSecurityDoNotCheckSignatureVoidMethodMethodCallback, v8Undefined(), v8
::Local<v8::Signature>(), 0); |
| 289 |
| 290 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8
TestInterfaceCheckSecurity::domTemplate(info.GetIsolate(), currentWorldType)); |
| 291 if (holder.IsEmpty()) { |
| 292 // This is only reachable via |object.__proto__.func|, in which case it |
| 293 // has already passed the same origin security check |
| 294 v8SetReturnValue(info, privateTemplate->GetFunction()); |
| 295 return; |
| 296 } |
| 297 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(hol
der); |
| 298 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), imp->frame
(), DoNotReportSecurityError)) { |
| 299 static int sharedTemplateUniqueKey; |
| 300 v8::Handle<v8::FunctionTemplate> sharedTemplate = data->privateTemplate(
currentWorldType, &sharedTemplateUniqueKey, TestInterfaceCheckSecurityV8Internal
::doNotCheckSecurityDoNotCheckSignatureVoidMethodMethodCallback, v8Undefined(),
v8::Local<v8::Signature>(), 0); |
| 301 v8SetReturnValue(info, sharedTemplate->GetFunction()); |
| 302 return; |
| 303 } |
| 304 |
| 305 v8::Local<v8::Value> hiddenValue = getHiddenValue(info.GetIsolate(), info.Th
is(), "doNotCheckSecurityDoNotCheckSignatureVoidMethod"); |
| 306 if (!hiddenValue.IsEmpty()) { |
| 307 v8SetReturnValue(info, hiddenValue); |
| 308 return; |
| 309 } |
| 310 |
| 311 v8SetReturnValue(info, privateTemplate->GetFunction()); |
| 312 } |
| 313 |
| 314 static void doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGette
rCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
) |
| 315 { |
| 316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 317 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityDoNotCheckSignatureV
oidMethodOriginSafeMethodGetter(info); |
| 318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 319 } |
| 320 |
239 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) | 321 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethod(const v8::Functio
nCallbackInfo<v8::Value>& info) |
240 { | 322 { |
241 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
o.Holder()); | 323 TestInterfaceCheckSecurity* imp = V8TestInterfaceCheckSecurity::toNative(inf
o.Holder()); |
242 imp->doNotCheckSecurityPerWorldBindingsVoidMethod(); | 324 imp->doNotCheckSecurityPerWorldBindingsVoidMethod(); |
243 } | 325 } |
244 | 326 |
245 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 327 static void doNotCheckSecurityPerWorldBindingsVoidMethodMethodCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
246 { | 328 { |
247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 329 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
248 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethod(info); | 330 TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoid
MethodMethod(info); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 549 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
468 } | 550 } |
469 | 551 |
470 } // namespace TestInterfaceCheckSecurityV8Internal | 552 } // namespace TestInterfaceCheckSecurityV8Internal |
471 | 553 |
472 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecu
rityAttributes[] = { | 554 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecu
rityAttributes[] = { |
473 {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 555 {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttribu
teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati
c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
474 {"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), 0 /* on instance */}, | 556 {"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), 0 /* on instance */}, |
475 {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Inte
rnal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0
, static_cast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttr
ibute>(v8::None), 0 /* on instance */}, | 557 {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Inte
rnal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0
, static_cast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttr
ibute>(v8::None), 0 /* on instance */}, |
476 {"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), 0 /* on instance */}, | 558 {"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), 0 /* on instance */}, |
| 559 {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSec
urityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGett
erCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityRepl
aceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::ALL_
CAN_READ | v8::ALL_CAN_WRITE), static_cast<v8::PropertyAttribute>(v8::None), 0 /
* on instance */}, |
477 }; | 560 }; |
478 | 561 |
479 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurit
yMethods[] = { | 562 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurit
yMethods[] = { |
480 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac
k, 0, 0}, | 563 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac
k, 0, 0}, |
481 }; | 564 }; |
482 | 565 |
483 static void configureV8TestInterfaceCheckSecurityTemplate(v8::Handle<v8::Functio
nTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorld
Type) | 566 static void configureV8TestInterfaceCheckSecurityTemplate(v8::Handle<v8::Functio
nTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorld
Type) |
484 { | 567 { |
485 functionTemplate->ReadOnlyPrototype(); | 568 functionTemplate->ReadOnlyPrototype(); |
486 | 569 |
487 v8::Local<v8::Signature> defaultSignature; | 570 v8::Local<v8::Signature> defaultSignature; |
488 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestInterfaceCheckSecurity", v8::Local<v8::FunctionTemplate>(), V8TestInte
rfaceCheckSecurity::internalFieldCount, | 571 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestInterfaceCheckSecurity", v8::Local<v8::FunctionTemplate>(), V8TestInte
rfaceCheckSecurity::internalFieldCount, |
489 V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInterface
CheckSecurityAttributes), | 572 V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInterface
CheckSecurityAttributes), |
490 0, 0, | 573 0, 0, |
491 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods), | 574 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods), |
492 isolate, currentWorldType); | 575 isolate, currentWorldType); |
493 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); | 576 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); |
494 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); | 577 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); |
495 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); | 578 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); |
496 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecurityVo
idMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodOr
iginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfac
eCheckSecurityOriginSafeMethodSetterCallback, v8Undefined(), v8::ALL_CAN_READ, s
tatic_cast<v8::PropertyAttribute>(v8::DontDelete)); | 579 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecurityVo
idMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodOr
iginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfac
eCheckSecurityOriginSafeMethodSetterCallback, v8Undefined(), v8::ALL_CAN_READ, s
tatic_cast<v8::PropertyAttribute>(v8::DontDelete)); |
| 580 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecurityDo
NotCheckSignatureVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheckS
ecurityDoNotCheckSignatureVoidMethodOriginSafeMethodGetterCallback, TestInterfac
eCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallba
ck, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::Dont
Delete)); |
497 if (currentWorldType == MainWorld) { | 581 if (currentWorldType == MainWorld) { |
498 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecuri
tyPerWorldBindingsVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheck
SecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, Te
stInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSe
tterCallback, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute
>(v8::DontDelete)); | 582 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecuri
tyPerWorldBindingsVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheck
SecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, Te
stInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSe
tterCallback, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute
>(v8::DontDelete)); |
499 } else { | 583 } else { |
500 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecuri
tyPerWorldBindingsVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheck
SecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallback, TestInterfaceC
heckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback
, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDe
lete)); | 584 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecuri
tyPerWorldBindingsVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheck
SecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallback, TestInterfaceC
heckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback
, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDe
lete)); |
501 } | 585 } |
502 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecurityRe
adOnlyVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityRead
OnlyVoidMethodOriginSafeMethodGetterCallback, 0, v8Undefined(), v8::ALL_CAN_READ
, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)); | 586 prototypeTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecurityRe
adOnlyVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityRead
OnlyVoidMethodOriginSafeMethodGetterCallback, 0, v8Undefined(), v8::ALL_CAN_READ
, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)); |
503 instanceTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecurityUnf
orgeableVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUn
forgeableVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8I
nternal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, v8Undefined()
, v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete)); | 587 instanceTemplate->SetAccessor(v8AtomicString(isolate, "doNotCheckSecurityUnf
orgeableVoidMethod"), TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUn
forgeableVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8I
nternal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, v8Undefined()
, v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete)); |
504 | 588 |
505 // Custom toString template | 589 // Custom toString template |
506 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); | 590 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 fromInternalPointer(object)->deref(); | 636 fromInternalPointer(object)->deref(); |
553 } | 637 } |
554 | 638 |
555 template<> | 639 template<> |
556 v8::Handle<v8::Value> toV8NoInline(TestInterfaceCheckSecurity* impl, v8::Handle<
v8::Object> creationContext, v8::Isolate* isolate) | 640 v8::Handle<v8::Value> toV8NoInline(TestInterfaceCheckSecurity* impl, v8::Handle<
v8::Object> creationContext, v8::Isolate* isolate) |
557 { | 641 { |
558 return toV8(impl, creationContext, isolate); | 642 return toV8(impl, creationContext, isolate); |
559 } | 643 } |
560 | 644 |
561 } // namespace WebCore | 645 } // namespace WebCore |
OLD | NEW |