From e684a3455bcc29a6e3e66a004e352dea4e1141e7 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 13 Feb 2019 15:05:36 +0100 Subject: BASELINE: Update Chromium to 72.0.3626.110 and Ninja to 1.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic57220b00ecc929a893c91f5cc552f5d3e99e922 Reviewed-by: Michael BrĂ¼ning --- chromium/base/threading/thread.cc | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) (limited to 'chromium/base/threading/thread.cc') diff --git a/chromium/base/threading/thread.cc b/chromium/base/threading/thread.cc index cbdda7e63db..86062857918 100644 --- a/chromium/base/threading/thread.cc +++ b/chromium/base/threading/thread.cc @@ -11,7 +11,6 @@ #include "base/logging.h" #include "base/run_loop.h" #include "base/synchronization/waitable_event.h" -#include "base/task/sequence_manager/sequence_manager.h" #include "base/third_party/dynamic_annotations/dynamic_annotations.h" #include "base/threading/thread_id_name_manager.h" #include "base/threading/thread_local.h" @@ -97,18 +96,12 @@ bool Thread::StartWithOptions(const Options& options) { if (!options.message_pump_factory.is_null()) type = MessageLoop::TYPE_CUSTOM; - message_loop_timer_slack_ = options.timer_slack; + timer_slack_ = options.timer_slack; std::unique_ptr message_loop_owned = MessageLoop::CreateUnbound(type, options.message_pump_factory); message_loop_ = message_loop_owned.get(); start_event_.Reset(); - if (options.on_sequence_manager_created) { - sequence_manager_ = - sequence_manager::CreateUnboundSequenceManager(message_loop_); - options.on_sequence_manager_created.Run(sequence_manager_.get()); - } - // Hold |thread_lock_| while starting the new thread to synchronize with // Stop() while it's not guaranteed to be sequenced (until crbug/629139 is // fixed). @@ -232,11 +225,6 @@ PlatformThreadId Thread::GetThreadId() const { return id_; } -PlatformThreadHandle Thread::GetThreadHandle() const { - AutoLock lock(thread_lock_); - return thread_; -} - bool Thread::IsRunning() const { // TODO(gab): Fix improper usage of this API (http://crbug.com/629139) and // enable this check. @@ -305,31 +293,18 @@ void Thread::ThreadMain() { PlatformThread::SetName(name_.c_str()); ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector. - if (sequence_manager_) { - // Bind the SequenceManager before binding the MessageLoop, so that the - // TaskQueues are bound before the MessageLoop. This is required as one of - // the TaskQueues may have already replaced the MessageLoop's TaskRunner, - // and the MessageLoop's TaskRunner needs to be associated with this thread - // when we call MessageLoop::BindToCurrentThread(). - sequence_manager_->BindToCurrentThread(); - } - // Lazily initialize the |message_loop| so that it can run on this thread. DCHECK(message_loop_); std::unique_ptr message_loop(message_loop_); message_loop_->BindToCurrentThread(); - message_loop_->SetTimerSlack(message_loop_timer_slack_); - - if (sequence_manager_) { - sequence_manager_->CompleteInitializationOnBoundThread(); - } + message_loop_->SetTimerSlack(timer_slack_); #if defined(OS_POSIX) && !defined(OS_NACL) // Allow threads running a MessageLoopForIO to use FileDescriptorWatcher API. std::unique_ptr file_descriptor_watcher; - if (MessageLoopForIO::IsCurrent()) { - file_descriptor_watcher.reset(new FileDescriptorWatcher( - static_cast(message_loop_))); + if (MessageLoopCurrentForIO::IsSet()) { + file_descriptor_watcher.reset( + new FileDescriptorWatcher(message_loop_->task_runner())); } #endif @@ -368,8 +343,6 @@ void Thread::ThreadMain() { com_initializer.reset(); #endif - sequence_manager_.reset(); - if (message_loop->type() != MessageLoop::TYPE_CUSTOM) { // Assert that RunLoop::QuitWhenIdle was called by ThreadQuitHelper. Don't // check for custom message pumps, because their shutdown might not allow -- cgit v1.2.3