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

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

Issue 2301993002: binding: Introduces ExceptionToPromiseScope. (Closed)
Patch Set: Addressed review comments (rename, empty line). Created 4 years, 3 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 "V8TestInterfaceNode.h" 7 #include "V8TestInterfaceNode.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/GeneratedCodeHelper.h" 10 #include "bindings/core/v8/GeneratedCodeHelper.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 void reflectUrlStringAttributeAttributeSetterCallback(const v8::FunctionCallback Info<v8::Value>& info) 224 void reflectUrlStringAttributeAttributeSetterCallback(const v8::FunctionCallback Info<v8::Value>& info)
225 { 225 {
226 v8::Local<v8::Value> v8Value = info[0]; 226 v8::Local<v8::Value> v8Value = info[0];
227 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 227 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
228 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu e, info); 228 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu e, info);
229 } 229 }
230 230
231 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 231 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
232 { 232 {
233 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder()); 233 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
234
234 v8SetReturnValueFast(info, impl->testInterfaceEmptyMethod(), impl); 235 v8SetReturnValueFast(info, impl->testInterfaceEmptyMethod(), impl);
235 } 236 }
236 237
237 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 238 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
238 { 239 {
239 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info); 240 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info);
240 } 241 }
241 242
242 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 243 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
243 { 244 {
244 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder()); 245 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
246
245 v8SetReturnValueFast(info, impl->perWorldBindingsTestInterfaceEmptyMethod(), impl); 247 v8SetReturnValueFast(info, impl->perWorldBindingsTestInterfaceEmptyMethod(), impl);
246 } 248 }
247 249
248 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 250 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
249 { 251 {
250 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod( info); 252 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod( info);
251 } 253 }
252 254
253 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info) 255 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info)
254 { 256 {
255 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder()); 257 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
258
256 v8SetReturnValueForMainWorld(info, impl->perWorldBindingsTestInterfaceEmptyM ethod()); 259 v8SetReturnValueForMainWorld(info, impl->perWorldBindingsTestInterfaceEmptyM ethod());
257 } 260 }
258 261
259 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info) 262 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info)
260 { 263 {
261 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF orMainWorld(info); 264 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF orMainWorld(info);
262 } 265 }
263 266
264 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con st v8::FunctionCallbackInfo<v8::Value>& info) 267 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con st v8::FunctionCallbackInfo<v8::Value>& info)
265 { 268 {
266 ExceptionState exceptionState(ExceptionState::ExecutionContext, "perWorldBin dingsTestInterfaceEmptyMethodOptionalBooleanArg", "TestInterfaceNode", info.Hold er(), info.GetIsolate()); 269 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceNode", "perWorldBindingsTestInterfaceEmptyMethodOptionalBoo leanArg");
270
267 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder()); 271 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
272
268 bool optionalBooleanArgument; 273 bool optionalBooleanArgument;
269 { 274 int numArgsPassed = info.Length();
270 int numArgsPassed = info.Length(); 275 while (numArgsPassed > 0) {
271 while (numArgsPassed > 0) { 276 if (!info[numArgsPassed - 1]->IsUndefined())
272 if (!info[numArgsPassed - 1]->IsUndefined()) 277 break;
273 break; 278 --numArgsPassed;
274 --numArgsPassed;
275 }
276 if (UNLIKELY(numArgsPassed <= 0)) {
277 v8SetReturnValueFast(info, impl->perWorldBindingsTestInterfaceEmptyM ethodOptionalBooleanArg(), impl);
278 return;
279 }
280 optionalBooleanArgument = toBoolean(info.GetIsolate(), info[0], exceptio nState);
281 if (exceptionState.hadException())
282 return;
283 } 279 }
280 if (UNLIKELY(numArgsPassed <= 0)) {
281 v8SetReturnValueFast(info, impl->perWorldBindingsTestInterfaceEmptyMetho dOptionalBooleanArg(), impl);
282 return;
283 }
284 optionalBooleanArgument = toBoolean(info.GetIsolate(), info[0], exceptionSta te);
285 if (exceptionState.hadException())
286 return;
287
284 v8SetReturnValueFast(info, impl->perWorldBindingsTestInterfaceEmptyMethodOpt ionalBooleanArg(optionalBooleanArgument), impl); 288 v8SetReturnValueFast(info, impl->perWorldBindingsTestInterfaceEmptyMethodOpt ionalBooleanArg(optionalBooleanArgument), impl);
285 } 289 }
286 290
287 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info) 291 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info)
288 { 292 {
289 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethod(info); 293 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethod(info);
290 } 294 }
291 295
292 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 296 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
293 { 297 {
294 ExceptionState exceptionState(ExceptionState::ExecutionContext, "perWorldBin dingsTestInterfaceEmptyMethodOptionalBooleanArg", "TestInterfaceNode", info.Hold er(), info.GetIsolate()); 298 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo ntext, "TestInterfaceNode", "perWorldBindingsTestInterfaceEmptyMethodOptionalBoo leanArg");
299
295 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder()); 300 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder());
301
296 bool optionalBooleanArgument; 302 bool optionalBooleanArgument;
297 { 303 int numArgsPassed = info.Length();
298 int numArgsPassed = info.Length(); 304 while (numArgsPassed > 0) {
299 while (numArgsPassed > 0) { 305 if (!info[numArgsPassed - 1]->IsUndefined())
300 if (!info[numArgsPassed - 1]->IsUndefined()) 306 break;
301 break; 307 --numArgsPassed;
302 --numArgsPassed;
303 }
304 if (UNLIKELY(numArgsPassed <= 0)) {
305 v8SetReturnValueForMainWorld(info, impl->perWorldBindingsTestInterfa ceEmptyMethodOptionalBooleanArg());
306 return;
307 }
308 optionalBooleanArgument = toBoolean(info.GetIsolate(), info[0], exceptio nState);
309 if (exceptionState.hadException())
310 return;
311 } 308 }
309 if (UNLIKELY(numArgsPassed <= 0)) {
310 v8SetReturnValueForMainWorld(info, impl->perWorldBindingsTestInterfaceEm ptyMethodOptionalBooleanArg());
311 return;
312 }
313 optionalBooleanArgument = toBoolean(info.GetIsolate(), info[0], exceptionSta te);
314 if (exceptionState.hadException())
315 return;
316
312 v8SetReturnValueForMainWorld(info, impl->perWorldBindingsTestInterfaceEmptyM ethodOptionalBooleanArg(optionalBooleanArgument)); 317 v8SetReturnValueForMainWorld(info, impl->perWorldBindingsTestInterfaceEmptyM ethodOptionalBooleanArg(optionalBooleanArgument));
313 } 318 }
314 319
315 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 320 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
316 { 321 {
317 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethodForMainWorld(info); 322 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethodForMainWorld(info);
318 } 323 }
319 324
320 } // namespace TestInterfaceNodeV8Internal 325 } // namespace TestInterfaceNodeV8Internal
321 326
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 { 369 {
365 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 370 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
366 } 371 }
367 372
368 TestInterfaceNode* V8TestInterfaceNode::toImplWithTypeCheck(v8::Isolate* isolate , v8::Local<v8::Value> value) 373 TestInterfaceNode* V8TestInterfaceNode::toImplWithTypeCheck(v8::Isolate* isolate , v8::Local<v8::Value> value)
369 { 374 {
370 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr; 375 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr;
371 } 376 }
372 377
373 } // namespace blink 378 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698