From 59c771fe7a186d88ea1376a69260ea693ef58665 Mon Sep 17 00:00:00 2001 From: "jar@chromium.org" Date: Mon, 17 Oct 2011 15:48:55 +0000 Subject: Establish correct names for about:tracking profiler This file was mistakenly ommited from the recent landing, so the thread names were not being set (all threads other than the main thread wer assigned sequential "WorkerThread-N" names). r=eroman Review URL: http://codereview.chromium.org/8315010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105814 0039d316-1c4b-4281-b951-d872f2087c98 --- base/threading/thread.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'base') diff --git a/base/threading/thread.cc b/base/threading/thread.cc index 616aac8..2a8d999 100644 --- a/base/threading/thread.cc +++ b/base/threading/thread.cc @@ -8,6 +8,7 @@ #include "base/third_party/dynamic_annotations/dynamic_annotations.h" #include "base/threading/thread_local.h" #include "base/synchronization/waitable_event.h" +#include "base/tracked_objects.h" namespace base { @@ -151,6 +152,9 @@ void Thread::ThreadMain() { ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector. message_loop.set_thread_name(name_); message_loop_ = &message_loop; +#if defined(TRACK_ALL_TASK_OBJECTS) + tracked_objects::ThreadData::InitializeThreadContext(name_); +#endif // TRACK_ALL_TASK_OBJECTS // Let the thread do extra initialization. // Let's do this before signaling we are started. -- cgit v1.1