Chromium Code Reviews| Index: base/task_scheduler/task_tracker.cc |
| diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc |
| index 49a33be8c24b113f82c0ab0a1ad1047465aee2bb..5b514a61aa6ba3152ccc9b4b6ea2f438c912a0e6 100644 |
| --- a/base/task_scheduler/task_tracker.cc |
| +++ b/base/task_scheduler/task_tracker.cc |
| @@ -225,6 +225,8 @@ bool TaskTracker::RunTask(std::unique_ptr<Task> task, |
| TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN); |
| const bool previous_io_allowed = |
| ThreadRestrictions::SetIOAllowed(task->traits.with_file_io()); |
| + const bool previous_wait_allowed = |
| + ThreadRestrictions::SetWaitAllowed(task->traits.with_wait()); |
| { |
| // Set up SequenceToken as expected for the scope of the task. |
| @@ -263,6 +265,7 @@ bool TaskTracker::RunTask(std::unique_ptr<Task> task, |
| ThreadRestrictions::SetSingletonAllowed(previous_singleton_allowed); |
| ThreadRestrictions::SetIOAllowed(previous_io_allowed); |
| + ThreadRestrictions::SetWaitAllowed(previous_wait_allowed); |
|
robliao
2016/11/28 20:09:50
Nit: Order above SetIOAllowed for symmetry. We sho
fdoray
2016/11/28 21:47:51
Done.
|
| AfterRunTask(shutdown_behavior); |
| } |