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

Unified Diff: media/audio/audio_output_controller.cc

Issue 10151009: Disallow UI/IO thread blocking on any other thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « content/browser/renderer_host/text_input_client_mac.mm ('k') | net/base/file_stream_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_controller.cc
===================================================================
--- media/audio/audio_output_controller.cc (revision 133458)
+++ media/audio/audio_output_controller.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/message_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/platform_thread.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time.h"
using base::Time;
@@ -42,6 +43,8 @@
if (!message_loop_.get() || message_loop_->BelongsToCurrentThread()) {
DoStopCloseAndClearStream(NULL);
} else {
+ // http://crbug.com/120973
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
WaitableEvent completion(true /* manual reset */,
false /* initial state */);
message_loop_->PostTask(FROM_HERE,
« no previous file with comments | « content/browser/renderer_host/text_input_client_mac.mm ('k') | net/base/file_stream_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698