Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: ipc/ipc_message_utils.cc

Issue 12381066: Add IPC handling for INVALID_HANDLE_VALUE on Win64 builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
===================================================================
--- ipc/ipc_message_utils.cc (revision 185808)
+++ ipc/ipc_message_utils.cc (working copy)
@@ -753,17 +753,17 @@
#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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698