From 3747791d3d47eeaa9aef440bda06b50f594bd386 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Tue, 9 Feb 2010 08:06:35 +0000 Subject: 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 --- base/pickle.cc | 14 -------------- base/pickle.h | 4 ---- 2 files changed, 18 deletions(-) (limited to 'base') 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(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); -- cgit v1.1