Index: base/task_scheduler/task.cc |
diff --git a/base/task_scheduler/task.cc b/base/task_scheduler/task.cc |
index fc513e3e9fb53945bc22b21185430457e9e382ea..3cf26be0be41fee8bf77af36a34fcd70aabdc6cb 100644 |
--- a/base/task_scheduler/task.cc |
+++ b/base/task_scheduler/task.cc |
@@ -24,11 +24,12 @@ Task::Task(const tracked_objects::Location& posted_from, |
false), // Not nestable. |
// Prevent a delayed BLOCK_SHUTDOWN task from blocking shutdown before |
// being scheduled by changing its shutdown behavior to SKIP_ON_SHUTDOWN. |
- traits(!delay.is_zero() && traits.shutdown_behavior() == |
- TaskShutdownBehavior::BLOCK_SHUTDOWN |
- ? TaskTraits(traits).WithShutdownBehavior( |
- TaskShutdownBehavior::SKIP_ON_SHUTDOWN) |
- : traits), |
+ traits( |
+ (!delay.is_zero() && |
+ traits.shutdown_behavior() == TaskShutdownBehavior::BLOCK_SHUTDOWN) |
+ ? TaskTraits::Override(traits, |
+ {TaskShutdownBehavior::SKIP_ON_SHUTDOWN}) |
+ : traits), |
delay(delay) {} |
Task::~Task() = default; |