Index: base/memory/shared_memory_posix.cc |
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc |
index 1a90847145b4d688bbd9cfd6ceac510c3da5c4fd..1756c292adb28709d7a2c2f70e6fcf000ce80ddd 100644 |
--- a/base/memory/shared_memory_posix.cc |
+++ b/base/memory/shared_memory_posix.cc |
@@ -279,6 +279,9 @@ bool SharedMemory::MapAt(off_t offset, size_t bytes) { |
if (bytes > static_cast<size_t>(std::numeric_limits<int>::max())) |
return false; |
+ if (memory_) |
+ return false; |
+ |
#if defined(OS_ANDROID) |
// On Android, Map can be called with a size and offset of zero to use the |
// ashmem-determined size. |