| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 void OnBeforeCompile(Handle<Script> script); | 433 void OnBeforeCompile(Handle<Script> script); |
| 434 void OnAfterCompile(Handle<Script> script); | 434 void OnAfterCompile(Handle<Script> script); |
| 435 void OnPromiseEvent(Handle<JSObject> data); | 435 void OnPromiseEvent(Handle<JSObject> data); |
| 436 void OnAsyncTaskEvent(Handle<JSObject> data); | 436 void OnAsyncTaskEvent(Handle<JSObject> data); |
| 437 | 437 |
| 438 // API facing. | 438 // API facing. |
| 439 void SetEventListener(Handle<Object> callback, Handle<Object> data); | 439 void SetEventListener(Handle<Object> callback, Handle<Object> data); |
| 440 void SetMessageHandler(v8::Debug::MessageHandler handler); | 440 void SetMessageHandler(v8::Debug::MessageHandler handler); |
| 441 void EnqueueCommandMessage(Vector<const uint16_t> command, | 441 void EnqueueCommandMessage(Vector<const uint16_t> command, |
| 442 v8::Debug::ClientData* client_data = NULL); | 442 v8::Debug::ClientData* client_data = NULL); |
| 443 // Enqueue a debugger command to the command queue for event listeners. | |
| 444 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); | |
| 445 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, | 443 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, |
| 446 Handle<Object> data); | 444 Handle<Object> data); |
| 447 Handle<Context> GetDebugContext(); | 445 Handle<Context> GetDebugContext(); |
| 448 void HandleDebugBreak(); | 446 void HandleDebugBreak(); |
| 449 void ProcessDebugMessages(bool debug_command_only); | 447 void ProcessDebugMessages(bool debug_command_only); |
| 450 | 448 |
| 451 // Internal logic | 449 // Internal logic |
| 452 bool Load(); | 450 bool Load(); |
| 453 void Break(Arguments args, JavaScriptFrame*); | 451 void Break(Arguments args, JavaScriptFrame*); |
| 454 void SetAfterBreakTarget(JavaScriptFrame* frame); | 452 void SetAfterBreakTarget(JavaScriptFrame* frame); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 // Global handles. | 660 // Global handles. |
| 663 Handle<Context> debug_context_; | 661 Handle<Context> debug_context_; |
| 664 Handle<Object> event_listener_; | 662 Handle<Object> event_listener_; |
| 665 Handle<Object> event_listener_data_; | 663 Handle<Object> event_listener_data_; |
| 666 | 664 |
| 667 v8::Debug::MessageHandler message_handler_; | 665 v8::Debug::MessageHandler message_handler_; |
| 668 | 666 |
| 669 static const int kQueueInitialSize = 4; | 667 static const int kQueueInitialSize = 4; |
| 670 base::Semaphore command_received_; // Signaled for each command received. | 668 base::Semaphore command_received_; // Signaled for each command received. |
| 671 LockingCommandMessageQueue command_queue_; | 669 LockingCommandMessageQueue command_queue_; |
| 672 LockingCommandMessageQueue event_command_queue_; | |
| 673 | 670 |
| 674 bool is_active_; | 671 bool is_active_; |
| 675 bool is_suppressed_; | 672 bool is_suppressed_; |
| 676 bool live_edit_enabled_; | 673 bool live_edit_enabled_; |
| 677 bool has_break_points_; | 674 bool has_break_points_; |
| 678 bool break_disabled_; | 675 bool break_disabled_; |
| 679 bool in_debug_event_listener_; | 676 bool in_debug_event_listener_; |
| 680 bool break_on_exception_; | 677 bool break_on_exception_; |
| 681 bool break_on_uncaught_exception_; | 678 bool break_on_uncaught_exception_; |
| 682 | 679 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 // several frames above. | 839 // several frames above. |
| 843 // There is no calling conventions here, because it never actually gets | 840 // There is no calling conventions here, because it never actually gets |
| 844 // called, it only gets returned to. | 841 // called, it only gets returned to. |
| 845 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); | 842 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); |
| 846 }; | 843 }; |
| 847 | 844 |
| 848 | 845 |
| 849 } } // namespace v8::internal | 846 } } // namespace v8::internal |
| 850 | 847 |
| 851 #endif // V8_DEBUG_H_ | 848 #endif // V8_DEBUG_H_ |
| OLD | NEW |