| Index: base/memory/shared_memory_android.cc
|
| diff --git a/base/memory/shared_memory_android.cc b/base/memory/shared_memory_android.cc
|
| index 3ca3c8fa360903d04517911592b2b9ae9515582b..25a65730cb73fb19bd5b039c8c7badaceb8acd0a 100644
|
| --- a/base/memory/shared_memory_android.cc
|
| +++ b/base/memory/shared_memory_android.cc
|
| @@ -37,6 +37,15 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
|
| DLOG(ERROR) << "Error " << err << " when setting protection of ashmem";
|
| return false;
|
| }
|
| +
|
| + // Android doesn't appear to have a way to drop write access on an ashmem
|
| + // segment for a single descriptor. http://crbug.com/320865
|
| + readonly_mapped_file_ = dup(mapped_file_);
|
| + if (-1 == readonly_mapped_file_) {
|
| + DPLOG(ERROR) << "dup() failed";
|
| + return false;
|
| + }
|
| +
|
| requested_size_ = options.size;
|
|
|
| return true;
|
|
|