Skip to content

Commit

Permalink
Add IPC handling for INVALID_HANDLE_VALUE on Win64 builds
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jschuh@chromium.org committed Mar 4, 2013
1 parent 0456654 commit 4a635b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ipc/ipc_message_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4a635b7

Please sign in to comment.