Chromium Code Reviews| Index: content/common/sandbox_init_win.cc |
| diff --git a/content/common/sandbox_init_win.cc b/content/common/sandbox_init_win.cc |
| index 3f80f33700973c7f25c4e590212987628d3195c2..585e5c9daf1f7a6e16adf8b65c11489b76145b5e 100644 |
| --- a/content/common/sandbox_init_win.cc |
| +++ b/content/common/sandbox_init_win.cc |
| @@ -46,8 +46,15 @@ bool BrokerDuplicateSharedMemoryHandle( |
| const base::SharedMemoryHandle& source_handle, |
| base::ProcessId target_process_id, |
| base::SharedMemoryHandle* target_handle) { |
| - return BrokerDuplicateHandle(source_handle, target_process_id, target_handle, |
| - 0, DUPLICATE_SAME_ACCESS); |
| + HANDLE duped_handle; |
| + bool success = BrokerDuplicateHandle( |
|
Tom Sepez
2015/09/23 22:06:13
nit: local not needed.
erikchen
2015/09/24 00:44:18
I removed it.
|
| + source_handle.GetHandle(), target_process_id, &duped_handle, |
| + FILE_GENERIC_READ | FILE_GENERIC_WRITE, 0); |
| + if (!success) |
| + return false; |
| + |
| + *target_handle = base::SharedMemoryHandle(duped_handle, target_process_id); |
| + return true; |
| } |
| } // namespace content |