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

Unified Diff: chrome/browser/chromeos/audio_mixer_pulse.cc

Issue 6254016: SetIOAllowed when stopping worker audio threads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos
Patch Set: formatting 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 | « chrome/browser/chromeos/audio_mixer_alsa.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/audio_mixer_pulse.cc
diff --git a/chrome/browser/chromeos/audio_mixer_pulse.cc b/chrome/browser/chromeos/audio_mixer_pulse.cc
index ddff1358278ed6cc0f4b4765917e2ca5a1522162..42b268a3b77a5c6c5e509307cfcd596a5ccc4395 100644
--- a/chrome/browser/chromeos/audio_mixer_pulse.cc
+++ b/chrome/browser/chromeos/audio_mixer_pulse.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/task.h"
+#include "base/threading/thread_restrictions.h"
namespace chromeos {
@@ -59,6 +60,11 @@ AudioMixerPulse::AudioMixerPulse()
AudioMixerPulse::~AudioMixerPulse() {
PulseAudioFree();
if (thread_ != NULL) {
+ // A ScopedAllowIO object is required to join the thread when calling Stop.
+ // The worker thread should be idle at this time.
+ // See http://crosbug.com/11110 for discussion.
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_thread_join;
+
thread_->Stop();
thread_.reset();
}
« no previous file with comments | « chrome/browser/chromeos/audio_mixer_alsa.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698