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

Unified Diff: base/message_loop.cc

Issue 6374010: Add MessageLoop::AssertIdle(). Use in ChromeOS audio threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments. 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 | « base/message_loop.h ('k') | chrome/browser/chromeos/audio_mixer_alsa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 518a0fd25989864f1dcbe539f10c4f51e5b44384..d83adccec08b56f8cdeb991c1b06af60d7a877e0 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -286,6 +286,12 @@ void MessageLoop::RemoveTaskObserver(TaskObserver* task_observer) {
task_observers_.RemoveObserver(task_observer);
}
+void MessageLoop::AssertIdle() const {
+ // We only check |incoming_queue_|, since we don't want to lock |work_queue_|.
+ base::AutoLock lock(incoming_queue_lock_);
+ DCHECK(incoming_queue_.empty());
+}
+
//------------------------------------------------------------------------------
// Runs the loop in two different SEH modes:
« no previous file with comments | « base/message_loop.h ('k') | chrome/browser/chromeos/audio_mixer_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698