From b0e43ad5a9c9d3ac3584e92a431abc2f35a51cc1 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 17 Mar 2013 21:26:45 -0400 Subject: [PATCH] Bug 851986 - Avoid calling a virtual function when getting the source for an AudioNodeStream; r=roc --- content/media/AudioNodeStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/media/AudioNodeStream.cpp b/content/media/AudioNodeStream.cpp index 8bc89902d4d..77d8625ba6e 100644 --- a/content/media/AudioNodeStream.cpp +++ b/content/media/AudioNodeStream.cpp @@ -184,8 +184,8 @@ AudioNodeStream::ObtainInputBlock(AudioChunk* aTmpChunk) nsAutoTArray inputChunks; for (uint32_t i = 0; i < inputCount; ++i) { MediaStream* s = mInputs[i]->GetSource(); - AudioNodeStream* a = s->AsAudioNodeStream(); - MOZ_ASSERT(a); + AudioNodeStream* a = static_cast(s); + MOZ_ASSERT(a == s->AsAudioNodeStream()); if (a->IsFinishedOnGraphThread()) { continue; }