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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
446 V8HiddenValue::setHiddenValue(info.GetIsolate(), v8::Handle<v8::Object>::Cas
t(info.This()), name, v8Value); | 446 V8HiddenValue::setHiddenValue(info.GetIsolate(), v8::Local<v8::Object>::Cast
(info.This()), name, v8Value); |
447 } | 447 } |
448 | 448 |
449 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 449 static void TestInterfaceCheckSecurityOriginSafeMethodSetterCallback(v8::Local<v
8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
450 { | 450 { |
451 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 451 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
452 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, v8Value, info); | 452 TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMe
thodSetter(name, v8Value, info); |
453 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 453 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
454 } | 454 } |
455 | 455 |
456 } // namespace TestInterfaceCheckSecurityV8Internal | 456 } // namespace TestInterfaceCheckSecurityV8Internal |
(...skipping 20 matching lines...) Expand all Loading... |
477 0, 0, | 477 0, 0, |
478 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods)); | 478 V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceChe
ckSecurityMethods)); |
479 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 479 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
480 ALLOW_UNUSED_LOCAL(instanceTemplate); | 480 ALLOW_UNUSED_LOCAL(instanceTemplate); |
481 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 481 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
482 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 482 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
483 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); | 483 instanceTemplate->SetAccessCheckCallbacks(TestInterfaceCheckSecurityV8Intern
al::namedSecurityCheck, TestInterfaceCheckSecurityV8Internal::indexedSecurityChe
ck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceChec
kSecurity::wrapperTypeInfo))); |
484 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVo
idMethodOriginSafeAttributeConfiguration = { | 484 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVo
idMethodOriginSafeAttributeConfiguration = { |
485 "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::do
NotCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecu
rityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0,
&V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_READ, static_cast<v8
::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance, | 485 "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::do
NotCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecu
rityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0,
&V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_READ, static_cast<v8
::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance, |
486 }; | 486 }; |
487 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Handle<v8::Objec
tTemplate>(), doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration, isol
ate); | 487 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Local<v8::Object
Template>(), doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration, isola
te); |
488 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityDo
NotCheckSignatureVoidMethodOriginSafeAttributeConfiguration = { | 488 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityDo
NotCheckSignatureVoidMethodOriginSafeAttributeConfiguration = { |
489 "doNotCheckSecurityDoNotCheckSignatureVoidMethod", TestInterfaceCheckSec
urityV8Internal::doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethod
GetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurity
OriginSafeMethodSetterCallback, 0, 0, &V8TestInterfaceCheckSecurity::wrapperType
Info, v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DO
MConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, | 489 "doNotCheckSecurityDoNotCheckSignatureVoidMethod", TestInterfaceCheckSec
urityV8Internal::doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeMethod
GetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurity
OriginSafeMethodSetterCallback, 0, 0, &V8TestInterfaceCheckSecurity::wrapperType
Info, v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DO
MConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, |
490 }; | 490 }; |
491 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Handle<v8::Objec
tTemplate>(), doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeAttribute
Configuration, isolate); | 491 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Local<v8::Object
Template>(), doNotCheckSecurityDoNotCheckSignatureVoidMethodOriginSafeAttributeC
onfiguration, isolate); |
492 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityPe
rWorldBindingsVoidMethodOriginSafeAttributeConfiguration = { | 492 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityPe
rWorldBindingsVoidMethodOriginSafeAttributeConfiguration = { |
493 "doNotCheckSecurityPerWorldBindingsVoidMethod", TestInterfaceCheckSecuri
tyV8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetter
Callback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOrigin
SafeMethodSetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecuri
tyPerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, TestInte
rfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCa
llbackForMainWorld, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_
READ, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::Ex
posedToAllScripts, V8DOMConfiguration::OnInstance, | 493 "doNotCheckSecurityPerWorldBindingsVoidMethod", TestInterfaceCheckSecuri
tyV8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetter
Callback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOrigin
SafeMethodSetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecuri
tyPerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, TestInte
rfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCa
llbackForMainWorld, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_
READ, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::Ex
posedToAllScripts, V8DOMConfiguration::OnInstance, |
494 }; | 494 }; |
495 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Handle<v8::Objec
tTemplate>(), doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeAttributeCon
figuration, isolate); | 495 V8DOMConfiguration::installAttribute(prototypeTemplate, v8::Local<v8::Object
Template>(), doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeAttributeConf
iguration, isolate); |
496 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityUn
forgeableVoidMethodOriginSafeAttributeConfiguration = { | 496 static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityUn
forgeableVoidMethodOriginSafeAttributeConfiguration = { |
497 "doNotCheckSecurityUnforgeableVoidMethod", TestInterfaceCheckSecurityV8I
nternal::doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallback,
0, 0, 0, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_READ, stati
c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), V8DOMConfiguration
::ExposedToAllScripts, V8DOMConfiguration::OnInstance, | 497 "doNotCheckSecurityUnforgeableVoidMethod", TestInterfaceCheckSecurityV8I
nternal::doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallback,
0, 0, 0, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::ALL_CAN_READ, stati
c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), V8DOMConfiguration
::ExposedToAllScripts, V8DOMConfiguration::OnInstance, |
498 }; | 498 }; |
499 V8DOMConfiguration::installAttribute(instanceTemplate, v8::Handle<v8::Object
Template>(), doNotCheckSecurityUnforgeableVoidMethodOriginSafeAttributeConfigura
tion, isolate); | 499 V8DOMConfiguration::installAttribute(instanceTemplate, v8::Local<v8::ObjectT
emplate>(), doNotCheckSecurityUnforgeableVoidMethodOriginSafeAttributeConfigurat
ion, isolate); |
500 | 500 |
501 // Custom toString template | 501 // Custom toString template |
502 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 502 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
503 } | 503 } |
504 | 504 |
505 v8::Local<v8::FunctionTemplate> V8TestInterfaceCheckSecurity::domTemplate(v8::Is
olate* isolate) | 505 v8::Local<v8::FunctionTemplate> V8TestInterfaceCheckSecurity::domTemplate(v8::Is
olate* isolate) |
506 { | 506 { |
507 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceCheckSecurityTemplate); | 507 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceCheckSecurityTemplate); |
508 } | 508 } |
509 | 509 |
510 bool V8TestInterfaceCheckSecurity::hasInstance(v8::Handle<v8::Value> v8Value, v8
::Isolate* isolate) | 510 bool V8TestInterfaceCheckSecurity::hasInstance(v8::Local<v8::Value> v8Value, v8:
:Isolate* isolate) |
511 { | 511 { |
512 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 512 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
513 } | 513 } |
514 | 514 |
515 v8::Handle<v8::Object> V8TestInterfaceCheckSecurity::findInstanceInPrototypeChai
n(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 515 v8::Local<v8::Object> V8TestInterfaceCheckSecurity::findInstanceInPrototypeChain
(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) |
516 { | 516 { |
517 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 517 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
518 } | 518 } |
519 | 519 |
520 TestInterfaceCheckSecurity* V8TestInterfaceCheckSecurity::toImplWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) | 520 TestInterfaceCheckSecurity* V8TestInterfaceCheckSecurity::toImplWithTypeCheck(v8
::Isolate* isolate, v8::Local<v8::Value> value) |
521 { | 521 { |
522 return hasInstance(value, isolate) ? toImpl(v8::Handle<v8::Object>::Cast(val
ue)) : 0; | 522 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
523 } | 523 } |
524 | 524 |
525 void V8TestInterfaceCheckSecurity::refObject(ScriptWrappable* scriptWrappable) | 525 void V8TestInterfaceCheckSecurity::refObject(ScriptWrappable* scriptWrappable) |
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 |