| Index: base/shared_memory_posix.cc
|
| diff --git a/base/shared_memory_posix.cc b/base/shared_memory_posix.cc
|
| index 1261d508d4275b7dbf099c8e0d951a87dfb37c97..d2bb219f6c2196a6ab3a1ba8af3b62758b1f42c4 100644
|
| --- a/base/shared_memory_posix.cc
|
| +++ b/base/shared_memory_posix.cc
|
| @@ -240,10 +240,13 @@ bool SharedMemory::Map(uint32 bytes) {
|
| MAP_SHARED, mapped_file_, 0);
|
|
|
| bool mmap_succeeded = memory_ != (void*)-1 && memory_ != NULL;
|
| - if (mmap_succeeded)
|
| + if (mmap_succeeded) {
|
| mapped_size_ = bytes;
|
| - else
|
| + DCHECK_EQ(0U, reinterpret_cast<uintptr_t>(memory_) &
|
| + (SharedMemory::MAP_MINIMUM_ALIGNMENT - 1));
|
| + } else {
|
| memory_ = NULL;
|
| + }
|
|
|
| return mmap_succeeded;
|
| }
|
|
|