From a95a7417ad456115a1ef2da4bb8320531c0821f1 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 29 Sep 2022 16:16:15 +0200 Subject: BASELINE: Update Chromium to 106.0.5249.126 Change-Id: Ib0bb21c437a7d1686e21c33f2d329f2ac425b7ab Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438936 Reviewed-by: Allan Sandfeld Jensen --- chromium/base/threading/thread.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'chromium/base/threading/thread.cc') diff --git a/chromium/base/threading/thread.cc b/chromium/base/threading/thread.cc index d6b7629236f..b3739daf11a 100644 --- a/chromium/base/threading/thread.cc +++ b/chromium/base/threading/thread.cc @@ -108,13 +108,15 @@ Thread::Options::Options() = default; Thread::Options::Options(MessagePumpType type, size_t size) : message_pump_type(type), stack_size(size) {} +Thread::Options::Options(ThreadType thread_type) : thread_type(thread_type) {} + Thread::Options::Options(Options&& other) : message_pump_type(std::move(other.message_pump_type)), delegate(std::move(other.delegate)), timer_slack(std::move(other.timer_slack)), message_pump_factory(std::move(other.message_pump_factory)), stack_size(std::move(other.stack_size)), - priority(std::move(other.priority)), + thread_type(std::move(other.thread_type)), joinable(std::move(other.joinable)) { other.moved_from = true; } @@ -127,7 +129,7 @@ Thread::Options& Thread::Options::operator=(Thread::Options&& other) { timer_slack = std::move(other.timer_slack); message_pump_factory = std::move(other.message_pump_factory); stack_size = std::move(other.stack_size); - priority = std::move(other.priority); + thread_type = std::move(other.thread_type); joinable = std::move(other.joinable); other.moved_from = true; @@ -204,12 +206,13 @@ bool Thread::StartWithOptions(Options options) { // fixed). { AutoLock lock(thread_lock_); - bool success = - options.joinable - ? PlatformThread::CreateWithPriority(options.stack_size, this, - &thread_, options.priority) - : PlatformThread::CreateNonJoinableWithPriority( - options.stack_size, this, options.priority); + bool success = options.joinable + ? PlatformThread::CreateWithType( + options.stack_size, this, &thread_, + options.thread_type, options.message_pump_type) + : PlatformThread::CreateNonJoinableWithType( + options.stack_size, this, options.thread_type, + options.message_pump_type); if (!success) { DLOG(ERROR) << "failed to create thread"; return false; -- cgit v1.2.3