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

Unified Diff: base/memory/shared_memory_handle_mac.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 | « no previous file | base/memory/shared_memory_handle_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_handle_mac.cc
diff --git a/base/memory/shared_memory_handle_mac.cc b/base/memory/shared_memory_handle_mac.cc
index 3f1d4d83748657a72366535c55aea37d077c3832..a440064a94500136af32ef2ddc5827513db4b125 100644
--- a/base/memory/shared_memory_handle_mac.cc
+++ b/base/memory/shared_memory_handle_mac.cc
@@ -9,6 +9,7 @@
#include <sys/mman.h>
#include <unistd.h>
+#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/mach_logging.h"
#include "base/posix/eintr_wrapper.h"
@@ -69,8 +70,10 @@ SharedMemoryHandle SharedMemoryHandle::Duplicate() const {
if (!IsValid())
return SharedMemoryHandle();
int duped_fd = HANDLE_EINTR(dup(file_descriptor_.fd));
- if (duped_fd < 0)
+ if (duped_fd < 0) {
+ DPLOG(ERROR) << "dup() failed.";
return SharedMemoryHandle();
+ }
return SharedMemoryHandle(FileDescriptor(duped_fd, true));
}
case MACH: {
« no previous file with comments | « no previous file | base/memory/shared_memory_handle_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698