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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 SEND_WHEN_DEBUGGING | 369 SEND_WHEN_DEBUGGING |
370 }; | 370 }; |
371 | 371 |
372 // Debug event triggers. | 372 // Debug event triggers. |
373 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); | 373 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); |
374 void OnException(Handle<Object> exception, bool uncaught); | 374 void OnException(Handle<Object> exception, bool uncaught); |
375 void OnBeforeCompile(Handle<Script> script); | 375 void OnBeforeCompile(Handle<Script> script); |
376 void OnAfterCompile(Handle<Script> script, | 376 void OnAfterCompile(Handle<Script> script, |
377 AfterCompileFlags after_compile_flags); | 377 AfterCompileFlags after_compile_flags); |
378 void OnScriptCollected(int id); | 378 void OnScriptCollected(int id); |
| 379 void OnPromiseEvent(Handle<JSObject> data); |
379 | 380 |
380 // API facing. | 381 // API facing. |
381 void SetEventListener(Handle<Object> callback, Handle<Object> data); | 382 void SetEventListener(Handle<Object> callback, Handle<Object> data); |
382 void SetMessageHandler(v8::Debug::MessageHandler handler); | 383 void SetMessageHandler(v8::Debug::MessageHandler handler); |
383 void EnqueueCommandMessage(Vector<const uint16_t> command, | 384 void EnqueueCommandMessage(Vector<const uint16_t> command, |
384 v8::Debug::ClientData* client_data = NULL); | 385 v8::Debug::ClientData* client_data = NULL); |
385 // Enqueue a debugger command to the command queue for event listeners. | 386 // Enqueue a debugger command to the command queue for event listeners. |
386 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); | 387 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); |
387 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, | 388 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, |
388 Handle<Object> data); | 389 Handle<Object> data); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); | 544 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); |
544 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( | 545 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( |
545 Handle<Object> break_points_hit); | 546 Handle<Object> break_points_hit); |
546 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( | 547 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( |
547 Handle<Object> exception, | 548 Handle<Object> exception, |
548 bool uncaught, | 549 bool uncaught, |
549 Handle<Object> promise); | 550 Handle<Object> promise); |
550 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( | 551 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( |
551 Handle<Script> script, bool before); | 552 Handle<Script> script, bool before); |
552 MUST_USE_RESULT MaybeHandle<Object> MakeScriptCollectedEvent(int id); | 553 MUST_USE_RESULT MaybeHandle<Object> MakeScriptCollectedEvent(int id); |
| 554 MUST_USE_RESULT MaybeHandle<Object> MakePromiseEvent( |
| 555 Handle<JSObject> promise_event); |
553 | 556 |
554 // Mirror cache handling. | 557 // Mirror cache handling. |
555 void ClearMirrorCache(); | 558 void ClearMirrorCache(); |
556 | 559 |
557 // Returns a promise if it does not have a reject handler. | 560 // Returns a promise if it does not have a reject handler. |
558 Handle<Object> GetPromiseForUncaughtException(); | 561 Handle<Object> GetPromiseForUncaughtException(); |
559 | 562 |
560 void CallEventCallback(v8::DebugEvent event, | 563 void CallEventCallback(v8::DebugEvent event, |
561 Handle<Object> exec_state, | 564 Handle<Object> exec_state, |
562 Handle<Object> event_data, | 565 Handle<Object> event_data, |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 // several frames above. | 772 // several frames above. |
770 // There is no calling conventions here, because it never actually gets | 773 // There is no calling conventions here, because it never actually gets |
771 // called, it only gets returned to. | 774 // called, it only gets returned to. |
772 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); | 775 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); |
773 }; | 776 }; |
774 | 777 |
775 | 778 |
776 } } // namespace v8::internal | 779 } } // namespace v8::internal |
777 | 780 |
778 #endif // V8_DEBUG_H_ | 781 #endif // V8_DEBUG_H_ |
OLD | NEW |