| 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 "allocation.h" | 8 #include "allocation.h" |
| 9 #include "arguments.h" | 9 #include "arguments.h" |
| 10 #include "assembler.h" | 10 #include "assembler.h" |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 void OnScriptCollected(int id); | 782 void OnScriptCollected(int id); |
| 783 void ProcessDebugEvent(v8::DebugEvent event, | 783 void ProcessDebugEvent(v8::DebugEvent event, |
| 784 Handle<JSObject> event_data, | 784 Handle<JSObject> event_data, |
| 785 bool auto_continue); | 785 bool auto_continue); |
| 786 void NotifyMessageHandler(v8::DebugEvent event, | 786 void NotifyMessageHandler(v8::DebugEvent event, |
| 787 Handle<JSObject> exec_state, | 787 Handle<JSObject> exec_state, |
| 788 Handle<JSObject> event_data, | 788 Handle<JSObject> event_data, |
| 789 bool auto_continue); | 789 bool auto_continue); |
| 790 void SetEventListener(Handle<Object> callback, Handle<Object> data); | 790 void SetEventListener(Handle<Object> callback, Handle<Object> data); |
| 791 void SetMessageHandler(v8::Debug::MessageHandler2 handler); | 791 void SetMessageHandler(v8::Debug::MessageHandler2 handler); |
| 792 void SetHostDispatchHandler(v8::Debug::HostDispatchHandler handler, | |
| 793 TimeDelta period); | |
| 794 void SetDebugMessageDispatchHandler( | 792 void SetDebugMessageDispatchHandler( |
| 795 v8::Debug::DebugMessageDispatchHandler handler, | 793 v8::Debug::DebugMessageDispatchHandler handler, |
| 796 bool provide_locker); | 794 bool provide_locker); |
| 797 | 795 |
| 798 // Invoke the message handler function. | 796 // Invoke the message handler function. |
| 799 void InvokeMessageHandler(MessageImpl message); | 797 void InvokeMessageHandler(MessageImpl message); |
| 800 | 798 |
| 801 // Add a debugger command to the command queue. | 799 // Add a debugger command to the command queue. |
| 802 void ProcessCommand(Vector<const uint16_t> command, | 800 void ProcessCommand(Vector<const uint16_t> command, |
| 803 v8::Debug::ClientData* client_data = NULL); | 801 v8::Debug::ClientData* client_data = NULL); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 RecursiveMutex* debugger_access_; // Mutex guarding debugger variables. | 887 RecursiveMutex* debugger_access_; // Mutex guarding debugger variables. |
| 890 Handle<Object> event_listener_; // Global handle to listener. | 888 Handle<Object> event_listener_; // Global handle to listener. |
| 891 Handle<Object> event_listener_data_; | 889 Handle<Object> event_listener_data_; |
| 892 bool compiling_natives_; // Are we compiling natives? | 890 bool compiling_natives_; // Are we compiling natives? |
| 893 bool is_loading_debugger_; // Are we loading the debugger? | 891 bool is_loading_debugger_; // Are we loading the debugger? |
| 894 bool live_edit_enabled_; // Enable LiveEdit. | 892 bool live_edit_enabled_; // Enable LiveEdit. |
| 895 bool never_unload_debugger_; // Can we unload the debugger? | 893 bool never_unload_debugger_; // Can we unload the debugger? |
| 896 bool force_debugger_active_; // Activate debugger without event listeners. | 894 bool force_debugger_active_; // Activate debugger without event listeners. |
| 897 v8::Debug::MessageHandler2 message_handler_; | 895 v8::Debug::MessageHandler2 message_handler_; |
| 898 bool debugger_unload_pending_; // Was message handler cleared? | 896 bool debugger_unload_pending_; // Was message handler cleared? |
| 899 v8::Debug::HostDispatchHandler host_dispatch_handler_; | 897 |
| 900 Mutex dispatch_handler_access_; // Mutex guarding dispatch handler. | 898 Mutex dispatch_handler_access_; // Mutex guarding dispatch handler. |
| 901 v8::Debug::DebugMessageDispatchHandler debug_message_dispatch_handler_; | 899 v8::Debug::DebugMessageDispatchHandler debug_message_dispatch_handler_; |
| 902 MessageDispatchHelperThread* message_dispatch_helper_thread_; | 900 MessageDispatchHelperThread* message_dispatch_helper_thread_; |
| 903 TimeDelta host_dispatch_period_; | |
| 904 | 901 |
| 905 DebuggerAgent* agent_; | 902 DebuggerAgent* agent_; |
| 906 | 903 |
| 907 static const int kQueueInitialSize = 4; | 904 static const int kQueueInitialSize = 4; |
| 908 LockingCommandMessageQueue command_queue_; | 905 LockingCommandMessageQueue command_queue_; |
| 909 Semaphore command_received_; // Signaled for each command received. | 906 Semaphore command_received_; // Signaled for each command received. |
| 910 LockingCommandMessageQueue event_command_queue_; | 907 LockingCommandMessageQueue event_command_queue_; |
| 911 | 908 |
| 912 Isolate* isolate_; | 909 Isolate* isolate_; |
| 913 | 910 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 Mutex mutex_; | 1016 Mutex mutex_; |
| 1020 bool already_signalled_; | 1017 bool already_signalled_; |
| 1021 | 1018 |
| 1022 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1019 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
| 1023 }; | 1020 }; |
| 1024 | 1021 |
| 1025 | 1022 |
| 1026 } } // namespace v8::internal | 1023 } } // namespace v8::internal |
| 1027 | 1024 |
| 1028 #endif // V8_DEBUG_H_ | 1025 #endif // V8_DEBUG_H_ |
| OLD | NEW |