Index: base/synchronization/condition_variable_win.cc |
diff --git a/base/synchronization/condition_variable_win.cc b/base/synchronization/condition_variable_win.cc |
index d5f24e4438753471dc38b0e48a0ae680477eafb2..8bece6eb34dbfc965ccee65b08051c54ad9fff79 100644 |
--- a/base/synchronization/condition_variable_win.cc |
+++ b/base/synchronization/condition_variable_win.cc |
@@ -35,6 +35,11 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) { |
#endif |
if (!SleepConditionVariableSRW(&cv_, srwlock_, timeout, 0)) { |
+ // On failure, we only expect the CV to timeout. Any other error value means |
+ // that we've unexpectedly woken up. |
+ // Note that WAIT_TIMEOUT != ERROR_TIMEOUT. WAIT_TIMEOUT is used with the |
+ // WaitFor* family of functions as a direct return value. ERROR_TIMEOUT is |
+ // used with GetLastError(). |
DCHECK_EQ(static_cast<DWORD>(ERROR_TIMEOUT), GetLastError()); |
} |