| Index: base/task_scheduler/task_tracker.cc
|
| diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc
|
| index 55230aa93742ee3c58da9d43a2a67dc72d452cd8..89ea3e7c7f6e0d3bd14f685fd50202fe0ebe8162 100644
|
| --- a/base/task_scheduler/task_tracker.cc
|
| +++ b/base/task_scheduler/task_tracker.cc
|
| @@ -388,6 +388,12 @@ bool TaskTracker::IsPostingBlockShutdownTaskAfterShutdownAllowed() {
|
| }
|
| #endif
|
|
|
| +int TaskTracker::GetNumPendingUndelayedTasksForTesting() const {
|
| + // No barrier is required, but there is no function in base/ to read an atomic
|
| + // variable without a barrier.
|
| + return subtle::Acquire_Load(&num_pending_undelayed_tasks_);
|
| +}
|
| +
|
| bool TaskTracker::BeforePostTask(TaskShutdownBehavior shutdown_behavior) {
|
| if (shutdown_behavior == TaskShutdownBehavior::BLOCK_SHUTDOWN) {
|
| // BLOCK_SHUTDOWN tasks block shutdown between the moment they are posted
|
|
|