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

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

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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. 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
11 #include "bindings/core/v8/ExceptionState.h" 11 #include "bindings/core/v8/ExceptionState.h"
12 #include "bindings/core/v8/ScriptState.h" 12 #include "bindings/core/v8/ScriptState.h"
13 #include "bindings/core/v8/ScriptValue.h" 13 #include "bindings/core/v8/ScriptValue.h"
14 #include "bindings/core/v8/V8DOMConfiguration.h" 14 #include "bindings/core/v8/V8DOMConfiguration.h"
15 #include "bindings/core/v8/V8Iterator.h" 15 #include "bindings/core/v8/V8Iterator.h"
16 #include "bindings/core/v8/V8ObjectConstructor.h" 16 #include "bindings/core/v8/V8ObjectConstructor.h"
17 #include "bindings/core/v8/V8TestInterfaceEmpty.h" 17 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
18 #include "bindings/modules/v8/UnionTypesModules.h" 18 #include "bindings/modules/v8/UnionTypesModules.h"
19 #include "bindings/modules/v8/V8TestInterface5.h" 19 #include "bindings/modules/v8/V8TestInterface5.h"
20 #include "core/dom/ContextFeatures.h" 20 #include "core/dom/ContextFeatures.h"
21 #include "core/dom/Document.h" 21 #include "core/dom/Document.h"
22 #include "core/experiments/Experiments.h"
22 #include "platform/RuntimeEnabledFeatures.h" 23 #include "platform/RuntimeEnabledFeatures.h"
23 #include "platform/TraceEvent.h" 24 #include "platform/TraceEvent.h"
24 #include "wtf/GetPtr.h" 25 #include "wtf/GetPtr.h"
25 #include "wtf/RefPtr.h" 26 #include "wtf/RefPtr.h"
26 27
27 namespace blink { 28 namespace blink {
28 29
29 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial 30 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial
30 // and does not depend on another global objects. 31 // and does not depend on another global objects.
31 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 32 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods)); 970 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods));
970 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 971 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
971 ALLOW_UNUSED_LOCAL(instanceTemplate); 972 ALLOW_UNUSED_LOCAL(instanceTemplate);
972 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 973 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
973 ALLOW_UNUSED_LOCAL(prototypeTemplate); 974 ALLOW_UNUSED_LOCAL(prototypeTemplate);
974 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = { 975 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = {
975 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, 976 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
976 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, 977 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
977 }; 978 };
978 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); 979 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
980 ExecutionContext* ec = currentExecutionContext(isolate);
981 ALLOW_UNUSED_LOCAL(ec);
982 String constantsErrorMessage;
983 ALLOW_UNUSED_LOCAL(constantsErrorMessage);
979 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInt erface5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5Im plementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5Implemen tationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<Test Interface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNo ne); 984 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInt erface5ImplementationV8Internal::indexedPropertyGetterCallback, TestInterface5Im plementationV8Internal::indexedPropertySetterCallback, 0, TestInterface5Implemen tationV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<Test Interface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNo ne);
980 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); 985 instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
981 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterfa ce5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5Implemen tationV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Int ernal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::named PropertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEn umeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>( int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFl ags::kNonMasking))); 986 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterfa ce5ImplementationV8Internal::namedPropertyGetterCallback, TestInterface5Implemen tationV8Internal::namedPropertySetterCallback, TestInterface5ImplementationV8Int ernal::namedPropertyQueryCallback, TestInterface5ImplementationV8Internal::named PropertyDeleterCallback, TestInterface5ImplementationV8Internal::namedPropertyEn umeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>( int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFl ags::kNonMasking)));
982 instanceTemplate->SetHandler(namedPropertyHandlerConfig); 987 instanceTemplate->SetHandler(namedPropertyHandlerConfig);
988 String errorMessage;
989 ALLOW_UNUSED_LOCAL(errorMessage);
983 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Interna l::iteratorMethodCallback, 0, v8::DontDelete, V8DOMConfiguration::ExposedToAllSc ripts, V8DOMConfiguration::OnPrototype }; 990 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Interna l::iteratorMethodCallback, 0, v8::DontDelete, V8DOMConfiguration::ExposedToAllSc ripts, V8DOMConfiguration::OnPrototype };
984 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, symbolKeyedIteratorConfiguration); 991 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, symbolKeyedIteratorConfiguration);
985 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom); 992 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom);
986 } 993 }
987 994
988 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te) 995 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te)
989 { 996 {
990 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template); 997 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template);
991 } 998 }
992 999
(...skipping 21 matching lines...) Expand all
1014 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposed AttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::P ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnPrototype, V8DOMConfiguration::CheckHolder}; 1021 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposed AttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::P ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnPrototype, V8DOMConfiguration::CheckHolder};
1015 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, interfaceObject, signature, accessorConfiguration); 1022 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, interfaceObject, signature, accessorConfiguration);
1016 } 1023 }
1017 if (executionContext && (executionContext->isDocument())) { 1024 if (executionContext && (executionContext->isDocument())) {
1018 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposed AttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::P ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnPrototype, V8DOMConfiguration::CheckHolder}; 1025 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposed AttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::P ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnPrototype, V8DOMConfiguration::CheckHolder};
1019 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, interfaceObject, signature, accessorConfiguration); 1026 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, interfaceObject, signature, accessorConfiguration);
1020 } 1027 }
1021 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1028 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
1022 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Cre ationContext()); 1029 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Cre ationContext());
1023 ASSERT(executionContext); 1030 ASSERT(executionContext);
1031 String errorMessage;
1032 ALLOW_UNUSED_LOCAL(errorMessage);
1024 if (executionContext && (executionContext->isWorkerGlobalScope())) { 1033 if (executionContext && (executionContext->isWorkerGlobalScope())) {
1025 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodC onfiguration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::w orkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToA llScripts, V8DOMConfiguration::OnPrototype}; 1034 const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodC onfiguration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::w orkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToA llScripts, V8DOMConfiguration::OnPrototype};
1026 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prot otypeObject, interfaceObject, defaultSignature, workerExposedMethodMethodConfigu ration); 1035 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prot otypeObject, interfaceObject, defaultSignature, workerExposedMethodMethodConfigu ration);
1027 } 1036 }
1028 if (executionContext && (executionContext->isDocument())) { 1037 if (executionContext && (executionContext->isDocument())) {
1029 const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodC onfiguration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::w indowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToA llScripts, V8DOMConfiguration::OnPrototype}; 1038 const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodC onfiguration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::w indowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToA llScripts, V8DOMConfiguration::OnPrototype};
1030 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prot otypeObject, interfaceObject, defaultSignature, windowExposedMethodMethodConfigu ration); 1039 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prot otypeObject, interfaceObject, defaultSignature, windowExposedMethodMethodConfigu ration);
1031 } 1040 }
1032 if (executionContext && (executionContext->isWorkerGlobalScope())) { 1041 if (executionContext && (executionContext->isWorkerGlobalScope())) {
1033 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM ethodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV 8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; 1042 const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodM ethodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV 8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
(...skipping 19 matching lines...) Expand all
1053 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1062 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1054 } 1063 }
1055 1064
1056 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1065 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1057 { 1066 {
1058 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1067 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1059 } 1068 }
1060 1069
1061 } // namespace blink 1070 } // namespace blink
1062 #endif // ENABLE(CONDITION) 1071 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698