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

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

Issue 131203009: Make event names of TRACE_EVENT_SAMPLING_STATE macros more descriptive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 79 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
80 { 80 {
81 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 81 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
82 v8SetReturnValueString(info, imp->readonlyStringAttribute(), info.GetIsolate ()); 82 v8SetReturnValueString(info, imp->readonlyStringAttribute(), info.GetIsolate ());
83 } 83 }
84 84
85 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 85 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
86 { 86 {
87 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 87 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
88 TestInterfaceEventConstructorV8Internal::readonlyStringAttributeAttributeGet ter(info); 88 TestInterfaceEventConstructorV8Internal::readonlyStringAttributeAttributeGet ter(info);
89 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 89 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
90 } 90 }
91 91
92 static void initializedByEventConstructorReadonlyStringAttributeAttributeGetter( const v8::PropertyCallbackInfo<v8::Value>& info) 92 static void initializedByEventConstructorReadonlyStringAttributeAttributeGetter( const v8::PropertyCallbackInfo<v8::Value>& info)
93 { 93 {
94 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 94 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
95 v8SetReturnValueString(info, imp->initializedByEventConstructorReadonlyStrin gAttribute(), info.GetIsolate()); 95 v8SetReturnValueString(info, imp->initializedByEventConstructorReadonlyStrin gAttribute(), info.GetIsolate());
96 } 96 }
97 97
98 static void initializedByEventConstructorReadonlyStringAttributeAttributeGetterC allback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 98 static void initializedByEventConstructorReadonlyStringAttributeAttributeGetterC allback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
99 { 99 {
100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
101 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyStringAttributeAttributeGetter(info); 101 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyStringAttributeAttributeGetter(info);
102 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 102 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
103 } 103 }
104 104
105 static void initializedByEventConstructorReadonlyAnyAttributeAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info) 105 static void initializedByEventConstructorReadonlyAnyAttributeAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info)
106 { 106 {
107 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 107 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
108 v8SetReturnValue(info, imp->initializedByEventConstructorReadonlyAnyAttribut e().v8Value()); 108 v8SetReturnValue(info, imp->initializedByEventConstructorReadonlyAnyAttribut e().v8Value());
109 } 109 }
110 110
111 static void initializedByEventConstructorReadonlyAnyAttributeAttributeGetterCall back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 111 static void initializedByEventConstructorReadonlyAnyAttributeAttributeGetterCall back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
112 { 112 {
113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
114 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyAnyAttributeAttributeGetter(info); 114 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyAnyAttributeAttributeGetter(info);
115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
116 } 116 }
117 117
118 static void initializedByEventConstructorReadonlyBooleanAttributeAttributeGetter (const v8::PropertyCallbackInfo<v8::Value>& info) 118 static void initializedByEventConstructorReadonlyBooleanAttributeAttributeGetter (const v8::PropertyCallbackInfo<v8::Value>& info)
119 { 119 {
120 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 120 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
121 v8SetReturnValueBool(info, imp->initializedByEventConstructorReadonlyBoolean Attribute()); 121 v8SetReturnValueBool(info, imp->initializedByEventConstructorReadonlyBoolean Attribute());
122 } 122 }
123 123
124 static void initializedByEventConstructorReadonlyBooleanAttributeAttributeGetter Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 124 static void initializedByEventConstructorReadonlyBooleanAttributeAttributeGetter Callback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
125 { 125 {
126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
127 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyBooleanAttributeAttributeGetter(info); 127 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyBooleanAttributeAttributeGetter(info);
128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
129 } 129 }
130 130
131 static void initializedByEventConstructorReadonlyLongAttributeAttributeGetter(co nst v8::PropertyCallbackInfo<v8::Value>& info) 131 static void initializedByEventConstructorReadonlyLongAttributeAttributeGetter(co nst v8::PropertyCallbackInfo<v8::Value>& info)
132 { 132 {
133 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 133 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
134 v8SetReturnValueInt(info, imp->initializedByEventConstructorReadonlyLongAttr ibute()); 134 v8SetReturnValueInt(info, imp->initializedByEventConstructorReadonlyLongAttr ibute());
135 } 135 }
136 136
137 static void initializedByEventConstructorReadonlyLongAttributeAttributeGetterCal lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 137 static void initializedByEventConstructorReadonlyLongAttributeAttributeGetterCal lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
138 { 138 {
139 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 139 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
140 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyLongAttributeAttributeGetter(info); 140 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyLongAttributeAttributeGetter(info);
141 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 141 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
142 } 142 }
143 143
144 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet ter(const v8::PropertyCallbackInfo<v8::Value>& info) 144 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet ter(const v8::PropertyCallbackInfo<v8::Value>& info)
145 { 145 {
146 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 146 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
147 RefPtr<Uint8Array> result = imp->initializedByEventConstructorReadonlyUint8A rrayAttribute(); 147 RefPtr<Uint8Array> result = imp->initializedByEventConstructorReadonlyUint8A rrayAttribute();
148 if (result && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.Get ReturnValue(), result.get())) 148 if (result && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.Get ReturnValue(), result.get()))
149 return; 149 return;
150 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate()); 150 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate());
151 if (!wrapper.IsEmpty()) { 151 if (!wrapper.IsEmpty()) {
152 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "initialize dByEventConstructorReadonlyUint8ArrayAttribute", wrapper); 152 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "initialize dByEventConstructorReadonlyUint8ArrayAttribute", wrapper);
153 v8SetReturnValue(info, wrapper); 153 v8SetReturnValue(info, wrapper);
154 } 154 }
155 } 155 }
156 156
157 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet terCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& in fo) 157 static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet terCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& in fo)
158 { 158 {
159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
160 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyUint8ArrayAttributeAttributeGetter(info); 160 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyUint8ArrayAttributeAttributeGetter(info);
161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
162 } 162 }
163 163
164 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr ibuteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 164 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr ibuteGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
165 { 165 {
166 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 166 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
167 RefPtr<TestInterfaceEmpty> result = imp->initializedByEventConstructorReadon lyTestInterfaceEmptyAttribute(); 167 RefPtr<TestInterfaceEmpty> result = imp->initializedByEventConstructorReadon lyTestInterfaceEmptyAttribute();
168 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>( info.GetReturnValue(), result.get())) 168 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>( info.GetReturnValue(), result.get()))
169 return; 169 return;
170 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate()); 170 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate());
171 if (!wrapper.IsEmpty()) { 171 if (!wrapper.IsEmpty()) {
172 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "initialize dByEventConstructorReadonlyTestInterfaceEmptyAttribute", wrapper); 172 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "initialize dByEventConstructorReadonlyTestInterfaceEmptyAttribute", wrapper);
173 v8SetReturnValue(info, wrapper); 173 v8SetReturnValue(info, wrapper);
174 } 174 }
175 } 175 }
176 176
177 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr ibuteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Va lue>& info) 177 static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr ibuteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Va lue>& info)
178 { 178 {
179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
180 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyTestInterfaceEmptyAttributeAttributeGetter(info); 180 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyTestInterfaceEmptyAttributeAttributeGetter(info);
181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
182 } 182 }
183 183
184 static void initializedByEventConstructorReadonlyTestInterfaceEmptyArrayAttribut eAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 184 static void initializedByEventConstructorReadonlyTestInterfaceEmptyArrayAttribut eAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
185 { 185 {
186 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 186 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
187 v8SetReturnValue(info, v8Array(imp->initializedByEventConstructorReadonlyTes tInterfaceEmptyArrayAttribute(), info.GetIsolate())); 187 v8SetReturnValue(info, v8Array(imp->initializedByEventConstructorReadonlyTes tInterfaceEmptyArrayAttribute(), info.GetIsolate()));
188 } 188 }
189 189
190 static void initializedByEventConstructorReadonlyTestInterfaceEmptyArrayAttribut eAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v 8::Value>& info) 190 static void initializedByEventConstructorReadonlyTestInterfaceEmptyArrayAttribut eAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v 8::Value>& info)
191 { 191 {
192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
193 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyTestInterfaceEmptyArrayAttributeAttributeGetter(info); 193 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyTestInterfaceEmptyArrayAttributeAttributeGetter(info);
194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
195 } 195 }
196 196
197 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri buteAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 197 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri buteAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
198 { 198 {
199 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 199 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
200 bool isNull = false; 200 bool isNull = false;
201 RefPtr<TestInterfaceEmpty> jsValue = imp->initializedByEventConstructorReado nlyNullableTestInterfaceEmptyAttribute(isNull); 201 RefPtr<TestInterfaceEmpty> jsValue = imp->initializedByEventConstructorReado nlyNullableTestInterfaceEmptyAttribute(isNull);
202 if (isNull) { 202 if (isNull) {
203 v8SetReturnValueNull(info); 203 v8SetReturnValueNull(info);
204 return; 204 return;
205 } 205 }
206 RefPtr<TestInterfaceEmpty> result = jsValue; 206 RefPtr<TestInterfaceEmpty> result = jsValue;
207 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>( info.GetReturnValue(), result.get())) 207 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>( info.GetReturnValue(), result.get()))
208 return; 208 return;
209 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate()); 209 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate());
210 if (!wrapper.IsEmpty()) { 210 if (!wrapper.IsEmpty()) {
211 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "initialize dByEventConstructorReadonlyNullableTestInterfaceEmptyAttribute", wrapper); 211 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "initialize dByEventConstructorReadonlyNullableTestInterfaceEmptyAttribute", wrapper);
212 v8SetReturnValue(info, wrapper); 212 v8SetReturnValue(info, wrapper);
213 } 213 }
214 } 214 }
215 215
216 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri buteAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf o<v8::Value>& info) 216 static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri buteAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInf o<v8::Value>& info)
217 { 217 {
218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
219 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyNullableTestInterfaceEmptyAttributeAttributeGetter(info); 219 TestInterfaceEventConstructorV8Internal::initializedByEventConstructorReadon lyNullableTestInterfaceEmptyAttributeAttributeGetter(info);
220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
221 } 221 }
222 222
223 static void deprecatedInitializedByEventConstructorReadonlyStringAttributeAttrib uteGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 223 static void deprecatedInitializedByEventConstructorReadonlyStringAttributeAttrib uteGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
224 { 224 {
225 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 225 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
226 v8SetReturnValueString(info, imp->deprecatedInitializedByEventConstructorRea donlyStringAttribute(), info.GetIsolate()); 226 v8SetReturnValueString(info, imp->deprecatedInitializedByEventConstructorRea donlyStringAttribute(), info.GetIsolate());
227 } 227 }
228 228
229 static void deprecatedInitializedByEventConstructorReadonlyStringAttributeAttrib uteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu e>& info) 229 static void deprecatedInitializedByEventConstructorReadonlyStringAttributeAttrib uteGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu e>& info)
230 { 230 {
231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
232 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::initializ edByEventConstructorReadonlyStringAttribute); 232 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::initializ edByEventConstructorReadonlyStringAttribute);
233 TestInterfaceEventConstructorV8Internal::deprecatedInitializedByEventConstru ctorReadonlyStringAttributeAttributeGetter(info); 233 TestInterfaceEventConstructorV8Internal::deprecatedInitializedByEventConstru ctorReadonlyStringAttributeAttributeGetter(info);
234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
235 } 235 }
236 236
237 static void implementedAsInitializedByEventConstructorReadonlyStringAttributeAtt ributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 237 static void implementedAsInitializedByEventConstructorReadonlyStringAttributeAtt ributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
238 { 238 {
239 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 239 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
240 v8SetReturnValueString(info, imp->implementedAsName(), info.GetIsolate()); 240 v8SetReturnValueString(info, imp->implementedAsName(), info.GetIsolate());
241 } 241 }
242 242
243 static void implementedAsInitializedByEventConstructorReadonlyStringAttributeAtt ributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::V alue>& info) 243 static void implementedAsInitializedByEventConstructorReadonlyStringAttributeAtt ributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::V alue>& info)
244 { 244 {
245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
246 TestInterfaceEventConstructorV8Internal::implementedAsInitializedByEventCons tructorReadonlyStringAttributeAttributeGetter(info); 246 TestInterfaceEventConstructorV8Internal::implementedAsInitializedByEventCons tructorReadonlyStringAttributeAttributeGetter(info);
247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
248 } 248 }
249 249
250 static void deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAt tributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info) 250 static void deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAt tributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
251 { 251 {
252 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder()); 252 TestInterfaceEventConstructor* imp = V8TestInterfaceEventConstructor::toNati ve(info.Holder());
253 v8SetReturnValueString(info, imp->deprecatedImplementedAsName(), info.GetIso late()); 253 v8SetReturnValueString(info, imp->deprecatedImplementedAsName(), info.GetIso late());
254 } 254 }
255 255
256 static void deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAt tributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallback Info<v8::Value>& info) 256 static void deprecatedImplementedAsInitializedByEventConstructorReadonlyStringAt tributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallback Info<v8::Value>& info)
257 { 257 {
258 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 258 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
259 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::initializ edByEventConstructorReadonlyStringAttribute); 259 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::initializ edByEventConstructorReadonlyStringAttribute);
260 TestInterfaceEventConstructorV8Internal::deprecatedImplementedAsInitializedB yEventConstructorReadonlyStringAttributeAttributeGetter(info); 260 TestInterfaceEventConstructorV8Internal::deprecatedImplementedAsInitializedB yEventConstructorReadonlyStringAttributeAttributeGetter(info);
261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
262 } 262 }
263 263
264 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 264 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
265 { 265 {
266 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceEventConstructor", info.Holder(), info.GetIsolate()); 266 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceEventConstructor", info.Holder(), info.GetIsolate());
267 if (info.Length() < 1) { 267 if (info.Length() < 1) {
268 exceptionState.throwTypeError("An event name must be provided."); 268 exceptionState.throwTypeError("An event name must be provided.");
269 exceptionState.throwIfNeeded(); 269 exceptionState.throwIfNeeded();
270 return; 270 return;
271 } 271 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 fromInternalPointer(object)->deref(); 437 fromInternalPointer(object)->deref();
438 } 438 }
439 439
440 template<> 440 template<>
441 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 441 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
442 { 442 {
443 return toV8(impl, creationContext, isolate); 443 return toV8(impl, creationContext, isolate);
444 } 444 }
445 445
446 } // namespace WebCore 446 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698