Bug 1218396 - By default window-less AudioChannelAgents should be muted, r=alwu

This commit is contained in:
Andrea Marchesini 2015-10-27 06:57:38 +00:00
Родитель d7e0a22d6a
Коммит b15274a9bf
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -323,13 +323,16 @@ AudioChannelService::GetState(nsPIDOMWindow* aWindow, uint32_t aAudioChannel,
MOZ_ASSERT(aVolume && aMuted);
MOZ_ASSERT(aAudioChannel < NUMBER_OF_AUDIO_CHANNELS);
*aVolume = 1.0;
*aMuted = false;
if (!aWindow || !aWindow->IsOuterWindow()) {
*aVolume = 0.0;
*aMuted = true;
return;
}
*aVolume = 1.0;
*aMuted = false;
AudioChannelWindow* winData = nullptr;
nsCOMPtr<nsPIDOMWindow> window = aWindow;