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

Side by Side Diff: webrtc/base/task_queue_win.cc

Issue 2061923004: Change RTC_CHECK to RTC_CHECK_EQ for improved printout of GetLastError. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: static_cast 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Event event(false, false); 55 Event event(false, false);
56 ThreadStartupData startup = {&event, this}; 56 ThreadStartupData startup = {&event, this};
57 RTC_CHECK(thread_.QueueAPC(&InitializeQueueThread, 57 RTC_CHECK(thread_.QueueAPC(&InitializeQueueThread,
58 reinterpret_cast<ULONG_PTR>(&startup))); 58 reinterpret_cast<ULONG_PTR>(&startup)));
59 event.Wait(Event::kForever); 59 event.Wait(Event::kForever);
60 } 60 }
61 61
62 TaskQueue::~TaskQueue() { 62 TaskQueue::~TaskQueue() {
63 RTC_DCHECK(!IsCurrent()); 63 RTC_DCHECK(!IsCurrent());
64 while (!PostThreadMessage(thread_.GetThreadRef(), WM_QUIT, 0, 0)) { 64 while (!PostThreadMessage(thread_.GetThreadRef(), WM_QUIT, 0, 0)) {
65 RTC_CHECK(ERROR_NOT_ENOUGH_QUOTA == ::GetLastError()); 65 RTC_CHECK_EQ(static_cast<DWORD>(ERROR_NOT_ENOUGH_QUOTA), ::GetLastError());
66 Sleep(1); 66 Sleep(1);
67 } 67 }
68 thread_.Stop(); 68 thread_.Stop();
69 } 69 }
70 70
71 // static 71 // static
72 TaskQueue* TaskQueue::Current() { 72 TaskQueue* TaskQueue::Current() {
73 return static_cast<TaskQueue*>(TlsGetValue(GetQueuePtrTls())); 73 return static_cast<TaskQueue*>(TlsGetValue(GetQueuePtrTls()));
74 } 74 }
75 75
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 175 }
176 } else { 176 } else {
177 TranslateMessage(&msg); 177 TranslateMessage(&msg);
178 DispatchMessage(&msg); 178 DispatchMessage(&msg);
179 } 179 }
180 } 180 }
181 181
182 return false; 182 return false;
183 } 183 }
184 } // namespace rtc 184 } // namespace rtc
OLDNEW
« 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