diff options
author | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 05:32:38 +0000 |
---|---|---|
committer | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 05:32:38 +0000 |
commit | a0297bd51972f4bb0a1396979d57c78c015dd508 (patch) | |
tree | 0cef761002084a797cc4c8c8fda9fbe07117faea /base/thread.h | |
parent | b7243c40f2c0e4742843d56d0a46c3d5ba2008d1 (diff) | |
download | chromium_src-a0297bd51972f4bb0a1396979d57c78c015dd508.zip chromium_src-a0297bd51972f4bb0a1396979d57c78c015dd508.tar.gz chromium_src-a0297bd51972f4bb0a1396979d57c78c015dd508.tar.bz2 |
Fix an issue in Thread class where we initialize a pointer, which
is a class member, with stack variable and keep its value.
BUG=48772
TEST=none
Review URL: http://codereview.chromium.org/3045008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/thread.h')
-rw-r--r-- | base/thread.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/thread.h b/base/thread.h index b5a87eb..351a671 100644 --- a/base/thread.h +++ b/base/thread.h @@ -154,9 +154,10 @@ class Thread : PlatformThread::Delegate { // PlatformThread::Delegate methods: virtual void ThreadMain(); - // We piggy-back on the startup_data_ member to know if we successfully - // started the thread. This way we know that we need to call Join. - bool thread_was_started() const { return startup_data_ != NULL; } + bool thread_was_started() const { return started_; } + + // Whether we successfully started the thread. + bool started_; // If true, we're in the middle of stopping, and shouldn't access // |message_loop_|. It may non-NULL and invalid. |