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

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

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Feedback. Created 7 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 /* 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 { 298 {
299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
300 SupportTestInterfaceV8Internal::Node14AttributeSetter(jsValue, info); 300 SupportTestInterfaceV8Internal::Node14AttributeSetter(jsValue, info);
301 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 301 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
302 } 302 }
303 #endif // ENABLE(Condition11) || ENABLE(Condition12) 303 #endif // ENABLE(Condition11) || ENABLE(Condition12)
304 304
305 #if ENABLE(Condition11) || ENABLE(Condition12) 305 #if ENABLE(Condition11) || ENABLE(Condition12)
306 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 306 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
307 { 307 {
308 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa lMethod1", "SupportTestInterface", info.Holder(), info.GetIsolate());
308 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 309 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
309 SupportTestPartialInterface::supplementalMethod1(imp); 310 SupportTestPartialInterface::supplementalMethod1(imp);
310 } 311 }
311 #endif // ENABLE(Condition11) || ENABLE(Condition12) 312 #endif // ENABLE(Condition11) || ENABLE(Condition12)
312 313
313 #if ENABLE(Condition11) || ENABLE(Condition12) 314 #if ENABLE(Condition11) || ENABLE(Condition12)
314 static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 315 static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
315 { 316 {
316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
317 SupportTestInterfaceV8Internal::supplementalMethod1Method(info); 318 SupportTestInterfaceV8Internal::supplementalMethod1Method(info);
318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
319 } 320 }
320 #endif // ENABLE(Condition11) || ENABLE(Condition12) 321 #endif // ENABLE(Condition11) || ENABLE(Condition12)
321 322
322 #if ENABLE(Condition11) || ENABLE(Condition12) 323 #if ENABLE(Condition11) || ENABLE(Condition12)
323 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) 324 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
324 { 325 {
326 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa lMethod2", "SupportTestInterface", info.Holder(), info.GetIsolate());
325 if (UNLIKELY(info.Length() < 2)) { 327 if (UNLIKELY(info.Length() < 2)) {
326 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2", "SupportTestInterface", ExceptionMessages::notEnoughArguments(2, info.Length()) ), info.GetIsolate()); 328 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2", "SupportTestInterface", ExceptionMessages::notEnoughArguments(2, info.Length()) ), info.GetIsolate());
327 return; 329 return;
328 } 330 }
329 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 331 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
330 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
331 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 332 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
332 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[1])) : 0); 333 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(info[1])) : 0);
333 ExecutionContext* scriptContext = getExecutionContext(); 334 ExecutionContext* scriptContext = getExecutionContext();
334 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc riptContext, imp, strArg, objArg, exceptionState); 335 RefPtr<TestObj> result = SupportTestPartialInterface::supplementalMethod2(sc riptContext, imp, strArg, objArg, exceptionState);
335 if (exceptionState.throwIfNeeded()) 336 if (exceptionState.throwIfNeeded())
336 return; 337 return;
337 v8SetReturnValue(info, result.release()); 338 v8SetReturnValue(info, result.release());
338 } 339 }
339 #endif // ENABLE(Condition11) || ENABLE(Condition12) 340 #endif // ENABLE(Condition11) || ENABLE(Condition12)
340 341
(...skipping 11 matching lines...) Expand all
352 { 353 {
353 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 354 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
354 V8SupportTestInterface::supplementalMethod3MethodCustom(info); 355 V8SupportTestInterface::supplementalMethod3MethodCustom(info);
355 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 356 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
356 } 357 }
357 #endif // ENABLE(Condition11) || ENABLE(Condition12) 358 #endif // ENABLE(Condition11) || ENABLE(Condition12)
358 359
359 #if ENABLE(Condition11) || ENABLE(Condition12) 360 #if ENABLE(Condition11) || ENABLE(Condition12)
360 static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& info) 361 static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& info)
361 { 362 {
363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa lMethod4", "SupportTestInterface", info.Holder(), info.GetIsolate());
362 SupportTestPartialInterface::supplementalMethod4(); 364 SupportTestPartialInterface::supplementalMethod4();
363 } 365 }
364 #endif // ENABLE(Condition11) || ENABLE(Condition12) 366 #endif // ENABLE(Condition11) || ENABLE(Condition12)
365 367
366 #if ENABLE(Condition11) || ENABLE(Condition12) 368 #if ENABLE(Condition11) || ENABLE(Condition12)
367 static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info) 369 static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
368 { 370 {
369 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 371 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
370 SupportTestInterfaceV8Internal::supplementalMethod4Method(info); 372 SupportTestInterfaceV8Internal::supplementalMethod4Method(info);
371 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 373 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 fromInternalPointer(object)->deref(); 514 fromInternalPointer(object)->deref();
513 } 515 }
514 516
515 template<> 517 template<>
516 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 518 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
517 { 519 {
518 return toV8(impl, creationContext, isolate); 520 return toV8(impl, creationContext, isolate);
519 } 521 }
520 522
521 } // namespace WebCore 523 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698