From 4a8e65915b6551013882b017bacc098a676e73a0 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 25 Feb 2014 08:12:49 -0500 Subject: [PATCH] Bug 974356 - 1/4 - Initialize mOtherProcess to an invalid handle value - r=bent --- ipc/glue/ProtocolUtils.h | 6 ++++++ ipc/ipdl/ipdl/lower.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ipc/glue/ProtocolUtils.h b/ipc/glue/ProtocolUtils.h index 01af0dc52de2..48c2b75c545b 100644 --- a/ipc/glue/ProtocolUtils.h +++ b/ipc/glue/ProtocolUtils.h @@ -56,6 +56,12 @@ class NeckoParent; namespace ipc { +#ifdef XP_WIN +const base::ProcessHandle kInvalidProcessHandle = INVALID_HANDLE_VALUE; +#else +const base::ProcessHandle kInvalidProcessHandle = -1; +#endif + class ProtocolFdMapping; class ProtocolCloneContext; diff --git a/ipc/ipdl/ipdl/lower.py b/ipc/ipdl/ipdl/lower.py index f408ec2d600d..dcfac3ca8903 100644 --- a/ipc/ipdl/ipdl/lower.py +++ b/ipc/ipdl/ipdl/lower.py @@ -2884,6 +2884,8 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor): [ ExprVar.THIS ]) ]), ExprMemberInit(p.lastActorIdVar(), [ p.actorIdInit(self.side) ]), + ExprMemberInit(p.otherProcessVar(), + [ ExprVar('ipc::kInvalidProcessHandle') ]), ExprMemberInit(p.lastShmemIdVar(), [ p.shmemIdInit(self.side) ]), ExprMemberInit(p.stateVar(),