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

Unified Diff: base/task_scheduler/task_tracker.cc

Issue 2916673003: Disable DCHECK for no BLOCK_SHUTDOWN posted after TaskScheduler shutdown. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
robliao 2017/05/31 21:33:54 Tab this one more to the right
gab 2017/06/01 13:52:30 Why? This is aligned with the code inside the if a
robliao 2017/06/01 17:00:53 Ah interesting! This was a rendering bug in mobile
+ // (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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698