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 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 void Debugger::StopAgent() { | 2491 void Debugger::StopAgent() { |
2492 if (agent_ != NULL) { | 2492 if (agent_ != NULL) { |
2493 agent_->Shutdown(); | 2493 agent_->Shutdown(); |
2494 agent_->Join(); | 2494 agent_->Join(); |
2495 delete agent_; | 2495 delete agent_; |
2496 agent_ = NULL; | 2496 agent_ = NULL; |
2497 } | 2497 } |
2498 } | 2498 } |
2499 | 2499 |
2500 | 2500 |
| 2501 void Debugger::WaitForAgent() { |
| 2502 if (agent_ != NULL) |
| 2503 agent_->WaitUntilListening(); |
| 2504 } |
| 2505 |
2501 MessageImpl MessageImpl::NewEvent(DebugEvent event, | 2506 MessageImpl MessageImpl::NewEvent(DebugEvent event, |
2502 bool running, | 2507 bool running, |
2503 Handle<JSObject> exec_state, | 2508 Handle<JSObject> exec_state, |
2504 Handle<JSObject> event_data) { | 2509 Handle<JSObject> event_data) { |
2505 MessageImpl message(true, event, running, | 2510 MessageImpl message(true, event, running, |
2506 exec_state, event_data, Handle<String>(), NULL); | 2511 exec_state, event_data, Handle<String>(), NULL); |
2507 return message; | 2512 return message; |
2508 } | 2513 } |
2509 | 2514 |
2510 | 2515 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2714 | 2719 |
2715 | 2720 |
2716 void LockingCommandMessageQueue::Clear() { | 2721 void LockingCommandMessageQueue::Clear() { |
2717 ScopedLock sl(lock_); | 2722 ScopedLock sl(lock_); |
2718 queue_.Clear(); | 2723 queue_.Clear(); |
2719 } | 2724 } |
2720 | 2725 |
2721 #endif // ENABLE_DEBUGGER_SUPPORT | 2726 #endif // ENABLE_DEBUGGER_SUPPORT |
2722 | 2727 |
2723 } } // namespace v8::internal | 2728 } } // namespace v8::internal |
OLD | NEW |