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

Unified Diff: base/memory/shared_memory_win.cc

Issue 1350493002: Check for CloseHandle failures even when not debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code tweaks Created 5 years, 3 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
Index: base/memory/shared_memory_win.cc
diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc
index 5f706fe648598642584903f39a5aa40786acc88d..569d5cdc8dd13fcb18f5c9fca76fba118eb161d9 100644
--- a/base/memory/shared_memory_win.cc
+++ b/base/memory/shared_memory_win.cc
@@ -85,7 +85,8 @@ SharedMemoryHandle SharedMemory::NULLHandle() {
// static
void SharedMemory::CloseHandle(const SharedMemoryHandle& handle) {
DCHECK(handle != NULL);
- ::CloseHandle(handle);
+ const BOOL result = ::CloseHandle(handle);
+ DCHECK(result);
brucedawson 2015/09/16 00:30:52 This would have caught 524267.
rvargas (doing something else) 2015/09/16 02:09:12 Use CHECK
brucedawson 2015/09/16 18:29:00 The reason I used DCHECK was because of the DCHECK
rvargas (doing something else) 2015/09/16 18:54:38 There's no semantic distinction between DCHECK and
}
// static

Powered by Google App Engine
This is Rietveld 408576698