summaryrefslogtreecommitdiffstats
path: root/base/message_loop.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 00:53:48 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-26 00:53:48 +0000
commit8d6ab8f55fd416074c751242e23634476a19b9ca (patch)
tree7b9217567bb114c4cbede21418c669fd67907443 /base/message_loop.cc
parenta87078352ef50bf6ea9ebc3598a7d23c17e69817 (diff)
downloadchromium_src-8d6ab8f55fd416074c751242e23634476a19b9ca.zip
chromium_src-8d6ab8f55fd416074c751242e23634476a19b9ca.tar.gz
chromium_src-8d6ab8f55fd416074c751242e23634476a19b9ca.tar.bz2
Add MessageLoop::AssertIdle(). Use in ChromeOS audio threads.
BUG=chrome-os:11110 TEST=existing Review URL: http://codereview.chromium.org/6374010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72576 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r--base/message_loop.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 518a0fd..d83adcc 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: