summaryrefslogtreecommitdiffstats
path: root/base/thread.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 03:08:44 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 03:08:44 +0000
commit2984008f7136500a2831160f72846b94640b37ff (patch)
treeee92610da0b816c419b79f44000ee6752aabb037 /base/thread.h
parent3f6d3a27d274d2f71a3c94e711698447f8a3993e (diff)
downloadchromium_src-2984008f7136500a2831160f72846b94640b37ff.zip
chromium_src-2984008f7136500a2831160f72846b94640b37ff.tar.gz
chromium_src-2984008f7136500a2831160f72846b94640b37ff.tar.bz2
Revert 43127 [It resulted in a free memory write because of a consumer that was relying on the old ordering (BUG=39932).]
Don't call Thread::CleanUp() before the MessageLoop destruction observers have run. This is consistent with the comment for Thread::CleanUp(), which says it runs after the message loop has "stopped". Certain consumers depend on this ordering to avoid accessing variables which are deleted by Thread::CleanUp(). BUG=39723 TEST=ThreadTest.CleanUp Review URL: http://codereview.chromium.org/1540002 TBR=eroman@chromium.org Review URL: http://codereview.chromium.org/1517006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43174 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/thread.h')
-rw-r--r--base/thread.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/base/thread.h b/base/thread.h
index 75ea0b1..1f2690c 100644
--- a/base/thread.h
+++ b/base/thread.h
@@ -35,7 +35,7 @@ class Thread : PlatformThread::Delegate {
// Constructor.
// name is a display string to identify the thread.
- explicit Thread(const char* name);
+ explicit Thread(const char *name);
// Destroys the thread, stopping it if necessary.
//
@@ -117,8 +117,7 @@ class Thread : PlatformThread::Delegate {
// Called to start the message loop
virtual void Run(MessageLoop* message_loop);
- // Called just after the message loop ends. At this point, all of the
- // MessageLoop::DestructionObservers have already been notified.
+ // Called just after the message loop ends
virtual void CleanUp() {}
static void SetThreadWasQuitProperly(bool flag);