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

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: Remove 'return undefined and print a message' on constructors. 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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::Exp osedToAllScripts, V8DOMConfiguration::OnPrototype}, 956 {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::Exp osedToAllScripts, V8DOMConfiguration::OnPrototype},
956 }; 957 };
957 958
958 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) 959 static void installV8TestInterface5Template(v8::Local<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate)
959 { 960 {
960 functionTemplate->ReadOnlyPrototype(); 961 functionTemplate->ReadOnlyPrototype();
961 962
962 v8::Local<v8::Signature> defaultSignature; 963 v8::Local<v8::Signature> defaultSignature;
963 if (!RuntimeEnabledFeatures::featureNameEnabled()) 964 if (!RuntimeEnabledFeatures::featureNameEnabled())
964 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount, 0, 0, 0, 0, 0, 0); 965 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount, 0, 0, 0, 0, 0, 0);
965 else 966 else {
966 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface5::internalFieldCount, 967 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isola te, functionTemplate, "TestInterface5", V8TestInterfaceEmpty::domTemplate(isolat e), V8TestInterface5::internalFieldCount,
967 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Attribu tes), 968 V8TestInterface5Attributes, WTF_ARRAY_LENGTH(V8TestInterface5Att ributes),
968 V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessor s), 969 V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Acce ssors),
969 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods)); 970 V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Method s));
971 }
972
970 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 973 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
971 ALLOW_UNUSED_LOCAL(instanceTemplate); 974 ALLOW_UNUSED_LOCAL(instanceTemplate);
972 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 975 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
973 ALLOW_UNUSED_LOCAL(prototypeTemplate); 976 ALLOW_UNUSED_LOCAL(prototypeTemplate);
974 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = { 977 const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = {
975 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, 978 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
976 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, 979 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
977 }; 980 };
978 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants)); 981 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
982 ExecutionContext* ec = currentExecutionContext(isolate);
983 ALLOW_UNUSED_LOCAL(ec);
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);
983 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Interna l::iteratorMethodCallback, 0, v8::DontDelete, V8DOMConfiguration::ExposedToAllSc ripts, V8DOMConfiguration::OnPrototype }; 988 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); 989 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, symbolKeyedIteratorConfiguration);
985 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom); 990 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce5::legacyCallCustom);
986 } 991 }
987 992
988 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te) 993 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1058 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1054 } 1059 }
1055 1060
1056 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1061 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1057 { 1062 {
1058 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1063 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1059 } 1064 }
1060 1065
1061 } // namespace blink 1066 } // namespace blink
1062 #endif // ENABLE(CONDITION) 1067 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698