Index: base/task_scheduler/post_task.cc |
diff --git a/base/task_scheduler/post_task.cc b/base/task_scheduler/post_task.cc |
index 6da11bd8dc15061bc6f0d23536b6df945c379adf..ec4bfb50f2dd8572f494e521a76ef3794daac9a5 100644 |
--- a/base/task_scheduler/post_task.cc |
+++ b/base/task_scheduler/post_task.cc |
@@ -34,10 +34,10 @@ class PostTaskAndReplyTaskRunner : public internal::PostTaskAndReplyImpl { |
// explicitly in |traits|, the returned TaskTraits have the current |
// TaskPriority. |
TaskTraits GetTaskTraitsWithExplicitPriority(const TaskTraits& traits) { |
- return traits.priority_set_explicitly() |
- ? traits |
- : TaskTraits(traits).WithPriority( |
- internal::GetTaskPriorityForCurrentThread()); |
+ if (traits.priority_set_explicitly()) |
+ return traits; |
+ return TaskTraits::Override(traits, |
+ {internal::GetTaskPriorityForCurrentThread()}); |
} |
} // namespace |