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

Unified Diff: components/nacl/loader/nacl_ipc_adapter.cc

Issue 533823003: Signal condition variable in the critical section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_ipc_adapter.cc
diff --git a/components/nacl/loader/nacl_ipc_adapter.cc b/components/nacl/loader/nacl_ipc_adapter.cc
index 076594eff91f9a59a54047ff6ac88af5c10bc588..879fa2cd57872e0c44121c0487b26ec5fc9f79bb 100644
--- a/components/nacl/loader/nacl_ipc_adapter.cc
+++ b/components/nacl/loader/nacl_ipc_adapter.cc
@@ -437,8 +437,8 @@ int NaClIPCAdapter::BlockingReceive(NaClImcTypedMsgHdr* msg) {
retval = LockedReceive(msg);
DCHECK(retval > 0);
}
+ cond_var_.Signal();
}
- cond_var_.Signal();
return retval;
}
@@ -446,8 +446,8 @@ void NaClIPCAdapter::CloseChannel() {
{
base::AutoLock lock(lock_);
locked_data_.channel_closed_ = true;
+ cond_var_.Signal();
}
- cond_var_.Signal();
task_runner_->PostTask(FROM_HERE,
base::Bind(&NaClIPCAdapter::CloseChannelOnIOThread, this));
@@ -551,8 +551,8 @@ bool NaClIPCAdapter::OnMessageReceived(const IPC::Message& msg) {
SaveMessage(*new_msg, rewritten_msg.get());
else
SaveMessage(msg, rewritten_msg.get());
+ cond_var_.Signal();
}
- cond_var_.Signal();
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698