diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 08:06:35 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 08:06:35 +0000 |
commit | 3747791d3d47eeaa9aef440bda06b50f594bd386 (patch) | |
tree | 20988e5862266fae81e5c6c440507035bc00a3b4 /base | |
parent | 47148a3c6b63d19dd2d33d61537d953f76ce0e2c (diff) | |
download | chromium_src-3747791d3d47eeaa9aef440bda06b50f594bd386.zip chromium_src-3747791d3d47eeaa9aef440bda06b50f594bd386.tar.gz chromium_src-3747791d3d47eeaa9aef440bda06b50f594bd386.tar.bz2 |
Take out intptr_t IPC serialization support to prevent people from sending pointers between trusted and untrusted processes. Move HWNDs and other Windows HANDLEs serialization to use 32 bits even on 64 bit platforms since that's all that's needed.
Review URL: http://codereview.chromium.org/565001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38455 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/pickle.cc | 14 | ||||
-rw-r--r-- | base/pickle.h | 4 |
2 files changed, 0 insertions, 18 deletions
diff --git a/base/pickle.cc b/base/pickle.cc index 2b5b905..2540391 100644 --- a/base/pickle.cc +++ b/base/pickle.cc @@ -195,20 +195,6 @@ bool Pickle::ReadUInt64(void** iter, uint64* result) const { return true; } -bool Pickle::ReadIntPtr(void** iter, intptr_t* result) const { - DCHECK(iter); - if (!*iter) - *iter = const_cast<char*>(payload()); - - if (!IteratorHasRoomFor(*iter, sizeof(*result))) - return false; - - memcpy(result, *iter, sizeof(*result)); - - UpdateIter(iter, sizeof(*result)); - return true; -} - bool Pickle::ReadString(void** iter, std::string* result) const { DCHECK(iter); diff --git a/base/pickle.h b/base/pickle.h index 850d4dc..3ba60fd 100644 --- a/base/pickle.h +++ b/base/pickle.h @@ -71,7 +71,6 @@ class Pickle { bool ReadUInt32(void** iter, uint32* result) const; bool ReadInt64(void** iter, int64* result) const; bool ReadUInt64(void** iter, uint64* result) const; - bool ReadIntPtr(void** iter, intptr_t* result) const; bool ReadString(void** iter, std::string* result) const; bool ReadWString(void** iter, std::wstring* result) const; bool ReadString16(void** iter, string16* result) const; @@ -107,9 +106,6 @@ class Pickle { bool WriteUInt64(uint64 value) { return WriteBytes(&value, sizeof(value)); } - bool WriteIntPtr(intptr_t value) { - return WriteBytes(&value, sizeof(value)); - } bool WriteString(const std::string& value); bool WriteWString(const std::wstring& value); bool WriteString16(const string16& value); |