summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_message_utils.cc
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 02:29:03 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 02:29:03 +0000
commit4a635b7a530ffe13a0011d90ef3eab41d6d12010 (patch)
tree22d18732fdf9cbbb32c834a6d4b07036099b6b71 /ipc/ipc_message_utils.cc
parent0456654a270dda5e50a7ee8d58d7e7df07ac6c1c (diff)
downloadchromium_src-4a635b7a530ffe13a0011d90ef3eab41d6d12010.zip
chromium_src-4a635b7a530ffe13a0011d90ef3eab41d6d12010.tar.gz
chromium_src-4a635b7a530ffe13a0011d90ef3eab41d6d12010.tar.bz2
Add IPC handling for INVALID_HANDLE_VALUE on Win64 builds
BUG=179693 R=cpu@chromium.org Review URL: https://codereview.chromium.org/12381066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_utils.cc')
-rw-r--r--ipc/ipc_message_utils.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 2081204..718e759 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -753,17 +753,17 @@ void ParamTraits<Message>::Log(const Message& p, std::string* l) {
#if defined(OS_WIN)
// Note that HWNDs/HANDLE/HCURSOR/HACCEL etc are always 32 bits, even on 64
-// bit systems.
+// bit systems. That's why we use the Windows macros to convert to 32 bits.
void ParamTraits<HANDLE>::Write(Message* m, const param_type& p) {
- m->WriteUInt32(reinterpret_cast<uint32>(p));
+ m->WriteInt(HandleToLong(p));
}
bool ParamTraits<HANDLE>::Read(const Message* m, PickleIterator* iter,
param_type* r) {
- uint32 temp;
- if (!m->ReadUInt32(iter, &temp))
+ int32 temp;
+ if (!m->ReadInt(iter, &temp))
return false;
- *r = reinterpret_cast<HANDLE>(temp);
+ *r = LongToHandle(temp);
return true;
}