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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 // debug_info which is a FixedArray. Each entry in this list is of class | 358 // debug_info which is a FixedArray. Each entry in this list is of class |
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 | 369 |
369 // API facing. | 370 // API facing. |
370 void SetEventListener(Handle<Object> callback, Handle<Object> data); | 371 void SetEventListener(Handle<Object> callback, Handle<Object> data); |
371 void SetMessageHandler(v8::Debug::MessageHandler handler); | 372 void SetMessageHandler(v8::Debug::MessageHandler handler); |
372 void EnqueueCommandMessage(Vector<const uint16_t> command, | 373 void EnqueueCommandMessage(Vector<const uint16_t> command, |
373 v8::Debug::ClientData* client_data = NULL); | 374 v8::Debug::ClientData* client_data = NULL); |
374 // Enqueue a debugger command to the command queue for event listeners. | 375 // Enqueue a debugger command to the command queue for event listeners. |
375 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); | 376 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); |
376 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, | 377 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, |
377 Handle<Object> data); | 378 Handle<Object> data); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 Handle<Object> argv[]); | 529 Handle<Object> argv[]); |
529 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); | 530 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); |
530 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( | 531 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( |
531 Handle<Object> break_points_hit); | 532 Handle<Object> break_points_hit); |
532 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( | 533 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( |
533 Handle<Object> exception, | 534 Handle<Object> exception, |
534 bool uncaught, | 535 bool uncaught, |
535 Handle<Object> promise); | 536 Handle<Object> promise); |
536 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( | 537 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( |
537 Handle<Script> script, v8::DebugEvent type); | 538 Handle<Script> script, v8::DebugEvent type); |
| 539 MUST_USE_RESULT MaybeHandle<Object> MakePromiseEvent( |
| 540 Handle<JSObject> promise_event); |
538 | 541 |
539 // Mirror cache handling. | 542 // Mirror cache handling. |
540 void ClearMirrorCache(); | 543 void ClearMirrorCache(); |
541 | 544 |
542 // Returns a promise if it does not have a reject handler. | 545 // Returns a promise if it does not have a reject handler. |
543 Handle<Object> GetPromiseForUncaughtException(); | 546 Handle<Object> GetPromiseForUncaughtException(); |
544 | 547 |
545 void CallEventCallback(v8::DebugEvent event, | 548 void CallEventCallback(v8::DebugEvent event, |
546 Handle<Object> exec_state, | 549 Handle<Object> exec_state, |
547 Handle<Object> event_data, | 550 Handle<Object> event_data, |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 // several frames above. | 757 // several frames above. |
755 // There is no calling conventions here, because it never actually gets | 758 // There is no calling conventions here, because it never actually gets |
756 // called, it only gets returned to. | 759 // called, it only gets returned to. |
757 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); | 760 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); |
758 }; | 761 }; |
759 | 762 |
760 | 763 |
761 } } // namespace v8::internal | 764 } } // namespace v8::internal |
762 | 765 |
763 #endif // V8_DEBUG_H_ | 766 #endif // V8_DEBUG_H_ |
OLD | NEW |