Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3444)

Unified Diff: base/threading/thread.cc

Issue 14634009: Move Thread Name Mapping into ThreadFunc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/threading/thread.cc
diff --git a/base/threading/thread.cc b/base/threading/thread.cc
index 35e88a70569a2b6dfcae8122bab5290d57ed140a..c024d3a939fc270f2eba1c90e16a10678d67b0f2 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -66,7 +66,6 @@ Thread::Thread(const char* name)
Thread::~Thread() {
Stop();
- ThreadIdNameManager::GetInstance()->RemoveName(thread_id_);
}
bool Thread::Start() {
@@ -121,6 +120,8 @@ void Thread::Stop() {
//
PlatformThread::Join(thread_);
+ ThreadIdNameManager::GetInstance()->RemoveName(&thread_, thread_id_);
+
// The thread should NULL message_loop_ on exit.
DCHECK(!message_loop_);

Powered by Google App Engine
This is Rietveld 408576698