summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 23:05:30 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 23:05:30 +0000
commitd1f173980bbf7dffb92b5857866dd75156ad2157 (patch)
tree18009f3f08be4656e8b2688b28f7690eeddb5035
parent072a10b3b6642a21ad0b19a3516eba135400e677 (diff)
downloadchromium_src-d1f173980bbf7dffb92b5857866dd75156ad2157.zip
chromium_src-d1f173980bbf7dffb92b5857866dd75156ad2157.tar.gz
chromium_src-d1f173980bbf7dffb92b5857866dd75156ad2157.tar.bz2
Remove a DCHECK in RenderView::CloseAudioStream
Allow an audio stream to be closed multiple times, use an if statement instead of DCHECK. TBR=cpu Review URL: http://codereview.chromium.org/60107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13122 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/renderer/render_view.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index a13c74f..91d93119 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2950,11 +2950,13 @@ void RenderView::StartAudioStream(int stream_id) {
void RenderView::CloseAudioStream(int stream_id) {
DCHECK(RenderThread::current()->message_loop() == MessageLoop::current());
- DCHECK(audio_renderers_.Lookup(stream_id) != NULL);
- // Remove the entry from the map and send a close message to browser process,
- // we won't be getting anything back from browser even if there's an error.
- audio_renderers_.Remove(stream_id);
- Send(new ViewHostMsg_CloseAudioStream(routing_id_, stream_id));
+ if (audio_renderers_.Lookup(stream_id) != NULL) {
+ // Remove the entry from the map and send a close message to browser
+ // process, we won't be getting anything back from browser even if there's
+ // an error.
+ audio_renderers_.Remove(stream_id);
+ Send(new ViewHostMsg_CloseAudioStream(routing_id_, stream_id));
+ }
}
void RenderView::NotifyAudioPacketReady(int stream_id, size_t size) {