| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 671 |
| 672 class MessageDispatchHelperThread; | 672 class MessageDispatchHelperThread; |
| 673 | 673 |
| 674 | 674 |
| 675 // LockingCommandMessageQueue is a thread-safe circular buffer of CommandMessage | 675 // LockingCommandMessageQueue is a thread-safe circular buffer of CommandMessage |
| 676 // messages. The message data is not managed by LockingCommandMessageQueue. | 676 // messages. The message data is not managed by LockingCommandMessageQueue. |
| 677 // Pointers to the data are passed in and out. Implemented by adding a | 677 // Pointers to the data are passed in and out. Implemented by adding a |
| 678 // Mutex to CommandMessageQueue. Includes logging of all puts and gets. | 678 // Mutex to CommandMessageQueue. Includes logging of all puts and gets. |
| 679 class LockingCommandMessageQueue BASE_EMBEDDED { | 679 class LockingCommandMessageQueue BASE_EMBEDDED { |
| 680 public: | 680 public: |
| 681 explicit LockingCommandMessageQueue(int size); | 681 LockingCommandMessageQueue(Logger* logger, int size); |
| 682 ~LockingCommandMessageQueue(); | 682 ~LockingCommandMessageQueue(); |
| 683 bool IsEmpty() const; | 683 bool IsEmpty() const; |
| 684 CommandMessage Get(); | 684 CommandMessage Get(); |
| 685 void Put(const CommandMessage& message); | 685 void Put(const CommandMessage& message); |
| 686 void Clear(); | 686 void Clear(); |
| 687 private: | 687 private: |
| 688 Logger* logger_; |
| 688 CommandMessageQueue queue_; | 689 CommandMessageQueue queue_; |
| 689 Mutex* lock_; | 690 Mutex* lock_; |
| 690 DISALLOW_COPY_AND_ASSIGN(LockingCommandMessageQueue); | 691 DISALLOW_COPY_AND_ASSIGN(LockingCommandMessageQueue); |
| 691 }; | 692 }; |
| 692 | 693 |
| 693 | 694 |
| 694 class Debugger { | 695 class Debugger { |
| 695 public: | 696 public: |
| 696 ~Debugger(); | 697 ~Debugger(); |
| 697 | 698 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 void set_compiling_natives(bool compiling_natives) { | 805 void set_compiling_natives(bool compiling_natives) { |
| 805 Debugger::compiling_natives_ = compiling_natives; | 806 Debugger::compiling_natives_ = compiling_natives; |
| 806 } | 807 } |
| 807 bool compiling_natives() const { return compiling_natives_; } | 808 bool compiling_natives() const { return compiling_natives_; } |
| 808 void set_loading_debugger(bool v) { is_loading_debugger_ = v; } | 809 void set_loading_debugger(bool v) { is_loading_debugger_ = v; } |
| 809 bool is_loading_debugger() const { return is_loading_debugger_; } | 810 bool is_loading_debugger() const { return is_loading_debugger_; } |
| 810 | 811 |
| 811 bool IsDebuggerActive(); | 812 bool IsDebuggerActive(); |
| 812 | 813 |
| 813 private: | 814 private: |
| 814 Debugger(); | 815 explicit Debugger(Isolate* isolate); |
| 815 | 816 |
| 816 void CallEventCallback(v8::DebugEvent event, | 817 void CallEventCallback(v8::DebugEvent event, |
| 817 Handle<Object> exec_state, | 818 Handle<Object> exec_state, |
| 818 Handle<Object> event_data, | 819 Handle<Object> event_data, |
| 819 v8::Debug::ClientData* client_data); | 820 v8::Debug::ClientData* client_data); |
| 820 void CallCEventCallback(v8::DebugEvent event, | 821 void CallCEventCallback(v8::DebugEvent event, |
| 821 Handle<Object> exec_state, | 822 Handle<Object> exec_state, |
| 822 Handle<Object> event_data, | 823 Handle<Object> event_data, |
| 823 v8::Debug::ClientData* client_data); | 824 v8::Debug::ClientData* client_data); |
| 824 void CallJSEventCallback(v8::DebugEvent event, | 825 void CallJSEventCallback(v8::DebugEvent event, |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 | 1049 |
| 1049 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1050 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
| 1050 }; | 1051 }; |
| 1051 | 1052 |
| 1052 | 1053 |
| 1053 } } // namespace v8::internal | 1054 } } // namespace v8::internal |
| 1054 | 1055 |
| 1055 #endif // ENABLE_DEBUGGER_SUPPORT | 1056 #endif // ENABLE_DEBUGGER_SUPPORT |
| 1056 | 1057 |
| 1057 #endif // V8_DEBUG_H_ | 1058 #endif // V8_DEBUG_H_ |
| OLD | NEW |