Bug 974356 - 1/4 - Initialize mOtherProcess to an invalid handle value - r=bent
authorBenoit Jacob <bjacob@mozilla.com>
Tue, 25 Feb 2014 08:12:49 -0500
changeset 170336 490d3e8706c324bc90c4b2a0d1681908d7298cc1
parent 170335 d20fd7b8501a200d3d1e4a5e9b10fb5a5b96993c
child 170337 b4a5fe646f2730adac0d57778cff3401a25ca087
push id40214
push userbjacob@mozilla.com
push dateTue, 25 Feb 2014 13:13:11 +0000
treeherdermozilla-inbound@321b2a16f0d7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs974356
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 974356 - 1/4 - Initialize mOtherProcess to an invalid handle value - r=bent
ipc/glue/ProtocolUtils.h
ipc/ipdl/ipdl/lower.py
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -51,16 +51,22 @@ class ContentParent;
 }
 
 namespace net {
 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;
 
 // Used to pass references to protocol actors across the wire.
 // Actors created on the parent-side have a positive ID, and actors
 // allocated on the child side have a negative ID.
 struct ActorHandle
 {
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -2879,16 +2879,18 @@ class _GenerateProtocolActorCode(ipdl.as
         ctor = ConstructorDefn(ConstructorDecl(self.clsname))
         if ptype.isToplevel():
             ctor.memberinits = [
                 ExprMemberInit(p.channelVar(), [
                     ExprCall(ExprVar('ALLOW_THIS_IN_INITIALIZER_LIST'),
                              [ 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(),
                                [ p.startState() ])
             ]
             if ptype.isToplevel():
                 ctor.memberinits = [ExprMemberInit(
                     p.openedProtocolInterfaceType(),