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

Unified Diff: base/threading/thread.cc

Issue 7529003: Make base::MessageLoops have names at construction time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add name argument to MessageLoop Created 9 years, 5 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 7a100ca3610f1c29b7e0f1805e7ceef95361ea82..a3ac8ec12a35cbabc751aacc157fecdccadaab1f 100644
--- a/base/threading/thread.cc
+++ b/base/threading/thread.cc
@@ -143,13 +143,11 @@ bool Thread::GetThreadWasQuitProperly() {
void Thread::ThreadMain() {
{
// The message loop for this thread.
- MessageLoop message_loop(startup_data_->options.message_loop_type);
+ MessageLoop message_loop(name_.c_str(),
+ startup_data_->options.message_loop_type);
// Complete the initialization of our Thread object.
thread_id_ = PlatformThread::CurrentId();
- PlatformThread::SetName(name_.c_str());
- ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector.
- message_loop.set_thread_name(name_);
message_loop_ = &message_loop;
message_loop_proxy_ = MessageLoopProxy::CreateForCurrentThread();

Powered by Google App Engine
This is Rietveld 408576698