Bug 1286041 - Ignore AudioContext state change to Suspended when in Closed. r=padenot

This commit is contained in:
Alex Chronopoulos 2016-09-12 12:25:10 +03:00
Родитель 7c62351e09
Коммит 2764b5a648
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -841,6 +841,15 @@ AudioContext::OnStateChanged(void* aPromise, AudioContextState aNewState)
return;
}
// This can happen if this is called in reaction to a
// MediaStreamGraph shutdown, and a AudioContext was being
// suspended at the same time, for example if a page was being
// closed.
if (mAudioContextState == AudioContextState::Closed &&
aNewState == AudioContextState::Suspended) {
return;
}
#ifndef WIN32 // Bug 1170547
#ifndef XP_MACOSX
#ifdef DEBUG