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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp

Issue 2430223006: Bindings: Rebaseline run-bindings-tests results (Closed)
Patch Set: Created 4 years, 2 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 // clang-format off 7 // clang-format off
8 #include "V8TestInterfaceGarbageCollected.h" 8 #include "V8TestInterfaceGarbageCollected.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 arg = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate() , info[0]); 106 arg = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate() , info[0]);
107 if (!arg) { 107 if (!arg) {
108 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("func", "TestInterfaceGarbageCollected", "parameter 1 is not of t ype 'TestInterfaceGarbageCollected'.")); 108 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToExecute("func", "TestInterfaceGarbageCollected", "parameter 1 is not of t ype 'TestInterfaceGarbageCollected'."));
109 109
110 return; 110 return;
111 } 111 }
112 112
113 impl->func(arg); 113 impl->func(arg);
114 } 114 }
115 115
116 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 116 void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
117 { 117 {
118 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); 118 TestInterfaceGarbageCollectedV8Internal::funcMethod(info);
119 } 119 }
120 120
121 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 121 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
122 { 122 {
123 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "keys"); 123 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "keys");
124 124
125 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 125 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
126 126
127 ScriptState* scriptState = ScriptState::forReceiverObject(info); 127 ScriptState* scriptState = ScriptState::forReceiverObject(info);
128 128
129 Iterator* result = impl->keysForBinding(scriptState, exceptionState); 129 Iterator* result = impl->keysForBinding(scriptState, exceptionState);
130 if (exceptionState.hadException()) { 130 if (exceptionState.hadException()) {
131 return; 131 return;
132 } 132 }
133 v8SetReturnValue(info, result); 133 v8SetReturnValue(info, result);
134 } 134 }
135 135
136 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 136 void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
137 { 137 {
138 TestInterfaceGarbageCollectedV8Internal::keysMethod(info); 138 TestInterfaceGarbageCollectedV8Internal::keysMethod(info);
139 } 139 }
140 140
141 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 141 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
142 { 142 {
143 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "values"); 143 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "values");
144 144
145 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 145 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
146 146
147 ScriptState* scriptState = ScriptState::forReceiverObject(info); 147 ScriptState* scriptState = ScriptState::forReceiverObject(info);
148 148
149 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); 149 Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
150 if (exceptionState.hadException()) { 150 if (exceptionState.hadException()) {
151 return; 151 return;
152 } 152 }
153 v8SetReturnValue(info, result); 153 v8SetReturnValue(info, result);
154 } 154 }
155 155
156 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 156 void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
157 { 157 {
158 TestInterfaceGarbageCollectedV8Internal::valuesMethod(info); 158 TestInterfaceGarbageCollectedV8Internal::valuesMethod(info);
159 } 159 }
160 160
161 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 161 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
162 { 162 {
163 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "entries"); 163 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "entries");
164 164
165 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 165 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
166 166
167 ScriptState* scriptState = ScriptState::forReceiverObject(info); 167 ScriptState* scriptState = ScriptState::forReceiverObject(info);
168 168
169 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); 169 Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
170 if (exceptionState.hadException()) { 170 if (exceptionState.hadException()) {
171 return; 171 return;
172 } 172 }
173 v8SetReturnValue(info, result); 173 v8SetReturnValue(info, result);
174 } 174 }
175 175
176 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 176 void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
177 { 177 {
178 TestInterfaceGarbageCollectedV8Internal::entriesMethod(info); 178 TestInterfaceGarbageCollectedV8Internal::entriesMethod(info);
179 } 179 }
180 180
181 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 181 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
182 { 182 {
183 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "forEach"); 183 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "forEach");
184 184
185 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 185 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
186 186
(...skipping 14 matching lines...) Expand all
201 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); 201 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]);
202 202
203 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); 203 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
204 204
205 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState); 205 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState);
206 if (exceptionState.hadException()) { 206 if (exceptionState.hadException()) {
207 return; 207 return;
208 } 208 }
209 } 209 }
210 210
211 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 211 void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
212 { 212 {
213 TestInterfaceGarbageCollectedV8Internal::forEachMethod(info); 213 TestInterfaceGarbageCollectedV8Internal::forEachMethod(info);
214 } 214 }
215 215
216 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 216 static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
217 { 217 {
218 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "has"); 218 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "has");
219 219
220 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 220 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
221 221
222 ScriptState* scriptState = ScriptState::forReceiverObject(info); 222 ScriptState* scriptState = ScriptState::forReceiverObject(info);
223 223
224 if (UNLIKELY(info.Length() < 1)) { 224 if (UNLIKELY(info.Length() < 1)) {
225 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 225 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
226 return; 226 return;
227 } 227 }
228 228
229 V8StringResource<> value; 229 V8StringResource<> value;
230 value = info[0]; 230 value = info[0];
231 if (!value.prepare()) 231 if (!value.prepare())
232 return; 232 return;
233 233
234 bool result = impl->hasForBinding(scriptState, value, exceptionState); 234 bool result = impl->hasForBinding(scriptState, value, exceptionState);
235 if (exceptionState.hadException()) { 235 if (exceptionState.hadException()) {
236 return; 236 return;
237 } 237 }
238 v8SetReturnValueBool(info, result); 238 v8SetReturnValueBool(info, result);
239 } 239 }
240 240
241 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 241 void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
242 { 242 {
243 TestInterfaceGarbageCollectedV8Internal::hasMethod(info); 243 TestInterfaceGarbageCollectedV8Internal::hasMethod(info);
244 } 244 }
245 245
246 static void addMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 246 static void addMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
247 { 247 {
248 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "add"); 248 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "add");
249 249
250 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 250 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
251 251
252 ScriptState* scriptState = ScriptState::forReceiverObject(info); 252 ScriptState* scriptState = ScriptState::forReceiverObject(info);
253 253
254 if (UNLIKELY(info.Length() < 1)) { 254 if (UNLIKELY(info.Length() < 1)) {
255 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 255 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
256 return; 256 return;
257 } 257 }
258 258
259 V8StringResource<> value; 259 V8StringResource<> value;
260 value = info[0]; 260 value = info[0];
261 if (!value.prepare()) 261 if (!value.prepare())
262 return; 262 return;
263 263
264 TestInterfaceGarbageCollected* result = impl->addForBinding(scriptState, val ue, exceptionState); 264 TestInterfaceGarbageCollected* result = impl->addForBinding(scriptState, val ue, exceptionState);
265 if (exceptionState.hadException()) { 265 if (exceptionState.hadException()) {
266 return; 266 return;
267 } 267 }
268 v8SetReturnValue(info, result); 268 v8SetReturnValue(info, result);
269 } 269 }
270 270
271 static void addMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 271 void addMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
272 { 272 {
273 TestInterfaceGarbageCollectedV8Internal::addMethod(info); 273 TestInterfaceGarbageCollectedV8Internal::addMethod(info);
274 } 274 }
275 275
276 static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 276 static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
277 { 277 {
278 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "clear"); 278 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "clear");
279 279
280 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 280 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
281 281
282 ScriptState* scriptState = ScriptState::forReceiverObject(info); 282 ScriptState* scriptState = ScriptState::forReceiverObject(info);
283 283
284 impl->clearForBinding(scriptState, exceptionState); 284 impl->clearForBinding(scriptState, exceptionState);
285 if (exceptionState.hadException()) { 285 if (exceptionState.hadException()) {
286 return; 286 return;
287 } 287 }
288 } 288 }
289 289
290 static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 290 void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
291 { 291 {
292 TestInterfaceGarbageCollectedV8Internal::clearMethod(info); 292 TestInterfaceGarbageCollectedV8Internal::clearMethod(info);
293 } 293 }
294 294
295 static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 295 static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
296 { 296 {
297 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "delete"); 297 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "delete");
298 298
299 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 299 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
300 300
301 ScriptState* scriptState = ScriptState::forReceiverObject(info); 301 ScriptState* scriptState = ScriptState::forReceiverObject(info);
302 302
303 if (UNLIKELY(info.Length() < 1)) { 303 if (UNLIKELY(info.Length() < 1)) {
304 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 304 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
305 return; 305 return;
306 } 306 }
307 307
308 V8StringResource<> value; 308 V8StringResource<> value;
309 value = info[0]; 309 value = info[0];
310 if (!value.prepare()) 310 if (!value.prepare())
311 return; 311 return;
312 312
313 bool result = impl->deleteForBinding(scriptState, value, exceptionState); 313 bool result = impl->deleteForBinding(scriptState, value, exceptionState);
314 if (exceptionState.hadException()) { 314 if (exceptionState.hadException()) {
315 return; 315 return;
316 } 316 }
317 v8SetReturnValueBool(info, result); 317 v8SetReturnValueBool(info, result);
318 } 318 }
319 319
320 static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 320 void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
321 { 321 {
322 TestInterfaceGarbageCollectedV8Internal::deleteMethod(info); 322 TestInterfaceGarbageCollectedV8Internal::deleteMethod(info);
323 } 323 }
324 324
325 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 325 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
326 { 326 {
327 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "iterator"); 327 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceGarbageCollected", "iterator");
328 328
329 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder()); 329 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp l(info.Holder());
330 330
331 ScriptState* scriptState = ScriptState::forReceiverObject(info); 331 ScriptState* scriptState = ScriptState::forReceiverObject(info);
332 332
333 Iterator* result = impl->iterator(scriptState, exceptionState); 333 Iterator* result = impl->iterator(scriptState, exceptionState);
334 if (exceptionState.hadException()) { 334 if (exceptionState.hadException()) {
335 return; 335 return;
336 } 336 }
337 v8SetReturnValue(info, result); 337 v8SetReturnValue(info, result);
338 } 338 }
339 339
340 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 340 void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
341 { 341 {
342 TestInterfaceGarbageCollectedV8Internal::iteratorMethod(info); 342 TestInterfaceGarbageCollectedV8Internal::iteratorMethod(info);
343 } 343 }
344 344
345 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 345 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
346 { 346 {
347 if (UNLIKELY(info.Length() < 1)) { 347 if (UNLIKELY(info.Length() < 1)) {
348 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToConstruct("TestInterfaceGarbageCollected", ExceptionMessages::notEnoughAr guments(1, info.Length()))); 348 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToConstruct("TestInterfaceGarbageCollected", ExceptionMessages::notEnoughAr guments(1, info.Length())));
349 return; 349 return;
350 } 350 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 { 428 {
429 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 429 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
430 } 430 }
431 431
432 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toImplWithTypeCh eck(v8::Isolate* isolate, v8::Local<v8::Value> value) 432 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toImplWithTypeCh eck(v8::Isolate* isolate, v8::Local<v8::Value> value)
433 { 433 {
434 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr; 434 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr;
435 } 435 }
436 436
437 } // namespace blink 437 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698