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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 2873543002: First implementation of lazily cached accessor for DOM attributes. (Closed)
Patch Set: whitespace and renaming fixes Created 3 years, 7 months 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 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
10 10
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info); 778 TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info);
779 } 779 }
780 780
781 // Suppress warning: global constructors, because AttributeConfiguration is triv ial 781 // Suppress warning: global constructors, because AttributeConfiguration is triv ial
782 // and does not depend on another global objects. 782 // and does not depend on another global objects.
783 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 783 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
784 #pragma clang diagnostic push 784 #pragma clang diagnostic push
785 #pragma clang diagnostic ignored "-Wglobal-constructors" 785 #pragma clang diagnostic ignored "-Wglobal-constructors"
786 #endif 786 #endif
787 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5LazyData Attributes[] = { 787 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5LazyData Attributes[] = {
788 {"testInterfaceConstructorAttribute", V8ConstructorAttributeGetter, nullptr, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), stat ic_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V 8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds}, 788 {"testInterfaceConstructorAttribute", V8ConstructorAttributeGetter, nullpt r, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), static_cast <v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnInstance, V8DOMCon figuration::kCheckHolder, V8DOMConfiguration::kAllWorlds}
789 ,
789 }; 790 };
790 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 791 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
791 #pragma clang diagnostic pop 792 #pragma clang diagnostic pop
792 #endif 793 #endif
793 794
794 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = { 795 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = {
795 {"testInterfaceAttribute", V8TestInterface5::testInterfaceAttributeAttribute GetterCallback, V8TestInterface5::testInterfaceAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWor lds}, 796 {"testInterfaceAttribute", V8TestInterface5::testInterfaceAttributeAttribu teGetterCallback, V8TestInterface5::testInterfaceAttributeAttributeSetterCallbac k, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DO MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati on::kAllWorlds}
796 {"doubleAttribute", V8TestInterface5::doubleAttributeAttributeGetterCallback , V8TestInterface5::doubleAttributeAttributeSetterCallback, nullptr, nullptr, st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8 DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds}, 797 ,
797 {"floatAttribute", V8TestInterface5::floatAttributeAttributeGetterCallback, V8TestInterface5::floatAttributeAttributeSetterCallback, nullptr, nullptr, stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOM Configuration::kCheckHolder, V8DOMConfiguration::kAllWorlds}, 798
798 {"unrestrictedDoubleAttribute", V8TestInterface5::unrestrictedDoubleAttribut eAttributeGetterCallback, V8TestInterface5::unrestrictedDoubleAttributeAttribute SetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigu ration::kAllWorlds}, 799 {"doubleAttribute", V8TestInterface5::doubleAttributeAttributeGetterCallba ck, V8TestInterface5::doubleAttributeAttributeSetterCallback, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPr ototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds}
799 {"unrestrictedFloatAttribute", V8TestInterface5::unrestrictedFloatAttributeA ttributeGetterCallback, V8TestInterface5::unrestrictedFloatAttributeAttributeSet terCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurat ion::kAllWorlds}, 800 ,
800 {"staticStringAttribute", V8TestInterface5::staticStringAttributeAttributeGe tterCallback, V8TestInterface5::staticStringAttributeAttributeSetterCallback, nu llptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration ::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds }, 801
801 {"length", V8TestInterface5::lengthAttributeGetterCallback, nullptr, nullptr , nullptr, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration: :kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds} , 802 {"floatAttribute", V8TestInterface5::floatAttributeAttributeGetterCallback , V8TestInterface5::floatAttributeAttributeSetterCallback, nullptr, nullptr, nul lptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnProto type, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds}
802 {"alwaysExposedAttribute", V8TestInterface5::alwaysExposedAttributeAttribute GetterCallback, V8TestInterface5::alwaysExposedAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWor lds}, 803 ,
804
805 {"unrestrictedDoubleAttribute", V8TestInterface5::unrestrictedDoubleAttrib uteAttributeGetterCallback, V8TestInterface5::unrestrictedDoubleAttributeAttribu teSetterCallback, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>( v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V 8DOMConfiguration::kAllWorlds}
806 ,
807
808 {"unrestrictedFloatAttribute", V8TestInterface5::unrestrictedFloatAttribut eAttributeGetterCallback, V8TestInterface5::unrestrictedFloatAttributeAttributeS etterCallback, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8: :None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DO MConfiguration::kAllWorlds}
809 ,
810
811 {"staticStringAttribute", V8TestInterface5::staticStringAttributeAttribute GetterCallback, V8TestInterface5::staticStringAttributeAttributeSetterCallback, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMCo nfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration: :kAllWorlds}
812 ,
813
814 {"length", V8TestInterface5::lengthAttributeGetterCallback, nullptr, nullp tr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMCon figuration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration:: kAllWorlds}
815 ,
816
817 {"alwaysExposedAttribute", V8TestInterface5::alwaysExposedAttributeAttribu teGetterCallback, V8TestInterface5::alwaysExposedAttributeAttributeSetterCallbac k, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DO MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati on::kAllWorlds}
818 ,
803 }; 819 };
804 820
805 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { 821 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
806 {"voidMethodTestInterfaceEmptyArg", V8TestInterface5::voidMethodTestInterfac eEmptyArgMethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMCon figuration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfigurat ion::kAllWorlds}, 822 {"voidMethodTestInterfaceEmptyArg", V8TestInterface5::voidMethodTestInterfac eEmptyArgMethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMCon figuration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfigurat ion::kAllWorlds},
807 {"voidMethodDoubleArgFloatArg", V8TestInterface5::voidMethodDoubleArgFloatAr gMethodCallback, 2, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfigurati on::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAl lWorlds}, 823 {"voidMethodDoubleArgFloatArg", V8TestInterface5::voidMethodDoubleArgFloatAr gMethodCallback, 2, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfigurati on::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAl lWorlds},
808 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", V8TestInterface5::vo idMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback, 2, v8::None, V8 DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigura tion::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 824 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", V8TestInterface5::vo idMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback, 2, v8::None, V8 DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigura tion::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
809 {"voidMethod", V8TestInterface5::voidMethodMethodCallbackForMainWorld, 0, v8 ::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DO MConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kMainWorld}, 825 {"voidMethod", V8TestInterface5::voidMethodMethodCallbackForMainWorld, 0, v8 ::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DO MConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kMainWorld},
810 {"voidMethod", V8TestInterface5::voidMethodMethodCallback, 0, v8::None, V8DO MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati on::kDoNotCheckAccess, V8DOMConfiguration::kNonMainWorlds}, 826 {"voidMethod", V8TestInterface5::voidMethodMethodCallback, 0, v8::None, V8DO MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati on::kDoNotCheckAccess, V8DOMConfiguration::kNonMainWorlds},
811 {"alwaysExposedMethod", V8TestInterface5::alwaysExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder , V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, 827 {"alwaysExposedMethod", V8TestInterface5::alwaysExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder , V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
812 {"alwaysExposedStaticMethod", V8TestInterface5::alwaysExposedStaticMethodMet hodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration:: kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWor lds}, 828 {"alwaysExposedStaticMethod", V8TestInterface5::alwaysExposedStaticMethodMet hodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration:: kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWor lds},
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 } 903 }
888 904
889 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v 8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac eTemplate) { 905 void V8TestInterface5::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v 8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfac eTemplate) {
890 v8::Isolate* isolate = context->GetIsolate(); 906 v8::Isolate* isolate = context->GetIsolate();
891 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 907 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
892 ExecutionContext* executionContext = ToExecutionContext(context); 908 ExecutionContext* executionContext = ToExecutionContext(context);
893 DCHECK(executionContext); 909 DCHECK(executionContext);
894 910
895 if (executionContext && (executionContext->IsWorkerGlobalScope())) { 911 if (executionContext && (executionContext->IsWorkerGlobalScope())) {
896 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration [] = { 912 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration [] = {
897 {"workerExposedAttribute", V8TestInterface5::workerExposedAttributeAttribu teGetterCallback, V8TestInterface5::workerExposedAttributeAttributeSetterCallbac k, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur ation::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllW orlds} 913 {"workerExposedAttribute", V8TestInterface5::workerExposedAttributeAttribu teGetterCallback, V8TestInterface5::workerExposedAttributeAttributeSetterCallbac k, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DO MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati on::kAllWorlds}
898 }; 914 };
899 for (const auto& accessorConfig : accessorConfiguration) 915 for (const auto& accessorConfig : accessorConfiguration)
900 V8DOMConfiguration::InstallAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfig); 916 V8DOMConfiguration::InstallAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfig);
901 } 917 }
902 if (executionContext && (executionContext->IsDocument())) { 918 if (executionContext && (executionContext->IsDocument())) {
903 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration [] = { 919 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration [] = {
904 {"windowExposedAttribute", V8TestInterface5::windowExposedAttributeAttribu teGetterCallback, V8TestInterface5::windowExposedAttributeAttributeSetterCallbac k, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur ation::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllW orlds} 920 {"windowExposedAttribute", V8TestInterface5::windowExposedAttributeAttribu teGetterCallback, V8TestInterface5::windowExposedAttributeAttributeSetterCallbac k, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DO MConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfigurati on::kAllWorlds}
905 }; 921 };
906 for (const auto& accessorConfig : accessorConfiguration) 922 for (const auto& accessorConfig : accessorConfiguration)
907 V8DOMConfiguration::InstallAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfig); 923 V8DOMConfiguration::InstallAccessor(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, accessorConfig);
908 } 924 }
909 if (executionContext && (executionContext->IsWorkerGlobalScope())) { 925 if (executionContext && (executionContext->IsWorkerGlobalScope())) {
910 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfi guration[] = { 926 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfi guration[] = {
911 {"workerExposedMethod", V8TestInterface5::workerExposedMethodMethodCallbac k, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHold er, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds} 927 {"workerExposedMethod", V8TestInterface5::workerExposedMethodMethodCallbac k, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHold er, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
912 }; 928 };
913 for (const auto& methodConfig : workerExposedMethodMethodConfiguration) 929 for (const auto& methodConfig : workerExposedMethodMethodConfiguration)
914 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig); 930 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig);
(...skipping 22 matching lines...) Expand all
937 if (executionContext && (executionContext->IsDocument() || executionContext->I sServiceWorkerGlobalScope())) { 953 if (executionContext && (executionContext->IsDocument() || executionContext->I sServiceWorkerGlobalScope())) {
938 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM ethodMethodConfiguration[] = { 954 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM ethodMethodConfiguration[] = {
939 {"windowAndServiceWorkerExposedMethod", V8TestInterface5::windowAndService WorkerExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype , V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM Configuration::kAllWorlds} 955 {"windowAndServiceWorkerExposedMethod", V8TestInterface5::windowAndService WorkerExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype , V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM Configuration::kAllWorlds}
940 }; 956 };
941 for (const auto& methodConfig : windowAndServiceWorkerExposedMethodMethodCon figuration) 957 for (const auto& methodConfig : windowAndServiceWorkerExposedMethodMethodCon figuration)
942 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig); 958 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodConfig);
943 } 959 }
944 } 960 }
945 961
946 } // namespace blink 962 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698