b=926619 check for non-AudioNodeStreams in MediaStream cycles r=padenot

--HG--
extra : transplant_source : %2B%F4%EEG%BD%17%2A/%B7%80%F6%22%04%9F%F4E%1FD%F0%A5
This commit is contained in:
Karl Tomlinson 2013-10-25 14:05:41 +13:00
Родитель 1e1ae1b30b
Коммит 415dad9438
1 изменённых файлов: 7 добавлений и 5 удалений

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

@ -499,16 +499,18 @@ MediaStreamGraphImpl::UpdateStreamOrderForStream(mozilla::LinkedList<MediaStream
// mute all nodes we find, or just mute the node itself.
if (!iter) {
// The node is connected to itself.
// There can't be a non-AudioNodeStream here, because only AudioNodes
// can be self-connected.
iter = aStack->getLast();
MOZ_ASSERT(iter->AsAudioNodeStream());
iter->AsAudioNodeStream()->Mute();
} else {
MOZ_ASSERT(iter);
do {
// There can't be non-AudioNodeStream here, MediaStreamAudio{Source,
// Destination}Node are connected to regular MediaStreams, but they can't be
// in a cycle (there is no content API to do so).
MOZ_ASSERT(iter->AsAudioNodeStream());
iter->AsAudioNodeStream()->Mute();
AudioNodeStream* nodeStream = iter->AsAudioNodeStream();
if (nodeStream) {
nodeStream->Mute();
}
} while((iter = iter->getNext()));
}
}