diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 02:07:27 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 02:07:27 +0000 |
commit | d5e7e7827677ffb78b0b9142e2ab5e289cc9de49 (patch) | |
tree | 5acecd3b61da9840e30c85ae6eeadd244f1eb692 /chrome/common/transport_dib.h | |
parent | 63302a8b9faec92f1b956737057205acc2b44907 (diff) | |
download | chromium_src-d5e7e7827677ffb78b0b9142e2ab5e289cc9de49.zip chromium_src-d5e7e7827677ffb78b0b9142e2ab5e289cc9de49.tar.gz chromium_src-d5e7e7827677ffb78b0b9142e2ab5e289cc9de49.tar.bz2 |
linux: fix plugins crash: 0 is a valid shm handle.
Review URL: http://codereview.chromium.org/159487
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/transport_dib.h')
-rw-r--r-- | chrome/common/transport_dib.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/common/transport_dib.h b/chrome/common/transport_dib.h index 495d29f..6d137ff 100644 --- a/chrome/common/transport_dib.h +++ b/chrome/common/transport_dib.h @@ -69,13 +69,25 @@ class TransportDIB { uint32 sequence_num; }; typedef HandleAndSequenceNum Id; + + // Returns a default, invalid handle, that is meant to indicate a missing + // Transport DIB. + static Handle DefaultHandleValue() { return NULL; } #elif defined(OS_MACOSX) typedef base::SharedMemoryHandle Handle; // On Mac, the inode number of the backing file is used as an id. typedef base::SharedMemoryId Id; + + // Returns a default, invalid handle, that is meant to indicate a missing + // Transport DIB. + static Handle DefaultHandleValue() { return Handle(); } #elif defined(OS_LINUX) typedef int Handle; // These two ints are SysV IPC shared memory keys typedef int Id; + + // Returns a default, invalid handle, that is meant to indicate a missing + // Transport DIB. + static Handle DefaultHandleValue() { return -1; } #endif // Create a new TransportDIB |