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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 1667653002: V8-binding: Use v8::Template::SetNativeDataProperty without setter for [Replaceable]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved the [LenientThis] test to http/tests/. Created 4 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. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "V8TestInterface5.h" 7 #include "V8TestInterface5.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 22 matching lines...) Expand all
33 #pragma clang diagnostic pop 33 #pragma clang diagnostic pop
34 #endif 34 #endif
35 35
36 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac e5Implementation.h. 36 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac e5Implementation.h.
37 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 37 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
38 // bindings/core/v8/ScriptWrappable.h. 38 // bindings/core/v8/ScriptWrappable.h.
39 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI nterface5::wrapperTypeInfo; 39 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI nterface5::wrapperTypeInfo;
40 40
41 namespace TestInterface5ImplementationV8Internal { 41 namespace TestInterface5ImplementationV8Internal {
42 42
43 template<class CallbackInfo>
44 static bool TestInterface5ImplementationCreateDataProperty(v8::Local<v8::Name> n ame, v8::Local<v8::Value> v8Value, const CallbackInfo& info)
45 {
46 ASSERT(info.This()->IsObject());
47 return v8CallBoolean(v8::Local<v8::Object>::Cast(info.This())->CreateDataPro perty(info.GetIsolate()->GetCurrentContext(), name, v8Value));
48 }
49
50 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 43 static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
51 { 44 {
52 v8::Local<v8::Object> holder = info.Holder(); 45 v8::Local<v8::Object> holder = info.Holder();
53 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 46 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
54 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 47 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
55 } 48 }
56 49
57 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 50 static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
58 { 51 {
59 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info); 52 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette r(info);
(...skipping 12 matching lines...) Expand all
72 } 65 }
73 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); 66 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
74 } 67 }
75 68
76 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 69 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
77 { 70 {
78 v8::Local<v8::Value> v8Value = info[0]; 71 v8::Local<v8::Value> v8Value = info[0];
79 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info); 72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info);
80 } 73 }
81 74
82 static void testInterfaceConstructorAttributeAttributeSetter(v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info)
83 {
84 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "test InterfaceConstructorAttribute");
85 TestInterface5ImplementationCreateDataProperty(propertyName, v8Value, info);
86 }
87
88 static void testInterfaceConstructorAttributeAttributeSetterCallback(v8::Local<v 8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
89 {
90 TestInterface5ImplementationV8Internal::testInterfaceConstructorAttributeAtt ributeSetter(v8Value, info);
91 }
92
93 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) 75 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info)
94 { 76 {
95 v8::Local<v8::Object> holder = info.Holder(); 77 v8::Local<v8::Object> holder = info.Holder();
96 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 78 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
97 v8SetReturnValue(info, impl->doubleAttribute()); 79 v8SetReturnValue(info, impl->doubleAttribute());
98 } 80 }
99 81
100 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 82 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
101 { 83 {
102 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ; 84 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ;
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 783 }
802 } 784 }
803 785
804 // Suppress warning: global constructors, because AttributeConfiguration is triv ial 786 // Suppress warning: global constructors, because AttributeConfiguration is triv ial
805 // and does not depend on another global objects. 787 // and does not depend on another global objects.
806 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 788 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
807 #pragma clang diagnostic push 789 #pragma clang diagnostic push
808 #pragma clang diagnostic ignored "-Wglobal-constructors" 790 #pragma clang diagnostic ignored "-Wglobal-constructors"
809 #endif 791 #endif
810 const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attributes[] = { 792 const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attributes[] = {
811 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance, V8DOMConfiguration::CheckHolder}, 793 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), static_cast<v 8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOM Configuration::CheckHolder},
812 }; 794 };
813 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 795 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
814 #pragma clang diagnostic pop 796 #pragma clang diagnostic pop
815 #endif 797 #endif
816 798
817 const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors[] = { 799 const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors[] = {
818 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 800 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
819 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute> (v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto type, V8DOMConfiguration::CheckHolder}, 801 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute> (v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto type, V8DOMConfiguration::CheckHolder},
820 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8 ::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp e, V8DOMConfiguration::CheckHolder}, 802 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8 ::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp e, V8DOMConfiguration::CheckHolder},
821 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 803 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 { 920 {
939 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 921 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
940 } 922 }
941 923
942 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 924 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
943 { 925 {
944 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 926 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
945 } 927 }
946 928
947 } // namespace blink 929 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698