Bug 1530663 - Avoid running remaining VRManager tasks after mTaskTimer has been stopped r=daoshengmu

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kearwood "Kip" Gilbert 2019-03-05 22:32:58 +00:00
Родитель af19fae1d6
Коммит cbc8b87365
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -246,6 +246,13 @@ void VRManager::RunTasks() {
// is active or once per vsync when a VR presentation is
// not active.
if (!mInitialized) {
// We may have been destroyed but still have messages
// in the queue from mTaskTimer. Bail out to avoid
// running them.
return;
}
TimeStamp now = TimeStamp::Now();
double lastTickMs = mAccumulator100ms;
double deltaTime = 0.0f;