summaryrefslogtreecommitdiffstats
path: root/chromium/base/threading/thread.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-29 16:16:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-09 10:04:06 +0000
commita95a7417ad456115a1ef2da4bb8320531c0821f1 (patch)
treeedcd59279e486d2fd4a8f88a7ed025bcf925c6e6 /chromium/base/threading/thread.cc
parent33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (diff)
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 <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/threading/thread.cc')
-rw-r--r--chromium/base/threading/thread.cc19
1 files changed, 11 insertions, 8 deletions
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;