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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } 335 }
336 336
337 void V8TestInterfaceGarbageCollected::deleteMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) { 337 void V8TestInterfaceGarbageCollected::deleteMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info) {
338 TestInterfaceGarbageCollectedV8Internal::deleteMethod(info); 338 TestInterfaceGarbageCollectedV8Internal::deleteMethod(info);
339 } 339 }
340 340
341 void V8TestInterfaceGarbageCollected::iteratorMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) { 341 void V8TestInterfaceGarbageCollected::iteratorMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) {
342 TestInterfaceGarbageCollectedV8Internal::iteratorMethod(info); 342 TestInterfaceGarbageCollectedV8Internal::iteratorMethod(info);
343 } 343 }
344 344
345 const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceGarbageCollectedA ccessors[] = { 345 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceGarbageCol lectedAccessors[] = {
346 {"attr1", V8TestInterfaceGarbageCollected::attr1AttributeGetterCallback, V8T estInterfaceGarbageCollected::attr1AttributeSetterCallback, nullptr, nullptr, nu llptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration ::OnPrototype, V8DOMConfiguration::CheckHolder}, 346 {"attr1", V8TestInterfaceGarbageCollected::attr1AttributeGetterCallback, V8T estInterfaceGarbageCollected::attr1AttributeSetterCallback, nullptr, nullptr, st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8D OMConfiguration::CheckHolder, V8DOMConfiguration::AllWorlds},
347 }; 347 };
348 348
349 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageCollectedMet hods[] = { 349 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageColle ctedMethods[] = {
350 {"func", V8TestInterfaceGarbageCollected::funcMethodCallback, 1, v8::None, V 8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigurat ion::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 350 {"func", V8TestInterfaceGarbageCollected::funcMethodCallback, 1, v8::None, V 8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigurat ion::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
351 {"keys", V8TestInterfaceGarbageCollected::keysMethodCallback, 0, v8::None, V 8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigurat ion::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 351 {"keys", V8TestInterfaceGarbageCollected::keysMethodCallback, 0, v8::None, V 8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigurat ion::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
352 {"values", V8TestInterfaceGarbageCollected::valuesMethodCallback, 0, v8::Non e, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfig uration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 352 {"values", V8TestInterfaceGarbageCollected::valuesMethodCallback, 0, v8::Non e, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfig uration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
353 {"entries", V8TestInterfaceGarbageCollected::entriesMethodCallback, 0, v8::N one, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConf iguration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 353 {"entries", V8TestInterfaceGarbageCollected::entriesMethodCallback, 0, v8::N one, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConf iguration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
354 {"forEach", V8TestInterfaceGarbageCollected::forEachMethodCallback, 1, v8::N one, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConf iguration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 354 {"forEach", V8TestInterfaceGarbageCollected::forEachMethodCallback, 1, v8::N one, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConf iguration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
355 {"has", V8TestInterfaceGarbageCollected::hasMethodCallback, 1, v8::None, V8D OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguratio n::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 355 {"has", V8TestInterfaceGarbageCollected::hasMethodCallback, 1, v8::None, V8D OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguratio n::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
356 {"add", V8TestInterfaceGarbageCollected::addMethodCallback, 1, v8::None, V8D OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguratio n::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 356 {"add", V8TestInterfaceGarbageCollected::addMethodCallback, 1, v8::None, V8D OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfiguratio n::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
357 {"clear", V8TestInterfaceGarbageCollected::clearMethodCallback, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigur ation::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 357 {"clear", V8TestInterfaceGarbageCollected::clearMethodCallback, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfigur ation::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
358 {"delete", V8TestInterfaceGarbageCollected::deleteMethodCallback, 1, v8::Non e, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfig uration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds}, 358 {"delete", V8TestInterfaceGarbageCollected::deleteMethodCallback, 1, v8::Non e, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder, V8DOMConfig uration::DoNotCheckAccess, V8DOMConfiguration::AllWorlds},
359 }; 359 };
(...skipping 23 matching lines...) Expand all
383 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate(); 383 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe mplate();
384 ALLOW_UNUSED_LOCAL(instanceTemplate); 384 ALLOW_UNUSED_LOCAL(instanceTemplate);
385 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template(); 385 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype Template();
386 ALLOW_UNUSED_LOCAL(prototypeTemplate); 386 ALLOW_UNUSED_LOCAL(prototypeTemplate);
387 387
388 // Register DOM constants, attributes and operations. 388 // Register DOM constants, attributes and operations.
389 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedAccesso rs, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedAccessors)); 389 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedAccesso rs, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedAccessors));
390 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedMethods)); 390 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedMethods));
391 391
392 // Iterator (@@iterator) 392 // Iterator (@@iterator)
393 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo nfiguration = { v8::Symbol::GetIterator, V8TestInterfaceGarbageCollected::iterat orMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype, V8DOMConfigu ration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess }; 393 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIte ratorConfiguration = { v8::Symbol::GetIterator, V8TestInterfaceGarbageCollected: :iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype, V8DOM Configuration::CheckHolder, V8DOMConfiguration::DoNotCheckAccess };
394 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration); 394 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration);
395 } 395 }
396 396
397 v8::Local<v8::FunctionTemplate> V8TestInterfaceGarbageCollected::domTemplate(v8: :Isolate* isolate, const DOMWrapperWorld& world) { 397 v8::Local<v8::FunctionTemplate> V8TestInterfaceGarbageCollected::domTemplate(v8: :Isolate* isolate, const DOMWrapperWorld& world) {
398 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceGarbageCollectedTemplate); 398 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper TypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceGarbageCollectedTemplate);
399 } 399 }
400 400
401 bool V8TestInterfaceGarbageCollected::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { 401 bool V8TestInterfaceGarbageCollected::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
402 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value) ; 402 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value) ;
403 } 403 }
404 404
405 v8::Local<v8::Object> V8TestInterfaceGarbageCollected::findInstanceInPrototypeCh ain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) { 405 v8::Local<v8::Object> V8TestInterfaceGarbageCollected::findInstanceInPrototypeCh ain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
406 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value); 406 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT ypeInfo, v8Value);
407 } 407 }
408 408
409 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toImplWithTypeCh eck(v8::Isolate* isolate, v8::Local<v8::Value> value) { 409 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toImplWithTypeCh eck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
410 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr; 410 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value) ) : nullptr;
411 } 411 }
412 412
413 TestInterfaceGarbageCollected* NativeValueTraits<TestInterfaceGarbageCollected>: :nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& e xceptionState) { 413 TestInterfaceGarbageCollected* NativeValueTraits<TestInterfaceGarbageCollected>: :nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& e xceptionState) {
414 return V8TestInterfaceGarbageCollected::toImplWithTypeCheck(isolate, value); 414 return V8TestInterfaceGarbageCollected::toImplWithTypeCheck(isolate, value);
415 } 415 }
416 416
417 } // namespace blink 417 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698