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

Unified Diff: base/threading/platform_thread_win.cc

Issue 2053393002: Clean Up Windows Thread Join Debug Code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@detach
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/threading/platform_thread_win.cc
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index 3571c522f7907d9cf1740564f4b6d6587064a5db..80ce760dde29b15751859a14b6cb20e8d4e6ea67 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -217,15 +217,8 @@ void PlatformThread::Join(PlatformThreadHandle thread_handle) {
// Wait for the thread to exit. It should already have terminated but make
// sure this assumption is valid.
- DWORD result = WaitForSingleObject(thread_handle.platform_handle(), INFINITE);
- if (result != WAIT_OBJECT_0) {
- // Debug info for bug 127931.
- DWORD error = GetLastError();
- debug::Alias(&error);
- debug::Alias(&result);
- CHECK(false);
- }
-
+ CHECK_EQ(WAIT_OBJECT_0,
danakj 2016/06/10 17:38:25 Can you make it a DCHECK also?
danakj 2016/06/10 17:41:06 I see you made a comment about this is bad so we s
robliao 2016/06/10 18:06:42 We CHECK on the equivalent call in POSIX. https://
danakj 2016/06/10 22:03:32 Oh, okay thanks for the pointer. LGTM
+ WaitForSingleObject(thread_handle.platform_handle(), INFINITE));
CloseHandle(thread_handle.platform_handle());
}
« 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