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

Unified Diff: base/task_scheduler/task_tracker_posix.cc

Issue 2857103005: Exempt the Service Thread from BLOCK_SHUTDOWN DCHECKs (Closed)
Patch Set: CR Feedback + Additional DCHECK_IS_ON due to the way DCHECKs are implemented Created 3 years, 8 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_posix.cc
diff --git a/base/task_scheduler/task_tracker_posix.cc b/base/task_scheduler/task_tracker_posix.cc
index ef73a08a9233086839ff49414d11fcbadf2b57ea..0db2d55086c038b26105213746589dd3e2dd3059 100644
--- a/base/task_scheduler/task_tracker_posix.cc
+++ b/base/task_scheduler/task_tracker_posix.cc
@@ -7,7 +7,6 @@
#include <utility>
#include "base/files/file_descriptor_watcher_posix.h"
-#include "base/logging.h"
namespace base {
namespace internal {
@@ -22,5 +21,11 @@ void TaskTrackerPosix::PerformRunTask(std::unique_ptr<Task> task) {
TaskTracker::PerformRunTask(std::move(task));
}
+#if DCHECK_IS_ON()
+bool TaskTrackerPosix::IsExemptFromBlockingShutdownChecks() {
+ return service_thread_handle_.is_equal(PlatformThread::CurrentHandle());
+}
+#endif
+
} // namespace internal
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698