Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Unified Diff: chrome/browser/renderer_host/audio_renderer_host.cc

Issue 6227003: Avoid a possible race between entry deletion and a command, in the event a... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/audio_renderer_host.cc
===================================================================
--- chrome/browser/renderer_host/audio_renderer_host.cc (revision 70986)
+++ chrome/browser/renderer_host/audio_renderer_host.cc (working copy)
@@ -460,7 +460,7 @@
AudioEntryMap::iterator i = audio_entries_.find(
AudioEntryId(route_id, stream_id));
- if (i != audio_entries_.end())
+ if (i != audio_entries_.end() && !i->second->pending_close)
return i->second;
return NULL;
}
@@ -473,7 +473,7 @@
// TODO(hclam): Implement a faster look up method.
for (AudioEntryMap::iterator i = audio_entries_.begin();
i != audio_entries_.end(); ++i) {
- if (controller == i->second->controller.get())
+ if (!i->second->pending_close && controller == i->second->controller.get())
return i->second;
}
return NULL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698