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

Unified Diff: synchronization/lock.h

Issue 2045223003: Update to Chromium //base at Chromium commit 82baa9afc6620c68cb2168f20bb65e77e3e57f0a. (Closed) Base URL: https://github.com/domokit/base.git@master
Patch Set: Created 4 years, 6 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 | « synchronization/condition_variable_win.cc ('k') | synchronization/lock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: synchronization/lock.h
diff --git a/synchronization/lock.h b/synchronization/lock.h
index f384e4147281b1d245676f4a3f03db60e631ce5a..b6afecba0d9e9846b893aa3839fcbd0339a7815b 100644
--- a/synchronization/lock.h
+++ b/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,8 +17,8 @@ namespace base {
// AssertAcquired() method.
class BASE_EXPORT Lock {
public:
-#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
- // Optimized wrapper implementation
+#if !DCHECK_IS_ON()
+ // Optimized wrapper implementation
Lock() : lock_() {}
~Lock() {}
void Acquire() { 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_;
« no previous file with comments | « synchronization/condition_variable_win.cc ('k') | synchronization/lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698