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

Unified Diff: base/threading/thread.cc

Issue 8233037: Update task tracking to not depend on message_loop_ singleton (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
===================================================================
--- base/threading/thread.cc (revision 104925)
+++ base/threading/thread.cc (working copy)
@@ -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 @@
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::FactoryGet(name_.c_str());
+#endif // TRACK_ALL_TASK_OBJECTS
// Let the thread do extra initialization.
// Let's do this before signaling we are started.
« no previous file with comments | « base/message_loop.cc ('k') | base/threading/worker_pool_posix.h » ('j') | base/tracked_objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698