OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project 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 #ifndef V8_DEBUG_H_ | 5 #ifndef V8_DEBUG_H_ |
6 #define V8_DEBUG_H_ | 6 #define V8_DEBUG_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // DebugInfo. | 359 // DebugInfo. |
360 class Debug { | 360 class Debug { |
361 public: | 361 public: |
362 // Debug event triggers. | 362 // Debug event triggers. |
363 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); | 363 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); |
364 void OnException(Handle<Object> exception, bool uncaught); | 364 void OnException(Handle<Object> exception, bool uncaught); |
365 void OnCompileError(Handle<Script> script); | 365 void OnCompileError(Handle<Script> script); |
366 void OnBeforeCompile(Handle<Script> script); | 366 void OnBeforeCompile(Handle<Script> script); |
367 void OnAfterCompile(Handle<Script> script); | 367 void OnAfterCompile(Handle<Script> script); |
368 void OnPromiseEvent(Handle<JSObject> data); | 368 void OnPromiseEvent(Handle<JSObject> data); |
| 369 void OnAsyncTaskEvent(Handle<JSObject> data); |
369 | 370 |
370 // API facing. | 371 // API facing. |
371 void SetEventListener(Handle<Object> callback, Handle<Object> data); | 372 void SetEventListener(Handle<Object> callback, Handle<Object> data); |
372 void SetMessageHandler(v8::Debug::MessageHandler handler); | 373 void SetMessageHandler(v8::Debug::MessageHandler handler); |
373 void EnqueueCommandMessage(Vector<const uint16_t> command, | 374 void EnqueueCommandMessage(Vector<const uint16_t> command, |
374 v8::Debug::ClientData* client_data = NULL); | 375 v8::Debug::ClientData* client_data = NULL); |
375 // Enqueue a debugger command to the command queue for event listeners. | 376 // Enqueue a debugger command to the command queue for event listeners. |
376 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); | 377 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); |
377 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, | 378 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, |
378 Handle<Object> data); | 379 Handle<Object> data); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( | 532 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( |
532 Handle<Object> break_points_hit); | 533 Handle<Object> break_points_hit); |
533 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( | 534 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( |
534 Handle<Object> exception, | 535 Handle<Object> exception, |
535 bool uncaught, | 536 bool uncaught, |
536 Handle<Object> promise); | 537 Handle<Object> promise); |
537 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( | 538 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( |
538 Handle<Script> script, v8::DebugEvent type); | 539 Handle<Script> script, v8::DebugEvent type); |
539 MUST_USE_RESULT MaybeHandle<Object> MakePromiseEvent( | 540 MUST_USE_RESULT MaybeHandle<Object> MakePromiseEvent( |
540 Handle<JSObject> promise_event); | 541 Handle<JSObject> promise_event); |
| 542 MUST_USE_RESULT MaybeHandle<Object> MakeAsyncTaskEvent( |
| 543 Handle<JSObject> task_event); |
541 | 544 |
542 // Mirror cache handling. | 545 // Mirror cache handling. |
543 void ClearMirrorCache(); | 546 void ClearMirrorCache(); |
544 | 547 |
545 // Returns a promise if it does not have a reject handler. | 548 // Returns a promise if it does not have a reject handler. |
546 Handle<Object> GetPromiseForUncaughtException(); | 549 Handle<Object> GetPromiseForUncaughtException(); |
547 | 550 |
548 void CallEventCallback(v8::DebugEvent event, | 551 void CallEventCallback(v8::DebugEvent event, |
549 Handle<Object> exec_state, | 552 Handle<Object> exec_state, |
550 Handle<Object> event_data, | 553 Handle<Object> event_data, |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 // several frames above. | 760 // several frames above. |
758 // There is no calling conventions here, because it never actually gets | 761 // There is no calling conventions here, because it never actually gets |
759 // called, it only gets returned to. | 762 // called, it only gets returned to. |
760 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); | 763 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); |
761 }; | 764 }; |
762 | 765 |
763 | 766 |
764 } } // namespace v8::internal | 767 } } // namespace v8::internal |
765 | 768 |
766 #endif // V8_DEBUG_H_ | 769 #endif // V8_DEBUG_H_ |
OLD | NEW |