Chromium Code Reviews| Index: components/nacl/browser/nacl_process_host.cc |
| diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc |
| index 4c719fd5ded2ac1a181bbdfb66d82448b8852b53..742e773d7ac9275bca66d7aec626c41465256b0d 100644 |
| --- a/components/nacl/browser/nacl_process_host.cc |
| +++ b/components/nacl/browser/nacl_process_host.cc |
| @@ -946,7 +946,10 @@ bool NaClProcessHost::StartNaClExecution() { |
| DLOG(ERROR) << "Failed to allocate memory buffer"; |
| return false; |
| } |
| - base::ScopedFD memory_fd(dup(memory_buffer.handle().fd)); |
| + base::SharedMemoryHandle duped_handle = |
| + base::SharedMemory::DuplicateHandle(memory_buffer.handle()); |
| + base::ScopedFD memory_fd( |
| + base::SharedMemory::GetFdFromSharedMemoryHandle(duped_handle)); |
|
Mark Seaborn
2015/06/04 20:17:55
How will this help you switch to having SharedMemo
erikchen
2015/06/04 20:25:42
I have a CL that changes SharedMemoryHandle to be
Mark Seaborn
2015/06/04 20:45:01
Which cases will require you to support storing an
|
| if (!memory_fd.is_valid()) { |
| DLOG(ERROR) << "Failed to dup() a file descriptor"; |
| return false; |