diff options
Diffstat (limited to 'chromium/base/threading/thread.cc')
-rw-r--r-- | chromium/base/threading/thread.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/chromium/base/threading/thread.cc b/chromium/base/threading/thread.cc index ad1360be3e4..0e4aab2c354 100644 --- a/chromium/base/threading/thread.cc +++ b/chromium/base/threading/thread.cc @@ -6,11 +6,13 @@ #include "base/bind.h" #include "base/lazy_instance.h" +#include "base/location.h" +#include "base/profiler/scoped_tracker.h" +#include "base/synchronization/waitable_event.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" #if defined(OS_WIN) #include "base/win/scoped_com_initializer.h" @@ -111,6 +113,11 @@ bool Thread::StartWithOptions(const Options& options) { return false; } + // TODO(kinuko): Remove once crbug.com/465458 is solved. + tracked_objects::ScopedTracker tracking_profile_wait( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "465458 base::Thread::StartWithOptions (Wait)")); + // Wait for the thread to start and initialize message_loop_ base::ThreadRestrictions::ScopedAllowWait allow_wait; startup_data.event.Wait(); @@ -156,7 +163,7 @@ void Thread::StopSoon() { return; stopping_ = true; - message_loop_->PostTask(FROM_HERE, base::Bind(&ThreadQuitHelper)); + task_runner()->PostTask(FROM_HERE, base::Bind(&ThreadQuitHelper)); } bool Thread::IsRunning() const { @@ -201,7 +208,7 @@ void Thread::ThreadMain() { // Complete the initialization of our Thread object. thread_id_ = PlatformThread::CurrentId(); - PlatformThread::SetName(name_.c_str()); + PlatformThread::SetName(name_); ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector. message_loop->set_thread_name(name_); message_loop->SetTimerSlack(startup_data_->options.timer_slack); |