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

Unified Diff: base/synchronization/condition_variable_win.cc

Issue 403803004: base: Enable lock dchecks with dchecks_always_on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix condition variable too Created 6 years, 5 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/synchronization/condition_variable_win.cc
diff --git a/base/synchronization/condition_variable_win.cc b/base/synchronization/condition_variable_win.cc
index 927362a2a7223828cb41922b2151789dae1d2520..377fc9d23bf5a28063168098fcf5995aec420f57 100644
--- a/base/synchronization/condition_variable_win.cc
+++ b/base/synchronization/condition_variable_win.cc
@@ -99,7 +99,7 @@ void WinVistaCondVar::TimedWait(const TimeDelta& max_time) {
DWORD timeout = static_cast<DWORD>(max_time.InMilliseconds());
CRITICAL_SECTION* cs = user_lock_.lock_.native_handle();
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
user_lock_.CheckHeldAndUnmark();
#endif
@@ -107,7 +107,7 @@ void WinVistaCondVar::TimedWait(const TimeDelta& max_time) {
DCHECK(GetLastError() != WAIT_TIMEOUT);
}
-#if !defined(NDEBUG)
+#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
user_lock_.CheckUnheldAndMark();
#endif
}

Powered by Google App Engine
This is Rietveld 408576698