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

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

Issue 2758893002: Slim V8DOMConfiguration structs for attributes and accessors. (Closed)
Patch Set: Created 3 years, 9 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 void V8TestInterfaceOriginTrialEnabled::voidMethodDoubleArgFloatArgMethodCallbac k(const v8::FunctionCallbackInfo<v8::Value>& info) { 234 void V8TestInterfaceOriginTrialEnabled::voidMethodDoubleArgFloatArgMethodCallbac k(const v8::FunctionCallbackInfo<v8::Value>& info) {
235 TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethod(i nfo); 235 TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethod(i nfo);
236 } 236 }
237 237
238 void V8TestInterfaceOriginTrialEnabled::voidMethodPartialOverloadMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) { 238 void V8TestInterfaceOriginTrialEnabled::voidMethodPartialOverloadMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) {
239 TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethod(inf o); 239 TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethod(inf o);
240 } 240 }
241 241
242 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOriginTrialEnable dAccessors[] = { 242 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOriginTria lEnabledAccessors[] = {
243 {"doubleAttribute", V8TestInterfaceOriginTrialEnabled::doubleAttributeAttrib uteGetterCallback, V8TestInterfaceOriginTrialEnabled::doubleAttributeAttributeSe tterCallback, nullptr, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttrib ute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder }, 243 {"doubleAttribute", V8TestInterfaceOriginTrialEnabled::doubleAttributeAttrib uteGetterCallback, V8TestInterfaceOriginTrialEnabled::doubleAttributeAttributeSe tterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8 DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigurati on::AllWorlds},
244 {"staticStringAttribute", V8TestInterfaceOriginTrialEnabled::staticStringAtt ributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::staticStringAt tributeAttributeSetterCallback, nullptr, nullptr, nullptr, nullptr, static_cast< v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfigur ation::CheckHolder}, 244 {"staticStringAttribute", V8TestInterfaceOriginTrialEnabled::staticStringAtt ributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::staticStringAt tributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttrib ute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder , V8DOMConfiguration::AllWorlds},
245 }; 245 };
246 246
247 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceOriginTrialEnabledM ethods[] = { 247 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceOriginTrialE nabledMethods[] = {
248 {"voidMethodDoubleArgFloatArg", V8TestInterfaceOriginTrialEnabled::voidMetho dDoubleArgFloatArgMethodCallback, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess, V8DOMConf iguration::AllWorlds}, 248 {"voidMethodDoubleArgFloatArg", V8TestInterfaceOriginTrialEnabled::voidMetho dDoubleArgFloatArgMethodCallback, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess, V8DOMConf iguration::AllWorlds},
249 {"voidMethodPartialOverload", V8TestInterfaceOriginTrialEnabled::voidMethodP artialOverloadMethodCallback, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DO MConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess, V8DOMConfigur ation::AllWorlds}, 249 {"voidMethodPartialOverload", V8TestInterfaceOriginTrialEnabled::voidMethodP artialOverloadMethodCallback, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DO MConfiguration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess, V8DOMConfigur ation::AllWorlds},
250 }; 250 };
251 251
252 static void installV8TestInterfaceOriginTrialEnabledTemplate(v8::Isolate* isolat e, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempla te) { 252 static void installV8TestInterfaceOriginTrialEnabledTemplate(v8::Isolate* isolat e, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempla te) {
253 // Initialize the interface object's template. 253 // Initialize the interface object's template.
254 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceOriginTrialEnabled::wrapperTypeInfo.interfaceName, v8::Local<v8: :FunctionTemplate>(), V8TestInterfaceOriginTrialEnabled::internalFieldCount); 254 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceOriginTrialEnabled::wrapperTypeInfo.interfaceName, v8::Local<v8: :FunctionTemplate>(), V8TestInterfaceOriginTrialEnabled::internalFieldCount);
255 255
256 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 256 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
257 ALLOW_UNUSED_LOCAL(signature); 257 ALLOW_UNUSED_LOCAL(signature);
258 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate(); 258 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
259 ALLOW_UNUSED_LOCAL(instanceTemplate); 259 ALLOW_UNUSED_LOCAL(instanceTemplate);
260 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template(); 260 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
261 ALLOW_UNUSED_LOCAL(prototypeTemplate); 261 ALLOW_UNUSED_LOCAL(prototypeTemplate);
262 262
263 // Register DOM constants, attributes and operations. 263 // Register DOM constants, attributes and operations.
264 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceOriginTrialEnab ledConstants[] = { 264 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceOriginTrialEnab ledConstants[] = {
265 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong}, 265 {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong},
266 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, 266 {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
267 }; 267 };
268 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemp late, V8TestInterfaceOriginTrialEnabledConstants, WTF_ARRAY_LENGTH(V8TestInterfa ceOriginTrialEnabledConstants)); 268 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemp late, V8TestInterfaceOriginTrialEnabledConstants, WTF_ARRAY_LENGTH(V8TestInterfa ceOriginTrialEnabledConstants));
269 static_assert(0 == TestInterfaceOriginTrialEnabled::kUnsignedLong, "the value of TestInterfaceOriginTrialEnabled_kUnsignedLong does not match with implementat ion"); 269 static_assert(0 == TestInterfaceOriginTrialEnabled::kUnsignedLong, "the value of TestInterfaceOriginTrialEnabled_kUnsignedLong does not match with implementat ion");
270 static_assert(1 == TestInterfaceOriginTrialEnabled::kConstJavascript, "the val ue of TestInterfaceOriginTrialEnabled_kConstJavascript does not match with imple mentation"); 270 static_assert(1 == TestInterfaceOriginTrialEnabled::kConstJavascript, "the val ue of TestInterfaceOriginTrialEnabled_kConstJavascript does not match with imple mentation");
271 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceOriginTrialEnabledAcces sors, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledAccessors)); 271 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceOriginTrialEnabledAcces sors, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledAccessors));
272 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceOriginTrialEnabledMethods , WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledMethods)); 272 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceOriginTrialEnabledMethods , WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledMethods));
273 273
274 if (RuntimeEnabledFeatures::featureNameEnabled()) { 274 if (RuntimeEnabledFeatures::featureNameEnabled()) {
275 const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadOnlyL ongAttributeConfiguration = {"conditionalReadOnlyLongAttribute", V8TestInterface OriginTrialEnabled::conditionalReadOnlyLongAttributeAttributeGetterCallback, nul lptr, nullptr, nullptr, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8: :ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 275 static const V8DOMConfiguration::AccessorConfiguration accessorconditionalRe adOnlyLongAttributeConfiguration[] = {
276 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, protot ypeTemplate, interfaceTemplate, signature, accessorconditionalReadOnlyLongAttrib uteConfiguration); 276 {"conditionalReadOnlyLongAttribute", V8TestInterfaceOriginTrialEnabled::co nditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, nullptr, nullptr , static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnProtot ype, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::AllWorlds}
277 const V8DOMConfiguration::AccessorConfiguration accessorstaticConditionalRea dOnlyLongAttributeConfiguration = {"staticConditionalReadOnlyLongAttribute", V8T estInterfaceOriginTrialEnabled::staticConditionalReadOnlyLongAttributeAttributeG etterCallback, nullptr, nullptr, nullptr, nullptr, nullptr, static_cast<v8::Prop ertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInterface, V8DOMConfiguratio n::CheckHolder}; 277 };
278 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, protot ypeTemplate, interfaceTemplate, signature, accessorstaticConditionalReadOnlyLong AttributeConfiguration); 278 for (const auto& accessorConfig : accessorconditionalReadOnlyLongAttributeCo nfiguration)
279 const V8DOMConfiguration::AccessorConfiguration accessorconditionalLongAttri buteConfiguration = {"conditionalLongAttribute", V8TestInterfaceOriginTrialEnabl ed::conditionalLongAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialE nabled::conditionalLongAttributeAttributeSetterCallback, nullptr, nullptr, nullp tr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::O nPrototype, V8DOMConfiguration::CheckHolder}; 279 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prot otypeTemplate, interfaceTemplate, signature, accessorConfig);
280 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, protot ypeTemplate, interfaceTemplate, signature, accessorconditionalLongAttributeConfi guration); 280 static const V8DOMConfiguration::AccessorConfiguration accessorstaticConditi onalReadOnlyLongAttributeConfiguration[] = {
281 {"staticConditionalReadOnlyLongAttribute", V8TestInterfaceOriginTrialEnabl ed::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, nullptr, null ptr, nullptr, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfigurati on::OnInterface, V8DOMConfiguration::CheckHolder, V8DOMConfiguration::AllWorlds}
282 };
283 for (const auto& accessorConfig : accessorstaticConditionalReadOnlyLongAttri buteConfiguration)
284 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prot otypeTemplate, interfaceTemplate, signature, accessorConfig);
285 static const V8DOMConfiguration::AccessorConfiguration accessorconditionalLo ngAttributeConfiguration[] = {
286 {"conditionalLongAttribute", V8TestInterfaceOriginTrialEnabled::conditiona lLongAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::condit ionalLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::Pro pertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration:: CheckHolder, V8DOMConfiguration::AllWorlds}
287 };
288 for (const auto& accessorConfig : accessorconditionalLongAttributeConfigurat ion)
289 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prot otypeTemplate, interfaceTemplate, signature, accessorConfig);
281 } 290 }
282 } 291 }
283 292
284 v8::Local<v8::FunctionTemplate> V8TestInterfaceOriginTrialEnabled::domTemplate(v 8::Isolate* isolate, const DOMWrapperWorld& world) { 293 v8::Local<v8::FunctionTemplate> V8TestInterfaceOriginTrialEnabled::domTemplate(v 8::Isolate* isolate, const DOMWrapperWorld& world) {
285 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceOriginTrialEnabledTemplate); 294 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceOriginTrialEnabledTemplate);
286 } 295 }
287 296
288 bool V8TestInterfaceOriginTrialEnabled::hasInstance(v8::Local<v8::Value> v8Value , v8::Isolate* isolate) { 297 bool V8TestInterfaceOriginTrialEnabled::hasInstance(v8::Local<v8::Value> v8Value , v8::Isolate* isolate) {
289 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value) ; 298 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value) ;
290 } 299 }
291 300
292 v8::Local<v8::Object> V8TestInterfaceOriginTrialEnabled::findInstanceInPrototype Chain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { 301 v8::Local<v8::Object> V8TestInterfaceOriginTrialEnabled::findInstanceInPrototype Chain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
293 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value); 302 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value);
294 } 303 }
295 304
296 TestInterfaceOriginTrialEnabled* V8TestInterfaceOriginTrialEnabled::toImplWithTy peCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) { 305 TestInterfaceOriginTrialEnabled* V8TestInterfaceOriginTrialEnabled::toImplWithTy peCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
297 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr; 306 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr;
298 } 307 }
299 308
300 TestInterfaceOriginTrialEnabled* NativeValueTraits<TestInterfaceOriginTrialEnabl ed>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionStat e& exceptionState) { 309 TestInterfaceOriginTrialEnabled* NativeValueTraits<TestInterfaceOriginTrialEnabl ed>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionStat e& exceptionState) {
301 return V8TestInterfaceOriginTrialEnabled::toImplWithTypeCheck(isolate, value); 310 return V8TestInterfaceOriginTrialEnabled::toImplWithTypeCheck(isolate, value);
302 } 311 }
303 312
304 } // namespace blink 313 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698