Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1892)

Unified Diff: base/task_scheduler/task_tracker.cc

Issue 2557083002: Run ScopedTaskScheduler tasks synchronously. (Closed)
Patch Set: git cl try Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/task_scheduler/task_tracker.cc
diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc
index 4c1ee8da3dd285ea1f668cab15b4f4565e91059e..e28148b96221e8a5ddc7fda27234cf7726d33f5b 100644
--- a/base/task_scheduler/task_tracker.cc
+++ b/base/task_scheduler/task_tracker.cc
@@ -288,6 +288,14 @@ bool TaskTracker::IsShutdownComplete() const {
}
void TaskTracker::SetHasShutdownStartedForTesting() {
+ AutoSchedulerLock auto_lock(shutdown_lock_);
+
+ // Create |shutdown_event_| to avoid a DCHECK failure when a task blocking
gab 2016/12/08 20:15:45 // Create a dummy |shutdown_event_| to satisfy Tas
fdoray 2016/12/09 16:26:41 Done.
+ // shutdown completes its execution.
+ shutdown_event_.reset(
+ new WaitableEvent(WaitableEvent::ResetPolicy::MANUAL,
+ WaitableEvent::InitialState::NOT_SIGNALED));
+
state_->StartShutdown();
}

Powered by Google App Engine
This is Rietveld 408576698