Chromium Code Reviews| Index: base/files/memory_mapped_file_posix.cc |
| diff --git a/base/files/memory_mapped_file_posix.cc b/base/files/memory_mapped_file_posix.cc |
| index ebf38779f039708835242eb19ed7223927a28f40..3010daac9605aebac42f74ae296c13e0bc4339c1 100644 |
| --- a/base/files/memory_mapped_file_posix.cc |
| +++ b/base/files/memory_mapped_file_posix.cc |
| @@ -60,9 +60,13 @@ bool MemoryMappedFile::MapFileRegionToMemory( |
| length_ = static_cast<size_t>(region.size); |
| } |
| + int flags = PROT_READ; |
|
rvargas (doing something else)
2014/08/27 18:24:25
I'm sorry, but you are still trying to make this a
|
| + if (file_.flags() & File::FLAG_WRITE || |
| + file_.flags() & File::FLAG_APPEND) |
| + flags |= PROT_WRITE; |
| data_ = static_cast<uint8*>(mmap(NULL, |
| map_size, |
| - PROT_READ, |
| + flags, |
| MAP_SHARED, |
| file_.GetPlatformFile(), |
| map_start)); |