Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1067)

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp

Issue 2571063002: Remove Blink-in-JS (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // clang-format off 8 // clang-format off
9 #include "V8TestInterfaceCheckSecurity.h" 9 #include "V8TestInterfaceCheckSecurity.h"
10 10
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 } // namespace TestInterfaceCheckSecurityV8Internal 444 } // namespace TestInterfaceCheckSecurityV8Internal
445 445
446 // Suppress warning: global constructors, because AttributeConfiguration is triv ial 446 // Suppress warning: global constructors, because AttributeConfiguration is triv ial
447 // and does not depend on another global objects. 447 // and does not depend on another global objects.
448 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 448 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
449 #pragma clang diagnostic push 449 #pragma clang diagnostic push
450 #pragma clang diagnostic ignored "-Wglobal-constructors" 450 #pragma clang diagnostic ignored "-Wglobal-constructors"
451 #endif 451 #endif
452 const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecurityAtt ributes[] = { 452 const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecurityAtt ributes[] = {
453 {"doNotCheckSecurityLongAttribute", TestInterfaceCheckSecurityV8Internal::do NotCheckSecurityLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurity V8Internal::doNotCheckSecurityLongAttributeAttributeSetterCallback, 0, 0, nullpt r, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance, V8DOMConfiguration::CheckHolder}, 453 {"doNotCheckSecurityLongAttribute", TestInterfaceCheckSecurityV8Internal::do NotCheckSecurityLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurity V8Internal::doNotCheckSecurityLongAttributeAttributeSetterCallback, 0, 0, nullpt r, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder },
454 {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Inte rnal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, n ullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property Attribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur ation::OnInstance, V8DOMConfiguration::CheckHolder}, 454 {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Inte rnal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, n ullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property Attribute>(v8::ReadOnly), V8DOMConfiguration::OnInstance, V8DOMConfiguration::Ch eckHolder},
455 {"doNotCheckSecurityOnSetterLongAttribute", TestInterfaceCheckSecurityV8Inte rnal::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestInterf aceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeSett erCallback, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, 455 {"doNotCheckSecurityOnSetterLongAttribute", TestInterfaceCheckSecurityV8Inte rnal::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestInterf aceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeSett erCallback, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMCo nfiguration::CheckHolder},
456 {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSec urityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGett erCallback, 0, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, 456 {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSec urityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGett erCallback, 0, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DO MConfiguration::CheckHolder},
457 }; 457 };
458 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 458 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
459 #pragma clang diagnostic pop 459 #pragma clang diagnostic pop
460 #endif 460 #endif
461 461
462 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceCheckSecurityAcce ssors[] = { 462 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceCheckSecurityAcce ssors[] = {
463 {"readonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::readonlyLong AttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast< v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V 8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, 463 {"readonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::readonlyLong AttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast< v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInstance, V8DOMConfi guration::CheckHolder},
464 {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttribu teGetterCallback, TestInterfaceCheckSecurityV8Internal::longAttributeAttributeSe tterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>( v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstan ce, V8DOMConfiguration::CheckHolder}, 464 {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttribu teGetterCallback, TestInterfaceCheckSecurityV8Internal::longAttributeAttributeSe tterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>( v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder},
465 }; 465 };
466 466
467 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurityMethod s[] = { 467 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurityMethod s[] = {
468 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac k, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:: OnInstance, V8DOMConfiguration::CheckHolder}, 468 {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallbac k, 0, 0, v8::None, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHold er},
469 }; 469 };
470 470
471 static void installV8TestInterfaceCheckSecurityTemplate(v8::Isolate* isolate, co nst DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { 471 static void installV8TestInterfaceCheckSecurityTemplate(v8::Isolate* isolate, co nst DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
472 // Initialize the interface object's template. 472 // Initialize the interface object's template.
473 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceCheckSecurity::wrapperTypeInfo.interfaceName, v8::Local<v8::Func tionTemplate>(), V8TestInterfaceCheckSecurity::internalFieldCount); 473 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceCheckSecurity::wrapperTypeInfo.interfaceName, v8::Local<v8::Func tionTemplate>(), V8TestInterfaceCheckSecurity::internalFieldCount);
474 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 474 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
475 ALLOW_UNUSED_LOCAL(signature); 475 ALLOW_UNUSED_LOCAL(signature);
476 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate(); 476 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
477 ALLOW_UNUSED_LOCAL(instanceTemplate); 477 ALLOW_UNUSED_LOCAL(instanceTemplate);
478 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template(); 478 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
479 ALLOW_UNUSED_LOCAL(prototypeTemplate); 479 ALLOW_UNUSED_LOCAL(prototypeTemplate);
480 480
481 // Global object prototype chain consists of Immutable Prototype Exotic Object s 481 // Global object prototype chain consists of Immutable Prototype Exotic Object s
482 prototypeTemplate->SetImmutableProto(); 482 prototypeTemplate->SetImmutableProto();
483 483
484 // Global objects are Immutable Prototype Exotic Objects 484 // Global objects are Immutable Prototype Exotic Objects
485 instanceTemplate->SetImmutableProto(); 485 instanceTemplate->SetImmutableProto();
486 486
487 // Register DOM constants, attributes and operations. 487 // Register DOM constants, attributes and operations.
488 V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, protot ypeTemplate, V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInte rfaceCheckSecurityAttributes)); 488 V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, protot ypeTemplate, V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInte rfaceCheckSecurityAttributes));
489 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceCheckSecurityAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityAccessors)); 489 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceCheckSecurityAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityAccessors));
490 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceCheckSecurityMethods, WTF _ARRAY_LENGTH(V8TestInterfaceCheckSecurityMethods)); 490 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceCheckSecurityMethods, WTF _ARRAY_LENGTH(V8TestInterfaceCheckSecurityMethods));
491 491
492 // Cross-origin access check 492 // Cross-origin access check
493 instanceTemplate->SetAccessCheckCallbackAndHandler(TestInterfaceCheckSecurityV 8Internal::securityCheck, v8::NamedPropertyHandlerConfiguration(TestInterfaceChe ckSecurityV8Internal::crossOriginNamedGetter, TestInterfaceCheckSecurityV8Intern al::crossOriginNamedSetter, nullptr, nullptr, TestInterfaceCheckSecurityV8Intern al::crossOriginNamedEnumerator), v8::IndexedPropertyHandlerConfiguration(nullptr ), v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceCheck Security::wrapperTypeInfo))); 493 instanceTemplate->SetAccessCheckCallbackAndHandler(TestInterfaceCheckSecurityV 8Internal::securityCheck, v8::NamedPropertyHandlerConfiguration(TestInterfaceChe ckSecurityV8Internal::crossOriginNamedGetter, TestInterfaceCheckSecurityV8Intern al::crossOriginNamedSetter, nullptr, nullptr, TestInterfaceCheckSecurityV8Intern al::crossOriginNamedEnumerator), v8::IndexedPropertyHandlerConfiguration(nullptr ), v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceCheck Security::wrapperTypeInfo)));
494 494
495 const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVoidMethodO riginSafeAttributeConfiguration = { 495 const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVoidMethodO riginSafeAttributeConfiguration = {
496 "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::doNo tCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecuri tyV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0, nu llptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast< v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOM Configuration::OnInstance, V8DOMConfiguration::CheckHolder, 496 "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::doNo tCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecuri tyV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0, nu llptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast< v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfigura tion::CheckHolder
497 }; 497 };
498 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototy peTemplate, doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration); 498 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototy peTemplate, doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration);
499 const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityPerWorldBin dingsVoidMethodOriginSafeAttributeConfiguration = { 499 const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityPerWorldBin dingsVoidMethodOriginSafeAttributeConfiguration = {
500 "doNotCheckSecurityPerWorldBindingsVoidMethod", TestInterfaceCheckSecurity V8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa llback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSa feMethodSetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurity PerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, TestInterf aceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCall backForMainWorld, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::D EFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expose dToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder, 500 "doNotCheckSecurityPerWorldBindingsVoidMethod", TestInterfaceCheckSecurity V8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCa llback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSa feMethodSetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurity PerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, TestInterf aceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCall backForMainWorld, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::D EFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInst ance, V8DOMConfiguration::CheckHolder
501 }; 501 };
502 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototy peTemplate, doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeAttributeConfi guration); 502 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototy peTemplate, doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeAttributeConfi guration);
503 const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityUnforgeable VoidMethodOriginSafeAttributeConfiguration = { 503 const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityUnforgeable VoidMethodOriginSafeAttributeConfiguration = {
504 "doNotCheckSecurityUnforgeableVoidMethod", TestInterfaceCheckSecurityV8Int ernal::doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallback, 0, 0, 0, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, sta tic_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), V8DOMConfigurati on::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::Che ckHolder, 504 "doNotCheckSecurityUnforgeableVoidMethod", TestInterfaceCheckSecurityV8Int ernal::doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallback, 0, 0, 0, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, sta tic_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), V8DOMConfigurati on::OnInstance, V8DOMConfiguration::CheckHolder
505 }; 505 };
506 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototy peTemplate, doNotCheckSecurityUnforgeableVoidMethodOriginSafeAttributeConfigurat ion); 506 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototy peTemplate, doNotCheckSecurityUnforgeableVoidMethodOriginSafeAttributeConfigurat ion);
507 } 507 }
508 508
509 v8::Local<v8::FunctionTemplate> V8TestInterfaceCheckSecurity::domTemplate(v8::Is olate* isolate, const DOMWrapperWorld& world) { 509 v8::Local<v8::FunctionTemplate> V8TestInterfaceCheckSecurity::domTemplate(v8::Is olate* isolate, const DOMWrapperWorld& world) {
510 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceCheckSecurityTemplate); 510 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceCheckSecurityTemplate);
511 } 511 }
512 512
513 bool V8TestInterfaceCheckSecurity::hasInstance(v8::Local<v8::Value> v8Value, v8: :Isolate* isolate) { 513 bool V8TestInterfaceCheckSecurity::hasInstance(v8::Local<v8::Value> v8Value, v8: :Isolate* isolate) {
514 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value) ; 514 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value) ;
515 } 515 }
516 516
517 v8::Local<v8::Object> V8TestInterfaceCheckSecurity::findInstanceInPrototypeChain (v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { 517 v8::Local<v8::Object> V8TestInterfaceCheckSecurity::findInstanceInPrototypeChain (v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
518 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value); 518 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value);
519 } 519 }
520 520
521 TestInterfaceCheckSecurity* V8TestInterfaceCheckSecurity::toImplWithTypeCheck(v8 ::Isolate* isolate, v8::Local<v8::Value> value) { 521 TestInterfaceCheckSecurity* V8TestInterfaceCheckSecurity::toImplWithTypeCheck(v8 ::Isolate* isolate, v8::Local<v8::Value> value) {
522 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr; 522 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr;
523 } 523 }
524 524
525 } // namespace blink 525 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698