Index: base/shared_memory_nacl.cc |
diff --git a/base/shared_memory_nacl.cc b/base/shared_memory_nacl.cc |
index fef293719ebc6b4898ac561d16f768b8d5f9366e..aeb24d20a3fbe1ba51f9bd4195b787e49c075362 100644 |
--- a/base/shared_memory_nacl.cc |
+++ b/base/shared_memory_nacl.cc |
@@ -137,7 +137,16 @@ void SharedMemory::Unlock() { |
bool SharedMemory::ShareToProcessCommon(ProcessHandle process, |
SharedMemoryHandle *new_handle, |
bool close_self) { |
- return false; |
+ const int new_fd = dup(mapped_file_); |
+ if (new_fd < 0) |
+ return false; |
bbudge
2013/01/09 18:18:42
Should we log the error here, as in shared_memory_
teravest
2013/01/09 19:13:15
Done.
|
+ |
+ new_handle->fd = new_fd; |
+ new_handle->auto_close = true; |
+ |
+ if (close_self) |
+ Close(); |
+ return true; |
} |
} // namespace base |