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 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; |