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..e1c07c940ab76a6900c50cf143d365d3084c09b0 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; |
+ if (!BrokerDuplicateHandle(source_handle.GetHandle(), target_process_id, |
+ &duped_handle, |
+ FILE_GENERIC_READ | FILE_GENERIC_WRITE, 0)) { |
+ return false; |
+ } |
+ |
+ *target_handle = base::SharedMemoryHandle(duped_handle, target_process_id); |
+ return true; |
} |
} // namespace content |