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

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

Issue 922233002: bindings: Makes runtime-enabled attributes on prototype chains compilable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 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 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface5.h" 9 #include "V8TestInterface5.h"
10 10
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); 913 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
914 { 914 {
915 v8::IndexedPropertyHandlerConfiguration config(TestInterface5Implementat ionV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Inte rnal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal:: indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implemen tation>); 915 v8::IndexedPropertyHandlerConfiguration config(TestInterface5Implementat ionV8Internal::indexedPropertyGetterCallback, TestInterface5ImplementationV8Inte rnal::indexedPropertySetterCallback, 0, TestInterface5ImplementationV8Internal:: indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface5Implemen tation>);
916 functionTemplate->InstanceTemplate()->SetHandler(config); 916 functionTemplate->InstanceTemplate()->SetHandler(config);
917 } 917 }
918 { 918 {
919 v8::NamedPropertyHandlerConfiguration config(TestInterface5Implementatio nV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal ::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedProp ertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterC allback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback ); 919 v8::NamedPropertyHandlerConfiguration config(TestInterface5Implementatio nV8Internal::namedPropertyGetterCallback, TestInterface5ImplementationV8Internal ::namedPropertySetterCallback, TestInterface5ImplementationV8Internal::namedProp ertyQueryCallback, TestInterface5ImplementationV8Internal::namedPropertyDeleterC allback, TestInterface5ImplementationV8Internal::namedPropertyEnumeratorCallback );
920 functionTemplate->InstanceTemplate()->SetHandler(config); 920 functionTemplate->InstanceTemplate()->SetHandler(config);
921 } 921 }
922 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8 Internal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 922 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8 Internal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
923 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate); 923 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration);
924 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom); 924 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom);
925 const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMethodMetho dConfiguration = { 925 const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMethodMetho dConfiguration = {
926 "alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::alw aysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScri pts, 926 "alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::alw aysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScri pts,
927 }; 927 };
928 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate); 928 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S ignature>(), v8::None, alwaysExposedStaticMethodMethodConfiguration);
929 if (context && (context->isWorkerGlobalScope())) { 929 if (context && (context->isWorkerGlobalScope())) {
930 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM ethodConfiguration = { 930 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM ethodConfiguration = {
931 "workerExposedStaticMethod", TestInterface5ImplementationV8Internal: :workerExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts, 931 "workerExposedStaticMethod", TestInterface5ImplementationV8Internal: :workerExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts,
932 }; 932 };
933 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signat ure>(), v8::None, workerExposedStaticMethodMethodConfiguration, isolate); 933 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v 8::Signature>(), v8::None, workerExposedStaticMethodMethodConfiguration);
934 } 934 }
935 if (context && (context->isDocument())) { 935 if (context && (context->isDocument())) {
936 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM ethodConfiguration = { 936 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM ethodConfiguration = {
937 "windowExposedStaticMethod", TestInterface5ImplementationV8Internal: :windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts, 937 "windowExposedStaticMethod", TestInterface5ImplementationV8Internal: :windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts,
938 }; 938 };
939 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signat ure>(), v8::None, windowExposedStaticMethodMethodConfiguration, isolate); 939 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v 8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration);
940 } 940 }
941 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = { 941 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = {
942 "toString", TestInterface5ImplementationV8Internal::toStringMethodCallba ck, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 942 "toString", TestInterface5ImplementationV8Internal::toStringMethodCallba ck, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
943 }; 943 };
944 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringMethodConf iguration, isolate); 944 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM ethodConfiguration);
945 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestInterface5ImplementationV8Internal::staticStringAttributeAttri buteGetterCallback, TestInterface5ImplementationV8Internal::staticStringAttribut eAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::Propert yAttribute>(v8::None), v8::Local<v8::AccessorSignature>(), static_cast<v8::Acces sControl>(v8::DEFAULT)); 945 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestInterface5ImplementationV8Internal::staticStringAttributeAttri buteGetterCallback, TestInterface5ImplementationV8Internal::staticStringAttribut eAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::Propert yAttribute>(v8::None), v8::Local<v8::AccessorSignature>(), static_cast<v8::Acces sControl>(v8::DEFAULT));
946 946
947 // Custom toString template 947 // Custom toString template
948 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 948 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
949 } 949 }
950 950
951 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te) 951 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te)
952 { 952 {
953 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template); 953 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template);
954 } 954 }
(...skipping 14 matching lines...) Expand all
969 } 969 }
970 970
971 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate) 971 void V8TestInterface5::installConditionallyEnabledProperties(v8::Local<v8::Objec t> instanceObject, v8::Isolate* isolate)
972 { 972 {
973 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 973 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
974 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 974 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
975 975
976 if (context && (context->isWorkerGlobalScope())) { 976 if (context && (context->isWorkerGlobalScope())) {
977 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 977 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
978 {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worke rExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal ::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfig uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 978 {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worke rExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal ::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfig uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
979 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 979 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
980 } 980 }
981 if (context && (context->isDocument())) { 981 if (context && (context->isDocument())) {
982 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 982 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
983 {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windo wExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal ::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfig uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 983 {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windo wExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal ::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfig uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
984 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 984 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
985 } 985 }
986 } 986 }
987 987
988 void V8TestInterface5::installConditionallyEnabledMethods(v8::Local<v8::Object> prototypeObject, v8::Isolate* isolate) 988 void V8TestInterface5::installConditionallyEnabledMethods(v8::Local<v8::Object> prototypeObject, v8::Isolate* isolate)
989 { 989 {
990 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 990 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
991 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 991 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
992 ASSERT(context); 992 ASSERT(context);
993 993
994 if (context && (context->isWorkerGlobalScope())) { 994 if (context && (context->isWorkerGlobalScope())) {
(...skipping 17 matching lines...) Expand all
1012 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1012 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1013 } 1013 }
1014 1014
1015 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1015 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1016 { 1016 {
1017 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1017 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1018 } 1018 }
1019 1019
1020 } // namespace blink 1020 } // namespace blink
1021 #endif // ENABLE(CONDITION) 1021 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698