diff options
Diffstat (limited to 'chromium/base/synchronization/lock.h')
-rw-r--r-- | chromium/base/synchronization/lock.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chromium/base/synchronization/lock.h b/chromium/base/synchronization/lock.h index f384e414728..81e274809f8 100644 --- a/chromium/base/synchronization/lock.h +++ b/chromium/base/synchronization/lock.h @@ -6,6 +6,7 @@ #define BASE_SYNCHRONIZATION_LOCK_H_ #include "base/base_export.h" +#include "base/logging.h" #include "base/synchronization/lock_impl.h" #include "base/threading/platform_thread.h" @@ -16,7 +17,7 @@ namespace base { // AssertAcquired() method. class BASE_EXPORT Lock { public: -#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON) +#if !DCHECK_IS_ON() // Optimized wrapper implementation Lock() : lock_() {} ~Lock() {} @@ -56,7 +57,7 @@ class BASE_EXPORT Lock { } void AssertAcquired() const; -#endif // NDEBUG && !DCHECK_ALWAYS_ON +#endif // DCHECK_IS_ON() #if defined(OS_POSIX) // The posix implementation of ConditionVariable needs to be able @@ -70,7 +71,7 @@ class BASE_EXPORT Lock { #endif private: -#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) +#if DCHECK_IS_ON() // Members and routines taking care of locks assertions. // Note that this checks for recursive locks and allows them // if the variable is set. This is allowed by the underlying implementation @@ -82,7 +83,7 @@ class BASE_EXPORT Lock { // All private data is implicitly protected by lock_. // Be VERY careful to only access members under that lock. base::PlatformThreadRef owning_thread_ref_; -#endif // !NDEBUG || DCHECK_ALWAYS_ON +#endif // DCHECK_IS_ON() // Platform specific underlying lock implementation. internal::LockImpl lock_; |