summaryrefslogtreecommitdiffstats
path: root/base/message_loop.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 22:06:58 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 22:06:58 +0000
commite6244c185ebd639ceb81a052a4b2037313baf24d (patch)
tree03416cada9f68020f4ad200f1e67ec82413f0850 /base/message_loop.cc
parent0dbbfcabd920a3b4e3264a3a5bfe552c70d2f43d (diff)
downloadchromium_src-e6244c185ebd639ceb81a052a4b2037313baf24d.zip
chromium_src-e6244c185ebd639ceb81a052a4b2037313baf24d.tar.gz
chromium_src-e6244c185ebd639ceb81a052a4b2037313baf24d.tar.bz2
Add CHECK to catch places where BrowserProcessImpl's refcount goes to 0.
Specifically, catch it when MessageLoop is not running. BUG=96847 TEST=none Review URL: http://codereview.chromium.org/8343033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108177 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r--base/message_loop.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index c1d4abb..f72ded1 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -408,6 +408,11 @@ void MessageLoop::AssertIdle() const {
DCHECK(incoming_queue_.empty());
}
+bool MessageLoop::is_running() const {
+ DCHECK_EQ(this, current());
+ return state_ != NULL;
+}
+
//------------------------------------------------------------------------------
// Runs the loop in two different SEH modes: