diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-25 14:45:39 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-25 14:45:39 +0000 |
commit | 97f4fedbc16a3d1729acb8cfe1a7c892f840efa8 (patch) | |
tree | d01195ea3ad5aa60230724b737bdac496aca858d /base | |
parent | 27abf503d7de0fde7178f8e69fe387a27f8e1d06 (diff) | |
download | chromium_src-97f4fedbc16a3d1729acb8cfe1a7c892f840efa8.zip chromium_src-97f4fedbc16a3d1729acb8cfe1a7c892f840efa8.tar.gz chromium_src-97f4fedbc16a3d1729acb8cfe1a7c892f840efa8.tar.bz2 |
Reverting 5971.
Review URL: http://codereview.chromium.org/12637
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/thread.cc | 3 | ||||
-rw-r--r-- | base/thread_unittest.cc | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/base/thread.cc b/base/thread.cc index 9bc81a4..fd076a4 100644 --- a/base/thread.cc +++ b/base/thread.cc @@ -131,6 +131,9 @@ void Thread::StopSoon() { DCHECK(message_loop_); message_loop_->PostTask(FROM_HERE, new ThreadQuitTask()); + + // The thread can't receive messages anymore. + message_loop_ = NULL; } void Thread::ThreadMain() { diff --git a/base/thread_unittest.cc b/base/thread_unittest.cc index f11cb8d..c1971c2 100644 --- a/base/thread_unittest.cc +++ b/base/thread_unittest.cc @@ -97,8 +97,8 @@ TEST_F(ThreadTest, StopSoon) { EXPECT_TRUE(a.Start()); EXPECT_TRUE(a.message_loop()); a.StopSoon(); + EXPECT_FALSE(a.message_loop()); a.StopSoon(); - a.Stop(); EXPECT_FALSE(a.message_loop()); } |