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

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: move handling of unnamed operations 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
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/core/css/WebKitCSSMatrix.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9467 matching lines...) Expand 10 before | Expand all | Expand 10 after
9568 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil lBeGarbageCollectedArrayArg); 9597 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil lBeGarbageCollectedArrayArg);
9569 } 9598 }
9570 9599
9571 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 9600 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
9572 { 9601 {
9573 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 9602 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
9574 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM ethod(info); 9603 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgM ethod(info);
9575 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 9604 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
9576 } 9605 }
9577 9606
9607 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
9608 {
9609 TestObject* impl = V8TestObject::toNative(info.Holder());
9610 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate() );
9611 }
9612
9613 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
9614 {
9615 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
9616 TestObjectV8Internal::toStringMethod(info);
9617 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
9618 }
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
9925 {"treatReturnedNullStringAsNullScalarValueStringMethod", TestObjectV8Interna l::treatReturnedNullStringAsNullScalarValueStringMethodMethodCallback, 0, 0}, 9968 {"treatReturnedNullStringAsNullScalarValueStringMethod", TestObjectV8Interna l::treatReturnedNullStringAsNullScalarValueStringMethodMethodCallback, 0, 0},
9926 {"treatReturnedNullStringAsUndefinedScalarValueStringMethod", TestObjectV8In ternal::treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallback, 0, 0}, 9969 {"treatReturnedNullStringAsUndefinedScalarValueStringMethod", TestObjectV8In ternal::treatReturnedNullStringAsUndefinedScalarValueStringMethodMethodCallback, 0, 0},
9927 {"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", TestObjectV8Interna l::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, 9970 {"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", TestObjectV8Interna l::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1},
9928 {"typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg", TestObjectV8In ternal::typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1}, 9971 {"typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg", TestObjectV8In ternal::typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1},
9929 {"typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", TestO bjectV8Internal::typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNull ArgMethodCallback, 0, 1}, 9972 {"typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", TestO bjectV8Internal::typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNull ArgMethodCallback, 0, 1},
9930 {"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", TestObjectV8Internal ::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback, 0, 2}, 9973 {"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", TestObjectV8Internal ::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback, 0, 2},
9931 {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal: :voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1}, 9974 {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal: :voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1},
9932 {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::vo idMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1}, 9975 {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::vo idMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1},
9933 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0 , 1}, 9976 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0 , 1},
9934 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1}, 9977 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1},
9978 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0},
9935 }; 9979 };
9936 9980
9937 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> funct ionTemplate, v8::Isolate* isolate) 9981 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> funct ionTemplate, v8::Isolate* isolate)
9938 { 9982 {
9939 functionTemplate->ReadOnlyPrototype(); 9983 functionTemplate->ReadOnlyPrototype();
9940 9984
9941 v8::Local<v8::Signature> defaultSignature; 9985 v8::Local<v8::Signature> defaultSignature;
9942 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFiel dCount, 9986 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFiel dCount,
9943 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), 9987 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes),
9944 V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors), 9988 V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors),
(...skipping 161 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
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/core/css/WebKitCSSMatrix.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698