| 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_DEBUG_H_ | 5 #ifndef V8_DEBUG_DEBUG_H_ |
| 6 #define V8_DEBUG_DEBUG_H_ | 6 #define V8_DEBUG_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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 class Debug { | 410 class Debug { |
| 411 public: | 411 public: |
| 412 // Debug event triggers. | 412 // Debug event triggers. |
| 413 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); | 413 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); |
| 414 | 414 |
| 415 void OnThrow(Handle<Object> exception); | 415 void OnThrow(Handle<Object> exception); |
| 416 void OnPromiseReject(Handle<Object> promise, Handle<Object> value); | 416 void OnPromiseReject(Handle<Object> promise, Handle<Object> value); |
| 417 void OnCompileError(Handle<Script> script); | 417 void OnCompileError(Handle<Script> script); |
| 418 void OnBeforeCompile(Handle<Script> script); | 418 void OnBeforeCompile(Handle<Script> script); |
| 419 void OnAfterCompile(Handle<Script> script); | 419 void OnAfterCompile(Handle<Script> script); |
| 420 void OnAsyncTaskEvent(Handle<JSObject> data); | 420 void OnAsyncTaskEvent(Handle<String> type, Handle<Object> id, |
| 421 Handle<String> name); |
| 421 | 422 |
| 422 // API facing. | 423 // API facing. |
| 423 void SetEventListener(Handle<Object> callback, Handle<Object> data); | 424 void SetEventListener(Handle<Object> callback, Handle<Object> data); |
| 424 void SetMessageHandler(v8::Debug::MessageHandler handler); | 425 void SetMessageHandler(v8::Debug::MessageHandler handler); |
| 425 void EnqueueCommandMessage(Vector<const uint16_t> command, | 426 void EnqueueCommandMessage(Vector<const uint16_t> command, |
| 426 v8::Debug::ClientData* client_data = NULL); | 427 v8::Debug::ClientData* client_data = NULL); |
| 427 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<Object> fun, | 428 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<Object> fun, |
| 428 Handle<Object> data); | 429 Handle<Object> data); |
| 429 Handle<Context> GetDebugContext(); | 430 Handle<Context> GetDebugContext(); |
| 430 void HandleDebugBreak(); | 431 void HandleDebugBreak(); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 // Constructors for debug event objects. | 582 // Constructors for debug event objects. |
| 582 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); | 583 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); |
| 583 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( | 584 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( |
| 584 Handle<Object> break_points_hit); | 585 Handle<Object> break_points_hit); |
| 585 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( | 586 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( |
| 586 Handle<Object> exception, | 587 Handle<Object> exception, |
| 587 bool uncaught, | 588 bool uncaught, |
| 588 Handle<Object> promise); | 589 Handle<Object> promise); |
| 589 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( | 590 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( |
| 590 Handle<Script> script, v8::DebugEvent type); | 591 Handle<Script> script, v8::DebugEvent type); |
| 591 MUST_USE_RESULT MaybeHandle<Object> MakeAsyncTaskEvent( | 592 MUST_USE_RESULT MaybeHandle<Object> MakeAsyncTaskEvent(Handle<String> type, |
| 592 Handle<JSObject> task_event); | 593 Handle<Object> id, |
| 594 Handle<String> name); |
| 593 | 595 |
| 594 // Mirror cache handling. | 596 // Mirror cache handling. |
| 595 void ClearMirrorCache(); | 597 void ClearMirrorCache(); |
| 596 | 598 |
| 597 void CallEventCallback(v8::DebugEvent event, | 599 void CallEventCallback(v8::DebugEvent event, |
| 598 Handle<Object> exec_state, | 600 Handle<Object> exec_state, |
| 599 Handle<Object> event_data, | 601 Handle<Object> event_data, |
| 600 v8::Debug::ClientData* client_data); | 602 v8::Debug::ClientData* client_data); |
| 601 void ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script); | 603 void ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script); |
| 602 void ProcessDebugEvent(v8::DebugEvent event, | 604 void ProcessDebugEvent(v8::DebugEvent event, |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 Handle<Code> code); | 820 Handle<Code> code); |
| 819 static bool DebugBreakSlotIsPatched(Address pc); | 821 static bool DebugBreakSlotIsPatched(Address pc); |
| 820 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); | 822 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); |
| 821 }; | 823 }; |
| 822 | 824 |
| 823 | 825 |
| 824 } // namespace internal | 826 } // namespace internal |
| 825 } // namespace v8 | 827 } // namespace v8 |
| 826 | 828 |
| 827 #endif // V8_DEBUG_DEBUG_H_ | 829 #endif // V8_DEBUG_DEBUG_H_ |
| OLD | NEW |