зеркало из https://github.com/mozilla/gecko-dev.git
Bug 894234 - Guard against audioContext->IsOffline(). r=ehsan
This commit is contained in:
Родитель
09e5e38a50
Коммит
07cdd2c80d
|
@ -3284,7 +3284,7 @@ nsPIDOMWindow::AddAudioContext(AudioContext* aAudioContext)
|
||||||
mAudioContexts.AppendElement(aAudioContext);
|
mAudioContexts.AppendElement(aAudioContext);
|
||||||
|
|
||||||
nsIDocShell* docShell = GetDocShell();
|
nsIDocShell* docShell = GetDocShell();
|
||||||
if (docShell && !docShell->GetAllowMedia()) {
|
if (docShell && !docShell->GetAllowMedia() && !aAudioContext->IsOffline()) {
|
||||||
aAudioContext->Mute();
|
aAudioContext->Mute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3293,7 +3293,9 @@ void
|
||||||
nsPIDOMWindow::MuteAudioContexts()
|
nsPIDOMWindow::MuteAudioContexts()
|
||||||
{
|
{
|
||||||
for (uint32_t i = 0; i < mAudioContexts.Length(); ++i) {
|
for (uint32_t i = 0; i < mAudioContexts.Length(); ++i) {
|
||||||
mAudioContexts[i]->Mute();
|
if (!mAudioContexts[i]->IsOffline()) {
|
||||||
|
mAudioContexts[i]->Mute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3301,7 +3303,9 @@ void
|
||||||
nsPIDOMWindow::UnmuteAudioContexts()
|
nsPIDOMWindow::UnmuteAudioContexts()
|
||||||
{
|
{
|
||||||
for (uint32_t i = 0; i < mAudioContexts.Length(); ++i) {
|
for (uint32_t i = 0; i < mAudioContexts.Length(); ++i) {
|
||||||
mAudioContexts[i]->Unmute();
|
if (!mAudioContexts[i]->IsOffline()) {
|
||||||
|
mAudioContexts[i]->Unmute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче