Attempt to figure out what the issue is on the Win10 FYI build bot in content_browsertests.
Check for the case when PostThreadMessage returns false but GetLastError returns ERROR_SUCCESS.
TBR=olka
NOTRY=true
Review-Url: https://codereview.webrtc.org/2063313003
Cr-Commit-Position: refs/heads/master@{#13143}
diff --git a/webrtc/base/task_queue_win.cc b/webrtc/base/task_queue_win.cc
index e18c1f7..e2d19b4 100644
--- a/webrtc/base/task_queue_win.cc
+++ b/webrtc/base/task_queue_win.cc
@@ -62,7 +62,13 @@
TaskQueue::~TaskQueue() {
RTC_DCHECK(!IsCurrent());
while (!PostThreadMessage(thread_.GetThreadRef(), WM_QUIT, 0, 0)) {
- RTC_CHECK_EQ(static_cast<DWORD>(ERROR_NOT_ENOUGH_QUOTA), ::GetLastError());
+ DWORD last_error = ::GetLastError();
+ if (last_error == ERROR_SUCCESS) {
+ // TODO(tommi): Figure out what's going on on the Win10 build bot when
+ // we get this error.
+ break;
+ }
+ RTC_CHECK_EQ(static_cast<DWORD>(ERROR_NOT_ENOUGH_QUOTA), last_error);
Sleep(1);
}
thread_.Stop();