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

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

Issue 819853002: [bindings] Translate all assignments in bindings/templates to use Local<> in place of Handle<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 "V8TestInterfaceNode.h" 8 #include "V8TestInterfaceNode.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 18 matching lines...) Expand all
29 29
30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eNode.h. 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eNode.h.
31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
32 // bindings/core/v8/ScriptWrappable.h. 32 // bindings/core/v8/ScriptWrappable.h.
33 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod e::wrapperTypeInfo; 33 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod e::wrapperTypeInfo;
34 34
35 namespace TestInterfaceNodeV8Internal { 35 namespace TestInterfaceNodeV8Internal {
36 36
37 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info) 37 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
38 { 38 {
39 v8::Handle<v8::Object> holder = info.Holder(); 39 v8::Local<v8::Object> holder = info.Holder();
40 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 40 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
41 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); 41 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
42 } 42 }
43 43
44 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 44 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
45 { 45 {
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
47 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); 47 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info);
48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
49 } 49 }
50 50
51 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info) 51 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
52 { 52 {
53 v8::Handle<v8::Object> holder = info.Holder(); 53 v8::Local<v8::Object> holder = info.Holder();
54 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 54 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
55 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 55 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
56 impl->setStringAttribute(cppValue); 56 impl->setStringAttribute(cppValue);
57 } 57 }
58 58
59 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 59 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
60 { 60 {
61 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 61 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
62 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(v8Value, info); 62 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(v8Value, info);
63 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 63 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
64 } 64 }
65 65
66 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert yCallbackInfo<v8::Value>& info) 66 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert yCallbackInfo<v8::Value>& info)
67 { 67 {
68 v8::Handle<v8::Object> holder = info.Holder(); 68 v8::Local<v8::Object> holder = info.Holder();
69 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 69 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
70 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri bute()), impl); 70 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri bute()), impl);
71 } 71 }
72 72
73 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 73 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
74 { 74 {
75 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 75 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
76 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet ter(info); 76 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet ter(info);
77 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 77 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
78 } 78 }
79 79
80 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 80 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
81 { 81 {
82 v8::Handle<v8::Object> holder = info.Holder(); 82 v8::Local<v8::Object> holder = info.Holder();
83 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 83 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
84 EventListener* cppValue(impl->eventHandlerAttribute()); 84 EventListener* cppValue(impl->eventHandlerAttribute());
85 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v 8::Value>(v8::Null(info.GetIsolate()))); 85 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v 8::Value>(v8::Null(info.GetIsolate())));
86 } 86 }
87 87
88 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 88 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
89 { 89 {
90 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 90 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
91 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); 91 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info);
92 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 92 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
93 } 93 }
94 94
95 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info) 95 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
96 { 96 {
97 v8::Handle<v8::Object> holder = info.Holder(); 97 v8::Local<v8::Object> holder = info.Holder();
98 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 98 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
99 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); 99 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate));
100 } 100 }
101 101
102 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 102 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
103 { 103 {
104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
105 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, i nfo); 105 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, i nfo);
106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
107 } 107 }
108 108
109 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c onst v8::PropertyCallbackInfo<v8::Value>& info) 109 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c onst v8::PropertyCallbackInfo<v8::Value>& info)
110 { 110 {
111 v8::Handle<v8::Object> holder = info.Holder(); 111 v8::Local<v8::Object> holder = info.Holder();
112 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 112 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
113 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt erfaceEmptyAttribute()), impl); 113 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt erfaceEmptyAttribute()), impl);
114 } 114 }
115 115
116 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 116 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
117 { 117 {
118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
119 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetter(info); 119 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetter(info);
120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
121 } 121 }
122 122
123 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) 123 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
124 { 124 {
125 v8::Handle<v8::Object> holder = info.Holder(); 125 v8::Local<v8::Object> holder = info.Holder();
126 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 126 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
127 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonl yTestInterfaceEmptyAttribute())); 127 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonl yTestInterfaceEmptyAttribute()));
128 } 128 }
129 129
130 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val ue>& info) 130 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val ue>& info)
131 { 131 {
132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
133 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetterForMainWorld(info); 133 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri buteAttributeGetterForMainWorld(info);
134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
135 } 135 }
136 136
137 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 137 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
138 { 138 {
139 v8::Handle<v8::Object> holder = info.Holder(); 139 v8::Local<v8::Object> holder = info.Holder();
140 Element* impl = V8Element::toImpl(holder); 140 Element* impl = V8Element::toImpl(holder);
141 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring attributeAttr), info.GetIsolate()); 141 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring attributeAttr), info.GetIsolate());
142 } 142 }
143 143
144 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 144 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
145 { 145 {
146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
147 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); 147 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info);
148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
149 } 149 }
150 150
151 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 151 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
152 { 152 {
153 v8::Handle<v8::Object> holder = info.Holder(); 153 v8::Local<v8::Object> holder = info.Holder();
154 Element* impl = V8Element::toImpl(holder); 154 Element* impl = V8Element::toImpl(holder);
155 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 155 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
156 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); 156 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue);
157 } 157 }
158 158
159 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 159 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
160 { 160 {
161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
162 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 162 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
163 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value, info); 163 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value, info);
164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
165 } 165 }
166 166
167 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 167 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
168 { 168 {
169 v8::Handle<v8::Object> holder = info.Holder(); 169 v8::Local<v8::Object> holder = info.Holder();
170 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 170 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
171 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri ngattributeAttr), info.GetIsolate()); 171 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri ngattributeAttr), info.GetIsolate());
172 } 172 }
173 173
174 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 174 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
175 { 175 {
176 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 176 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
177 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); 177 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info);
178 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 178 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
179 } 179 }
180 180
181 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info) 181 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
182 { 182 {
183 v8::Handle<v8::Object> holder = info.Holder(); 183 v8::Local<v8::Object> holder = info.Holder();
184 Element* impl = V8Element::toImpl(holder); 184 Element* impl = V8Element::toImpl(holder);
185 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 185 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
186 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); 186 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue);
187 } 187 }
188 188
189 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 189 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
190 { 190 {
191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
192 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 192 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
193 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu e, info); 193 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu e, info);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 339
340 void V8TestInterfaceNode::derefObject(ScriptWrappable* scriptWrappable) 340 void V8TestInterfaceNode::derefObject(ScriptWrappable* scriptWrappable)
341 { 341 {
342 #if !ENABLE(OILPAN) 342 #if !ENABLE(OILPAN)
343 scriptWrappable->toImpl<TestInterfaceNode>()->deref(); 343 scriptWrappable->toImpl<TestInterfaceNode>()->deref();
344 #endif 344 #endif
345 } 345 }
346 346
347 } // namespace blink 347 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698