Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: src/debug-agent.cc

Issue 242003: Fixed some cctest flakiness on mac. (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug-agent.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-agent.cc
diff --git a/src/debug-agent.cc b/src/debug-agent.cc
index 3dba53a435764f27505ee8c5862f61de59725ef8..9d5cace03ba1095dbcf27c90f9a271b75a913cc7 100644
--- a/src/debug-agent.cc
+++ b/src/debug-agent.cc
@@ -65,6 +65,7 @@ void DebuggerAgent::Run() {
// Accept connections on the bound port.
while (!terminate_) {
bool ok = server_->Listen(1);
+ listening_->Signal();
if (ok) {
// Accept the new connection.
Socket* client = server_->Accept();
@@ -93,6 +94,10 @@ void DebuggerAgent::Shutdown() {
}
+void DebuggerAgent::WaitUntilListening() {
+ listening_->Wait();
+}
+
void DebuggerAgent::CreateSession(Socket* client) {
ScopedLock with(session_access_);
« no previous file with comments | « src/debug-agent.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698