Commit 66a8b6a9 authored by hidehiko's avatar hidehiko Committed by Commit bot

Signal condition variable in the critical section.

Condition variables should be signaled inside the critical section.
cf) http://www.chromium.org/developers/lock-and-condition-variable#inside

BUG=None
TEST=Ran trybots.

Review URL: https://codereview.chromium.org/533823003

Cr-Commit-Position: refs/heads/master@{#293471}
parent e891333d
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment