Bug 848954 - Part 26 - Prevent a race when the MSG is going to sleep mode. r=roc

This commit is contained in:
Paul Adenot 2014-08-26 17:02:31 +02:00
parent 621ed597e2
commit 031bd0f622

View File

@ -101,13 +101,14 @@ void GraphDriver::EnsureNextIterationLocked()
{
mGraphImpl->GetMonitor().AssertCurrentThreadOwns();
if (IsWaitingIndefinitly()) {
WakeUp();
}
if (mNeedAnotherIteration) {
return;
}
mNeedAnotherIteration = true;
if (IsWaitingIndefinitly()) {
WakeUp();
}
}
ThreadedDriver::ThreadedDriver(MediaStreamGraphImpl* aGraphImpl)
@ -335,6 +336,7 @@ SystemClockDriver::WaitForNextIteration()
void
SystemClockDriver::WakeUp()
{
mGraphImpl->GetMonitor().AssertCurrentThreadOwns();
mWaitState = WAITSTATE_WAKING_UP;
mGraphImpl->GetMonitor().Notify();
}