Bug 1503132 update offline main thread state when there is no pending iteration r=padenot

Depends on D10163

Differential Revision: https://phabricator.services.mozilla.com/D10164

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Karl Tomlinson 2018-10-30 15:14:33 +00:00
Родитель f85e9dfabc
Коммит a39a706827
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -1113,7 +1113,11 @@ MediaStreamGraphImpl::ShouldUpdateMainThread()
}
TimeStamp now = TimeStamp::Now();
if ((now - mLastMainThreadUpdate).ToMilliseconds() > CurrentDriver()->IterationDuration()) {
// For offline graphs, update now if there is no pending iteration or if it
// has been long enough since the last update.
if (!mNeedAnotherIteration ||
((now - mLastMainThreadUpdate).ToMilliseconds() >
CurrentDriver()->IterationDuration())) {
mLastMainThreadUpdate = now;
return true;
}