Bug 1256510: When shutting down MediaStreamGraphs, if the graph hasn't started, let it start and shut down r=padenot

MozReview-Commit-ID: 64WjTbaduvu
This commit is contained in:
Randell Jesup 2016-03-15 11:46:01 -04:00
Родитель 5a9c0ee8db
Коммит 3608515672
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -1479,6 +1479,14 @@ MediaStreamGraphImpl::ForceShutDown(ShutdownTicket* aShutdownTicket)
MonitorAutoLock lock(mMonitor);
mForceShutDown = true;
mForceShutdownTicket = aShutdownTicket;
if (mLifecycleState == LIFECYCLE_THREAD_NOT_STARTED) {
// We *could* have just sent this a message to start up, so don't
// yank the rug out from under it. Tell it to startup and let it
// shut down.
RefPtr<GraphDriver> driver = CurrentDriver();
MonitorAutoUnlock unlock(mMonitor);
driver->Start();
}
EnsureNextIterationLocked();
}
}