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

Unified Diff: base/memory/shared_memory_handle_posix.cc

Issue 2854853007: Add logging for dup() failure in SharedMemoryHandle. (Closed)
Patch Set: Created 3 years, 7 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 | « base/memory/shared_memory_handle_mac.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_handle_posix.cc
diff --git a/base/memory/shared_memory_handle_posix.cc b/base/memory/shared_memory_handle_posix.cc
index 3e9a403b14c23f8700cbf4105632c661edd6c6dc..2d230786fa85257c7d4d10497f5839208cb1cdb5 100644
--- a/base/memory/shared_memory_handle_posix.cc
+++ b/base/memory/shared_memory_handle_posix.cc
@@ -57,8 +57,10 @@ SharedMemoryHandle SharedMemoryHandle::Duplicate() const {
return SharedMemoryHandle();
int duped_handle = HANDLE_EINTR(dup(file_descriptor_.fd));
- if (duped_handle < 0)
+ if (duped_handle < 0) {
+ DPLOG(ERROR) << "dup() failed.";
return SharedMemoryHandle();
+ }
return SharedMemoryHandle(FileDescriptor(duped_handle, true));
}
« no previous file with comments | « base/memory/shared_memory_handle_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698