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

Side by Side Diff: Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 24867002: Add static attributes to IDL compiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised Created 7 years, 2 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
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 return; 458 return;
459 } 459 }
460 460
461 static void readonlyHTMLElementAttributeAttributeGetterCallback(v8::Local<v8::St ring> name, const v8::PropertyCallbackInfo<v8::Value>& info) 461 static void readonlyHTMLElementAttributeAttributeGetterCallback(v8::Local<v8::St ring> name, const v8::PropertyCallbackInfo<v8::Value>& info)
462 { 462 {
463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
464 TestObjectPythonV8Internal::readonlyHTMLElementAttributeAttributeGetter(name , info); 464 TestObjectPythonV8Internal::readonlyHTMLElementAttributeAttributeGetter(name , info);
465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
466 } 466 }
467 467
468 static void staticReadonlyStringAttributeAttributeGetter(v8::Local<v8::String> n ame, const v8::PropertyCallbackInfo<v8::Value>& info)
469 {
470 v8SetReturnValueString(info, TestObjectPython::staticReadonlyStringAttribute (), info.GetIsolate());
471 return;
472 }
473
474 static void staticReadonlyStringAttributeAttributeGetterCallback(v8::Local<v8::S tring> name, const v8::PropertyCallbackInfo<v8::Value>& info)
475 {
476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
477 TestObjectPythonV8Internal::staticReadonlyStringAttributeAttributeGetter(nam e, info);
478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
479 }
480
481 static void staticReadonlyLongAttributeAttributeGetter(v8::Local<v8::String> nam e, const v8::PropertyCallbackInfo<v8::Value>& info)
482 {
483 v8SetReturnValueInt(info, TestObjectPython::staticReadonlyLongAttribute());
484 return;
485 }
486
487 static void staticReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::Str ing> name, const v8::PropertyCallbackInfo<v8::Value>& info)
488 {
489 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
490 TestObjectPythonV8Internal::staticReadonlyLongAttributeAttributeGetter(name, info);
491 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
492 }
493
468 } // namespace TestObjectPythonV8Internal 494 } // namespace TestObjectPythonV8Internal
469 495
470 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib utes[] = { 496 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib utes[] = {
471 {"readonlyDateAttribute", TestObjectPythonV8Internal::readonlyDateAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 497 {"readonlyDateAttribute", TestObjectPythonV8Internal::readonlyDateAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
472 {"readonlyBooleanAttribute", TestObjectPythonV8Internal::readonlyBooleanAttr ibuteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 498 {"readonlyBooleanAttribute", TestObjectPythonV8Internal::readonlyBooleanAttr ibuteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
473 {"readonlyByteAttribute", TestObjectPythonV8Internal::readonlyByteAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 499 {"readonlyByteAttribute", TestObjectPythonV8Internal::readonlyByteAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
474 {"readonlyDoubleAttribute", TestObjectPythonV8Internal::readonlyDoubleAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 500 {"readonlyDoubleAttribute", TestObjectPythonV8Internal::readonlyDoubleAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
475 {"readonlyFloatAttribute", TestObjectPythonV8Internal::readonlyFloatAttribut eAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT ), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 501 {"readonlyFloatAttribute", TestObjectPythonV8Internal::readonlyFloatAttribut eAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT ), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
476 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 502 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
477 {"readonlyLongLongAttribute", TestObjectPythonV8Internal::readonlyLongLongAt tributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::D EFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 503 {"readonlyLongLongAttribute", TestObjectPythonV8Internal::readonlyLongLongAt tributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::D EFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
(...skipping 22 matching lines...) Expand all
500 526
501 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType) 527 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType)
502 { 528 {
503 desc->ReadOnlyPrototype(); 529 desc->ReadOnlyPrototype();
504 530
505 v8::Local<v8::Signature> defaultSignature; 531 v8::Local<v8::Signature> defaultSignature;
506 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount, 532 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount,
507 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes), 533 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes),
508 0, 0, isolate, currentWorldType); 534 0, 0, isolate, currentWorldType);
509 UNUSED_PARAM(defaultSignature); 535 UNUSED_PARAM(defaultSignature);
536 desc->SetNativeDataProperty(v8::String::NewSymbol("staticReadonlyStringAttri bute"), TestObjectPythonV8Internal::staticReadonlyStringAttributeAttributeGetter Callback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT ));
537 desc->SetNativeDataProperty(v8::String::NewSymbol("staticReadonlyLongAttribu te"), TestObjectPythonV8Internal::staticReadonlyLongAttributeAttributeGetterCall back, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8: :Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
510 538
511 // Custom toString template 539 // Custom toString template
512 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate()); 540 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate());
513 return desc; 541 return desc;
514 } 542 }
515 543
516 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::GetTemplate(v8::Isolate* is olate, WrapperWorldType currentWorldType) 544 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::GetTemplate(v8::Isolate* is olate, WrapperWorldType currentWorldType)
517 { 545 {
518 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 546 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
519 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&info); 547 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&info);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent); 587 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent);
560 return wrapper; 588 return wrapper;
561 } 589 }
562 590
563 void V8TestObjectPython::derefObject(void* object) 591 void V8TestObjectPython::derefObject(void* object)
564 { 592 {
565 fromInternalPointer(object)->deref(); 593 fromInternalPointer(object)->deref();
566 } 594 }
567 595
568 } // namespace WebCore 596 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/tests/results/V8TestTypedefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698