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

Unified Diff: base/threading/thread.cc

Issue 11438022: Add ability to retrieve a thread_name given a thread_id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the set to PlatformThread::SetName so we catch any name changes. Created 8 years 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 f4ba3ff80aba57ddf85e949bb5a204817cf2fced..9487c83d1b515b9c4d2c8549e9b913cc714c2a5b 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "base/threading/thread_id_name_manager.h"
#include "base/threading/thread_local.h"
#include "base/threading/thread_restrictions.h"
#include "base/synchronization/waitable_event.h"
@@ -65,6 +66,7 @@ Thread::Thread(const char* name)
Thread::~Thread() {
Stop();
+ ThreadIdNameManager::GetInstance()->RemoveNameForId(thread_id_);
}
bool Thread::Start() {

Powered by Google App Engine
This is Rietveld 408576698