diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 00:45:57 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-11 00:45:57 +0000 |
commit | 953c31f80f9d0b896e2e756e82791d88406dd8bb (patch) | |
tree | d4e575d6fe8877dc7c4eda3b6ecc62240d7a435d /base | |
parent | 0815b6de5c6a8f079d149067d265c6bf0c5c2604 (diff) | |
download | chromium_src-953c31f80f9d0b896e2e756e82791d88406dd8bb.zip chromium_src-953c31f80f9d0b896e2e756e82791d88406dd8bb.tar.gz chromium_src-953c31f80f9d0b896e2e756e82791d88406dd8bb.tar.bz2 |
* Fix error checking for mmap() for POSIX shared memory.
* Make fd-over-IPC test send multiple FDs.
Review URL: http://codereview.chromium.org/21238
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/shared_memory_posix.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/shared_memory_posix.cc b/base/shared_memory_posix.cc index a28672e..bd33cda 100644 --- a/base/shared_memory_posix.cc +++ b/base/shared_memory_posix.cc @@ -214,7 +214,9 @@ bool SharedMemory::Map(size_t bytes) { if (memory_) max_size_ = bytes; - return (memory_ != NULL); + bool mmap_succeeded = (memory_ != (void*)-1); + DCHECK(mmap_succeeded) << "Call to mmap failed, errno=" << errno; + return mmap_succeeded; } bool SharedMemory::Unmap() { |