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

Unified Diff: base/task_scheduler/task_tracker.cc

Issue 2916673003: Disable DCHECK for no BLOCK_SHUTDOWN posted after TaskScheduler shutdown. (Closed)
Patch Set: fix BlockShutdown/TaskSchedulerTaskTrackerTest.WillPostAfterShutdown Created 3 years, 7 months 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 ebf43152064e1a407d5a87629b509936b7aec768..4a7ca94ff7e877b4170f01bd22a60d88d3ccd880 100644
--- a/base/task_scheduler/task_tracker.cc
+++ b/base/task_scheduler/task_tracker.cc
@@ -405,12 +405,18 @@ bool TaskTracker::BeforePostTask(TaskShutdownBehavior shutdown_behavior) {
// ordering bug. This aims to catch those early.
DCHECK(shutdown_event_);
if (shutdown_event_->IsSignaled()) {
+#if DCHECK_IS_ON()
+// clang-format off
// TODO(robliao): http://crbug.com/698140. Since the service thread
// doesn't stop processing its own tasks at shutdown, we may still
// attempt to post a BLOCK_SHUTDOWN task in response to a
- // FileDescriptorWatcher.
-#if DCHECK_IS_ON()
- DCHECK(IsPostingBlockShutdownTaskAfterShutdownAllowed());
+ // FileDescriptorWatcher. Same is true for FilePathWatcher
+ // (http://crbug.com/728235). Until it's possible for such services to
+ // post to non-BLOCK_SHUTDOWN sequences which are themselves funneled to
+ // the main execution sequence (a future plan for the post_task.h API),
+ // this DCHECK will be flaky and must be disabled.
+ // DCHECK(IsPostingBlockShutdownTaskAfterShutdownAllowed());
+// clang-format on
#endif
state_->DecrementNumTasksBlockingShutdown();
return false;
« no previous file with comments | « no previous file | base/task_scheduler/task_tracker_unittest.cc » ('j') | base/task_scheduler/task_tracker_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698