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: { |