| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 DISALLOW_COPY_AND_ASSIGN(LockingCommandMessageQueue); | 779 DISALLOW_COPY_AND_ASSIGN(LockingCommandMessageQueue); |
| 780 }; | 780 }; |
| 781 | 781 |
| 782 | 782 |
| 783 class Debugger { | 783 class Debugger { |
| 784 public: | 784 public: |
| 785 ~Debugger(); | 785 ~Debugger(); |
| 786 | 786 |
| 787 void DebugRequest(const uint16_t* json_request, int length); | 787 void DebugRequest(const uint16_t* json_request, int length); |
| 788 | 788 |
| 789 Handle<Object> MakeJSObject(Vector<const char> constructor_name, | 789 MUST_USE_RESULT MaybeHandle<Object> MakeJSObject( |
| 790 int argc, | 790 Vector<const char> constructor_name, |
| 791 Handle<Object> argv[], | 791 int argc, |
| 792 bool* caught_exception); | 792 Handle<Object> argv[]); |
| 793 Handle<Object> MakeExecutionState(bool* caught_exception); | 793 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); |
| 794 Handle<Object> MakeBreakEvent(Handle<Object> exec_state, | 794 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( |
| 795 Handle<Object> break_points_hit, | 795 Handle<Object> break_points_hit); |
| 796 bool* caught_exception); | 796 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( |
| 797 Handle<Object> MakeExceptionEvent(Handle<Object> exec_state, | 797 Handle<Object> exception, bool uncaught); |
| 798 Handle<Object> exception, | 798 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( |
| 799 bool uncaught, | 799 Handle<Script> script, bool before); |
| 800 bool* caught_exception); | 800 MUST_USE_RESULT MaybeHandle<Object> MakeScriptCollectedEvent(int id); |
| 801 Handle<Object> MakeNewFunctionEvent(Handle<Object> func, | 801 |
| 802 bool* caught_exception); | |
| 803 Handle<Object> MakeCompileEvent(Handle<Script> script, | |
| 804 bool before, | |
| 805 bool* caught_exception); | |
| 806 Handle<Object> MakeScriptCollectedEvent(int id, | |
| 807 bool* caught_exception); | |
| 808 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); | 802 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); |
| 809 void OnException(Handle<Object> exception, bool uncaught); | 803 void OnException(Handle<Object> exception, bool uncaught); |
| 810 void OnBeforeCompile(Handle<Script> script); | 804 void OnBeforeCompile(Handle<Script> script); |
| 811 | 805 |
| 812 enum AfterCompileFlags { | 806 enum AfterCompileFlags { |
| 813 NO_AFTER_COMPILE_FLAGS, | 807 NO_AFTER_COMPILE_FLAGS, |
| 814 SEND_WHEN_DEBUGGING | 808 SEND_WHEN_DEBUGGING |
| 815 }; | 809 }; |
| 816 void OnAfterCompile(Handle<Script> script, | 810 void OnAfterCompile(Handle<Script> script, |
| 817 AfterCompileFlags after_compile_flags); | 811 AfterCompileFlags after_compile_flags); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 837 // Add a debugger command to the command queue. | 831 // Add a debugger command to the command queue. |
| 838 void ProcessCommand(Vector<const uint16_t> command, | 832 void ProcessCommand(Vector<const uint16_t> command, |
| 839 v8::Debug::ClientData* client_data = NULL); | 833 v8::Debug::ClientData* client_data = NULL); |
| 840 | 834 |
| 841 // Check whether there are commands in the command queue. | 835 // Check whether there are commands in the command queue. |
| 842 bool HasCommands(); | 836 bool HasCommands(); |
| 843 | 837 |
| 844 // Enqueue a debugger command to the command queue for event listeners. | 838 // Enqueue a debugger command to the command queue for event listeners. |
| 845 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); | 839 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); |
| 846 | 840 |
| 847 Handle<Object> Call(Handle<JSFunction> fun, | 841 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, |
| 848 Handle<Object> data, | 842 Handle<Object> data); |
| 849 bool* pending_exception); | |
| 850 | 843 |
| 851 // Start the debugger agent listening on the provided port. | 844 // Start the debugger agent listening on the provided port. |
| 852 bool StartAgent(const char* name, int port, | 845 bool StartAgent(const char* name, int port, |
| 853 bool wait_for_connection = false); | 846 bool wait_for_connection = false); |
| 854 | 847 |
| 855 // Stop the debugger agent. | 848 // Stop the debugger agent. |
| 856 void StopAgent(); | 849 void StopAgent(); |
| 857 | 850 |
| 858 // Blocks until the agent has started listening for connections | 851 // Blocks until the agent has started listening for connections |
| 859 void WaitForAgent(); | 852 void WaitForAgent(); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 | 1059 |
| 1067 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1060 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
| 1068 }; | 1061 }; |
| 1069 | 1062 |
| 1070 | 1063 |
| 1071 } } // namespace v8::internal | 1064 } } // namespace v8::internal |
| 1072 | 1065 |
| 1073 #endif // ENABLE_DEBUGGER_SUPPORT | 1066 #endif // ENABLE_DEBUGGER_SUPPORT |
| 1074 | 1067 |
| 1075 #endif // V8_DEBUG_H_ | 1068 #endif // V8_DEBUG_H_ |
| OLD | NEW |