Index: base/message_loop.h |
diff --git a/base/message_loop.h b/base/message_loop.h |
index 7a3af6ef885800d34bf41c9ec274efcda4d8a8fd..8b51842472765e6f03e80ac4bb32f4c20c272127 100644 |
--- a/base/message_loop.h |
+++ b/base/message_loop.h |
@@ -315,6 +315,10 @@ class MessageLoop : public base::MessagePump::Delegate { |
// for at least 1s. |
static const int kHighResolutionTimerModeLeaseTimeMs = 1000; |
+ // Asserts that the MessageLoop is "idle". in reality, we only check |
+ // |incoming_queue_|, since we don't want to lock |work_queue_|. |
+ void AssertIdle() const; |
+ |
//---------------------------------------------------------------------------- |
protected: |
struct RunState { |
@@ -461,12 +465,12 @@ class MessageLoop : public base::MessagePump::Delegate { |
scoped_refptr<base::Histogram> message_histogram_; |
// A null terminated list which creates an incoming_queue of tasks that are |
- // aquired under a mutex for processing on this instance's thread. These tasks |
+ // acquired under a mutex for processing on this instance's thread. These tasks |
// have not yet been sorted out into items for our work_queue_ vs items that |
// will be handled by the TimerManager. |
TaskQueue incoming_queue_; |
// Protect access to incoming_queue_. |
- base::Lock incoming_queue_lock_; |
+ mutable base::Lock incoming_queue_lock_; |
RunState* state_; |