Index: threading/thread_checker.h |
diff --git a/threading/thread_checker.h b/threading/thread_checker.h |
index 449247af9dd5e56626d65916bd532c120469cef6..1d970f093ed74b4d8f71c8d0c34006a10f171f3f 100644 |
--- a/threading/thread_checker.h |
+++ b/threading/thread_checker.h |
@@ -5,23 +5,19 @@ |
#ifndef BASE_THREADING_THREAD_CHECKER_H_ |
#define BASE_THREADING_THREAD_CHECKER_H_ |
+#include "base/logging.h" |
+#include "base/threading/thread_checker_impl.h" |
+ |
// Apart from debug builds, we also enable the thread checker in |
// builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots |
// with this define will get the same level of thread checking as |
// debug bots. |
-// |
-// Note that this does not perfectly match situations where DCHECK is |
-// enabled. For example a non-official release build may have |
-// DCHECK_ALWAYS_ON undefined (and therefore ThreadChecker would be |
-// disabled) but have DCHECKs enabled at runtime. |
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) |
+#if DCHECK_IS_ON() |
#define ENABLE_THREAD_CHECKER 1 |
#else |
#define ENABLE_THREAD_CHECKER 0 |
#endif |
-#include "base/threading/thread_checker_impl.h" |
- |
namespace base { |
// Do nothing implementation, for use in release mode. |