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

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

Issue 345393004: IDL: Support 'stringifier' keyword (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 "config.h" 7 #include "config.h"
8 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/V8HTMLCollection.h" 10 #include "bindings/core/v8/V8HTMLCollection.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 WebCore::initializeScriptWrappableForInterface(object); 81 WebCore::initializeScriptWrappableForInterface(object);
82 } 82 }
83 83
84 namespace WebCore { 84 namespace WebCore {
85 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T estObject::domTemplate, V8TestObject::derefObject, 0, 0, 0, V8TestObject::instal lPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject }; 85 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T estObject::domTemplate, V8TestObject::derefObject, 0, 0, 0, V8TestObject::instal lPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject };
86 86
87 namespace TestObjectV8Internal { 87 namespace TestObjectV8Internal {
88 88
89 template <typename T> void V8_USE(T) { } 89 template <typename T> void V8_USE(T) { }
90 90
91 static void stringifierAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
92 {
93 v8::Handle<v8::Object> holder = info.Holder();
94 TestObject* impl = V8TestObject::toNative(holder);
95 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() );
96 }
97
98 static void stringifierAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
99 {
100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
101 TestObjectV8Internal::stringifierAttributeAttributeGetter(info);
102 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
103 }
104
105 static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info)
106 {
107 v8::Handle<v8::Object> holder = info.Holder();
108 TestObject* impl = V8TestObject::toNative(holder);
109 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
110 impl->setStringifierAttribute(cppValue);
111 }
112
113 static void stringifierAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
114 {
115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
116 TestObjectV8Internal::stringifierAttributeAttributeSetter(v8Value, info);
117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
118 }
119
91 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 120 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
92 { 121 {
93 v8::Handle<v8::Object> holder = info.Holder(); 122 v8::Handle<v8::Object> holder = info.Holder();
94 TestObject* impl = V8TestObject::toNative(holder); 123 TestObject* impl = V8TestObject::toNative(holder);
95 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat e()); 124 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat e());
96 } 125 }
97 126
98 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 127 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
99 { 128 {
100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
(...skipping 4678 matching lines...) Expand 10 before | Expand all | Expand 10 after
4779 { 4808 {
4780 if (info.This()->IsObject()) 4809 if (info.This()->IsObject())
4781 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); 4810 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
4782 } 4811 }
4783 4812
4784 static void TestObjectForceSetAttributeOnThisCallback(v8::Local<v8::String> name , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 4813 static void TestObjectForceSetAttributeOnThisCallback(v8::Local<v8::String> name , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4785 { 4814 {
4786 TestObjectV8Internal::TestObjectForceSetAttributeOnThis(name, v8Value, info) ; 4815 TestObjectV8Internal::TestObjectForceSetAttributeOnThis(name, v8Value, info) ;
4787 } 4816 }
4788 4817
4818 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4819 {
4820 TestObject* impl = V8TestObject::toNative(info.Holder());
4821 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() );
4822 }
4823
4824 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4825 {
4826 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4827 TestObjectV8Internal::toStringMethod(info);
4828 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4829 }
4830
4789 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 4831 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4790 { 4832 {
4791 TestObject* impl = V8TestObject::toNative(info.Holder()); 4833 TestObject* impl = V8TestObject::toNative(info.Holder());
4792 impl->voidMethod(); 4834 impl->voidMethod();
4793 } 4835 }
4794 4836
4795 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4837 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4796 { 4838 {
4797 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4798 TestObjectV8Internal::voidMethodMethod(info); 4840 TestObjectV8Internal::voidMethodMethod(info);
(...skipping 4772 matching lines...) Expand 10 before | Expand all | Expand 10 after
9571 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 9613 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
9572 { 9614 {
9573 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 9615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
9574 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM ethod(info); 9616 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM ethod(info);
9575 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 9617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
9576 } 9618 }
9577 9619
9578 } // namespace TestObjectV8Internal 9620 } // namespace TestObjectV8Internal
9579 9621
9580 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[] = { 9622 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[] = {
9623 {"stringifierAttribute", TestObjectV8Internal::stringifierAttributeAttribute GetterCallback, TestObjectV8Internal::stringifierAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */},
9581 {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAtt ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 9624 {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAtt ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
9582 {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestIn terfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */}, 9625 {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestIn terfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */},
9583 {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttribu teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 9626 {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttribu teGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
9584 {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback , TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , 0 /* on instance */}, 9627 {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback , TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , 0 /* on instance */},
9585 {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCall back, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */}, 9628 {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCall back, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */},
9586 {"byteStringAttribute", TestObjectV8Internal::byteStringAttributeAttributeGe tterCallback, TestObjectV8Internal::byteStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */}, 9629 {"byteStringAttribute", TestObjectV8Internal::byteStringAttributeAttributeGe tterCallback, TestObjectV8Internal::byteStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */},
9587 {"scalarValueStringAttribute", TestObjectV8Internal::scalarValueStringAttrib uteAttributeGetterCallback, TestObjectV8Internal::scalarValueStringAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 9630 {"scalarValueStringAttribute", TestObjectV8Internal::scalarValueStringAttrib uteAttributeGetterCallback, TestObjectV8Internal::scalarValueStringAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
9588 {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttribu teGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCall back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop ertyAttribute>(v8::None), 0 /* on instance */}, 9631 {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttribu teGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCall back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop ertyAttribute>(v8::None), 0 /* on instance */},
9589 {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCa llback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */}, 9632 {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCa llback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
9590 {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback , TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , 0 /* on instance */}, 9633 {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback , TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , 0 /* on instance */},
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
9732 {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testI nterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */}, 9775 {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testI nterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */},
9733 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */}, 9776 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */},
9734 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal: :testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v 8::PropertyAttribute>(v8::None), 0 /* on instance */}, 9777 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal: :testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v 8::PropertyAttribute>(v8::None), 0 /* on instance */},
9735 }; 9778 };
9736 9779
9737 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = { 9780 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = {
9738 {"exposeJSAccessorsLongAttribute", TestObjectV8Internal::exposeJSAccessorsLo ngAttributeAttributeGetterCallback, TestObjectV8Internal::exposeJSAccessorsLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None)}, 9781 {"exposeJSAccessorsLongAttribute", TestObjectV8Internal::exposeJSAccessorsLo ngAttributeAttributeGetterCallback, TestObjectV8Internal::exposeJSAccessorsLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None)},
9739 }; 9782 };
9740 9783
9741 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { 9784 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
9785 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0},
9742 {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0}, 9786 {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0},
9743 {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0}, 9787 {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0},
9744 {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0}, 9788 {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0},
9745 {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0 , 0}, 9789 {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0 , 0},
9746 {"scalarValueStringMethod", TestObjectV8Internal::scalarValueStringMethodMet hodCallback, 0, 0}, 9790 {"scalarValueStringMethod", TestObjectV8Internal::scalarValueStringMethodMet hodCallback, 0, 0},
9747 {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMet hodMethodCallback, 0, 0}, 9791 {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMet hodMethodCallback, 0, 0},
9748 {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0}, 9792 {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0},
9749 {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0}, 9793 {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0},
9750 {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0}, 9794 {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0},
9751 {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0}, 9795 {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0},
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
10106 fromInternalPointer(object)->deref(); 10150 fromInternalPointer(object)->deref();
10107 } 10151 }
10108 10152
10109 template<> 10153 template<>
10110 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 10154 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
10111 { 10155 {
10112 return toV8(impl, creationContext, isolate); 10156 return toV8(impl, creationContext, isolate);
10113 } 10157 }
10114 10158
10115 } // namespace WebCore 10159 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698