| Index: base/memory/shared_memory_win.cc
|
| diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc
|
| index 42e0b046b96e5818d3cfe05546e32a8857a91012..65d7a5d16277e1b8fd1f7ba7b8a04337c71a302c 100644
|
| --- a/base/memory/shared_memory_win.cc
|
| +++ b/base/memory/shared_memory_win.cc
|
| @@ -188,13 +188,14 @@ bool SharedMemory::Unmap() {
|
|
|
| bool SharedMemory::ShareToProcessCommon(ProcessHandle process,
|
| SharedMemoryHandle *new_handle,
|
| - bool close_self) {
|
| + bool close_self,
|
| + ShareMode share_mode) {
|
| *new_handle = 0;
|
| DWORD access = STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ;
|
| DWORD options = 0;
|
| HANDLE mapped_file = mapped_file_;
|
| HANDLE result;
|
| - if (!read_only_)
|
| + if (share_mode == SHARE_CURRENT_MODE && !read_only_)
|
| access |= FILE_MAP_WRITE;
|
| if (close_self) {
|
| // DUPLICATE_CLOSE_SOURCE causes DuplicateHandle to close mapped_file.
|
|
|