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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface2.cpp

Issue 1324643005: bindings: Makes installV8FooTemplate thread-safe. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 5 years, 3 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 // 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 #include "V8TestInterface2.h" 8 #include "V8TestInterface2.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 { 600 {
601 TestInterface2* impl = scriptWrappable->toImpl<TestInterface2>(); 601 TestInterface2* impl = scriptWrappable->toImpl<TestInterface2>();
602 // The ownerNode() method may return a reference or a pointer. 602 // The ownerNode() method may return a reference or a pointer.
603 if (Node* owner = WTF::getPtr(impl->ownerNode())) { 603 if (Node* owner = WTF::getPtr(impl->ownerNode())) {
604 Node* root = V8GCController::opaqueRootForGC(isolate, owner); 604 Node* root = V8GCController::opaqueRootForGC(isolate, owner);
605 isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(r oot)), wrapper); 605 isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(r oot)), wrapper);
606 return; 606 return;
607 } 607 }
608 } 608 }
609 609
610 static const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { 610 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = {
611 {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, V8DOMConfigurat ion::ExposedToAllScripts}, 611 {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, V8DOMConfigurat ion::ExposedToAllScripts},
612 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf iguration::ExposedToAllScripts}, 612 {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, V8DOMConf iguration::ExposedToAllScripts},
613 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D OMConfiguration::ExposedToAllScripts}, 613 {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, V8D OMConfiguration::ExposedToAllScripts},
614 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM Configuration::ExposedToAllScripts}, 614 {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, V8DOM Configuration::ExposedToAllScripts},
615 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 615 {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
616 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 616 {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
617 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 617 {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallb ack, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
618 {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat ion::ExposedToAllScripts}, 618 {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat ion::ExposedToAllScripts},
619 {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig uration::ExposedToAllScripts}, 619 {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig uration::ExposedToAllScripts},
620 {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConf iguration::ExposedToAllScripts}, 620 {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, V8DOMConf iguration::ExposedToAllScripts},
(...skipping 27 matching lines...) Expand all
648 0, 0, 648 0, 0,
649 0, 0, 649 0, 0,
650 V8TestInterface2Methods, WTF_ARRAY_LENGTH(V8TestInterface2Methods)); 650 V8TestInterface2Methods, WTF_ARRAY_LENGTH(V8TestInterface2Methods));
651 functionTemplate->SetCallHandler(V8TestInterface2::constructorCallback); 651 functionTemplate->SetCallHandler(V8TestInterface2::constructorCallback);
652 functionTemplate->SetLength(0); 652 functionTemplate->SetLength(0);
653 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 653 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
654 ALLOW_UNUSED_LOCAL(instanceTemplate); 654 ALLOW_UNUSED_LOCAL(instanceTemplate);
655 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 655 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
656 ALLOW_UNUSED_LOCAL(prototypeTemplate); 656 ALLOW_UNUSED_LOCAL(prototypeTemplate);
657 if (RuntimeEnabledFeatures::featureNameEnabled()) { 657 if (RuntimeEnabledFeatures::featureNameEnabled()) {
658 static const V8DOMConfiguration::ConstantConfiguration constantConstValu e1Configuration = {"CONST_VALUE_1", 1, 0, V8DOMConfiguration::ConstantTypeUnsign edShort}; 658 const V8DOMConfiguration::ConstantConfiguration constantConstValue1Confi guration = {"CONST_VALUE_1", 1, 0, V8DOMConfiguration::ConstantTypeUnsignedShort };
659 V8DOMConfiguration::installConstant(isolate, functionTemplate, prototype Template, constantConstValue1Configuration); 659 V8DOMConfiguration::installConstant(isolate, functionTemplate, prototype Template, constantConstValue1Configuration);
660 } 660 }
661 static_assert(1 == TestInterface2::CONST_VALUE_1, "the value of TestInterfac e2_CONST_VALUE_1 does not match with implementation"); 661 static_assert(1 == TestInterface2::CONST_VALUE_1, "the value of TestInterfac e2_CONST_VALUE_1 does not match with implementation");
662 { 662 {
663 v8::IndexedPropertyHandlerConfiguration config(TestInterface2V8Internal: :indexedPropertyGetterCallback, TestInterface2V8Internal::indexedPropertySetterC allback, 0, TestInterface2V8Internal::indexedPropertyDeleterCallback, indexedPro pertyEnumerator<TestInterface2>); 663 v8::IndexedPropertyHandlerConfiguration config(TestInterface2V8Internal: :indexedPropertyGetterCallback, TestInterface2V8Internal::indexedPropertySetterC allback, 0, TestInterface2V8Internal::indexedPropertyDeleterCallback, indexedPro pertyEnumerator<TestInterface2>);
664 functionTemplate->InstanceTemplate()->SetHandler(config); 664 functionTemplate->InstanceTemplate()->SetHandler(config);
665 } 665 }
666 { 666 {
667 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr ings); 667 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr ings);
668 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); 668 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking);
669 v8::NamedPropertyHandlerConfiguration config(TestInterface2V8Internal::n amedPropertyGetterCallback, TestInterface2V8Internal::namedPropertySetterCallbac k, TestInterface2V8Internal::namedPropertyQueryCallback, TestInterface2V8Interna l::namedPropertyDeleterCallback, TestInterface2V8Internal::namedPropertyEnumerat orCallback, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags )); 669 v8::NamedPropertyHandlerConfiguration config(TestInterface2V8Internal::n amedPropertyGetterCallback, TestInterface2V8Internal::namedPropertySetterCallbac k, TestInterface2V8Internal::namedPropertyQueryCallback, TestInterface2V8Interna l::namedPropertyDeleterCallback, TestInterface2V8Internal::namedPropertyEnumerat orCallback, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags ));
670 functionTemplate->InstanceTemplate()->SetHandler(config); 670 functionTemplate->InstanceTemplate()->SetHandler(config);
671 } 671 }
672 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestInterface2V8Internal::iter atorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 672 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator Configuration = { v8::Symbol::GetIterator, TestInterface2V8Internal::iteratorMet hodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
673 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration); 673 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration);
674 674
675 // Custom toString template 675 // Custom toString template
676 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 676 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
677 } 677 }
678 678
679 v8::Local<v8::FunctionTemplate> V8TestInterface2::domTemplate(v8::Isolate* isola te) 679 v8::Local<v8::FunctionTemplate> V8TestInterface2::domTemplate(v8::Isolate* isola te)
680 { 680 {
681 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface2Template); 681 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface2Template);
682 } 682 }
(...skipping 17 matching lines...) Expand all
700 { 700 {
701 scriptWrappable->toImpl<TestInterface2>()->ref(); 701 scriptWrappable->toImpl<TestInterface2>()->ref();
702 } 702 }
703 703
704 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable) 704 void V8TestInterface2::derefObject(ScriptWrappable* scriptWrappable)
705 { 705 {
706 scriptWrappable->toImpl<TestInterface2>()->deref(); 706 scriptWrappable->toImpl<TestInterface2>()->deref();
707 } 707 }
708 708
709 } // namespace blink 709 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface.cpp ('k') | Source/bindings/tests/results/core/V8TestInterface3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698