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

Unified Diff: media/audio/audio_manager_base.cc

Issue 2929823002: Making AudioManagerBase::ShutdownOnAudioThread() platform-agnostic (Closed)
Patch Set: moving closing streams to AudioManagerMac Created 3 years, 5 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
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index 92a255d095cfb22ed58b36b766c22aa8084b2d58..5565d4864b2f8e97756d4923d1322a750d65f376 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -348,21 +348,6 @@ void AudioManagerBase::ShutdownOnAudioThread() {
// Close all output streams.
output_dispatchers_.clear();
-
-#if defined(OS_MACOSX)
- // On mac, AudioManager runs on the main thread, loop for which stops
- // processing task queue at this point. So even if tasks to close the
- // streams are enqueued, they would not run leading to CHECKs getting hit
- // in the destructor about open streams. Close them explicitly here.
- // crbug.com/608049.
- for (auto iter = input_streams_.begin(); iter != input_streams_.end();) {
- // Note: Closing the stream will invalidate the iterator.
- // Increment the iterator before closing the stream.
- AudioInputStream* stream = *iter++;
- stream->Close();
- }
- CHECK(input_streams_.empty());
-#endif // OS_MACOSX
}
void AudioManagerBase::AddOutputDeviceChangeListener(

Powered by Google App Engine
This is Rietveld 408576698