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

Unified Diff: base/synchronization/condition_variable_win.cc

Issue 2053403002: Fix Windows Condition Variable GetLastError Check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/condition_variable_win.cc
diff --git a/base/synchronization/condition_variable_win.cc b/base/synchronization/condition_variable_win.cc
index 61c6a715e0eccd8557338193f7f8313ab431b9ce..d5f24e4438753471dc38b0e48a0ae680477eafb2 100644
--- a/base/synchronization/condition_variable_win.cc
+++ b/base/synchronization/condition_variable_win.cc
@@ -34,8 +34,8 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) {
user_lock_->CheckHeldAndUnmark();
#endif
- if (FALSE == SleepConditionVariableSRW(&cv_, srwlock_, timeout, 0)) {
- DCHECK(GetLastError() != WAIT_TIMEOUT);
+ if (!SleepConditionVariableSRW(&cv_, srwlock_, timeout, 0)) {
+ DCHECK_EQ(static_cast<DWORD>(ERROR_TIMEOUT), GetLastError());
danakj 2016/06/10 17:37:11 What is the intention of the DCHECK before? It was
robliao 2016/06/10 18:16:12 My interpretation of the DCHECK is that it was a m
danakj 2016/06/10 21:00:09 Ah ok, there are in fact other errors possible. It
sky 2016/09/14 16:35:16 This is a great description of why the DCHECK shou
robliao 2016/09/14 17:49:58 https://codereview.chromium.org/2341773003/ opened
}
#if DCHECK_IS_ON()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698