Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj
authorNika Layzell <nika@thelayzells.com>
Tue, 21 May 2019 17:04:27 +0000
changeset 474785 3b9e7122bcfb8b37b7653e5224ce03b377361cbd
parent 474784 969f29e56fa1b018fe790d888e05df6f1ddbdbb1
child 474786 5126a1e75cf8743aadac748eba2b201b64b88b86
push id36046
push useraiakab@mozilla.com
push dateTue, 21 May 2019 21:45:52 +0000
treeherdermozilla-central@257f2c96cef5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1548717
milestone69.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 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj These values were only being used for assertions within IPDL send methods. They had no positive impact beyond causing crashes when sending a message over a dead actor. Differential Revision: https://phabricator.services.mozilla.com/D30235
ipc/glue/ProtocolUtils.cpp
ipc/glue/ProtocolUtils.h
ipc/ipdl/ipdl/lower.py
ipc/ipdl/ipdl/type.py
ipc/ipdl/test/cxx/PTestActorPunning.ipdl
ipc/ipdl/test/cxx/PTestCrashCleanup.ipdl
ipc/ipdl/test/cxx/PTestDataStructures.ipdl
ipc/ipdl/test/cxx/PTestDesc.ipdl
ipc/ipdl/test/cxx/PTestEndpointOpensOpened.ipdl
ipc/ipdl/test/cxx/PTestFailedCtor.ipdl
ipc/ipdl/test/cxx/PTestHangs.ipdl
ipc/ipdl/test/cxx/PTestInterruptRaces.ipdl
ipc/ipdl/test/cxx/PTestInterruptShutdownRace.ipdl
ipc/ipdl/test/cxx/PTestJSON.ipdl
ipc/ipdl/test/cxx/PTestLatency.ipdl
ipc/ipdl/test/cxx/PTestMultiMgrs.ipdl
ipc/ipdl/test/cxx/PTestMultiMgrsBottom.ipdl
ipc/ipdl/test/cxx/PTestMultiMgrsLeft.ipdl
ipc/ipdl/test/cxx/PTestMultiMgrsRight.ipdl
ipc/ipdl/test/cxx/PTestNestedLoops.ipdl
ipc/ipdl/test/cxx/PTestRaceDeferral.ipdl
ipc/ipdl/test/cxx/PTestRacyInterruptReplies.ipdl
ipc/ipdl/test/cxx/PTestSanity.ipdl
ipc/ipdl/test/cxx/PTestSelfManage.ipdl
ipc/ipdl/test/cxx/PTestSelfManageRoot.ipdl
ipc/ipdl/test/cxx/PTestShmem.ipdl
ipc/ipdl/test/cxx/PTestShutdown.ipdl
ipc/ipdl/test/cxx/PTestShutdownSub.ipdl
ipc/ipdl/test/cxx/PTestShutdownSubsub.ipdl
ipc/ipdl/test/cxx/PTestStackHooks.ipdl
ipc/ipdl/test/cxx/PTestSyncError.ipdl
ipc/ipdl/test/cxx/PTestSyncHang.ipdl
ipc/ipdl/test/cxx/PTestSyncWakeup.ipdl
ipc/ipdl/test/cxx/TestHangs.cpp
ipc/ipdl/test/cxx/TestLatency.cpp
ipc/ipdl/test/cxx/TestStackHooks.cpp
--- a/ipc/glue/ProtocolUtils.cpp
+++ b/ipc/glue/ProtocolUtils.cpp
@@ -297,52 +297,16 @@ void UnionTypeReadError(const char* aUni
 void ArrayLengthReadError(const char* aElementName) {
   MOZ_CRASH_UNSAFE_PRINTF("error deserializing length of %s[]", aElementName);
 }
 
 void SentinelReadError(const char* aClassName) {
   MOZ_CRASH_UNSAFE_PRINTF("incorrect sentinel when reading %s", aClassName);
 }
 
-bool StateTransition(bool aIsDelete, LivenessState* aNext) {
-  switch (*aNext) {
-    case LivenessState::Null:
-      if (aIsDelete) {
-        *aNext = LivenessState::Dead;
-      }
-      break;
-    case LivenessState::Dead:
-      return false;
-    default:
-      return false;
-  }
-  return true;
-}
-
-bool ReEntrantDeleteStateTransition(bool aIsDelete, bool aIsDeleteReply,
-                                    ReEntrantDeleteLivenessState* aNext) {
-  switch (*aNext) {
-    case ReEntrantDeleteLivenessState::Null:
-      if (aIsDelete) {
-        *aNext = ReEntrantDeleteLivenessState::Dying;
-      }
-      break;
-    case ReEntrantDeleteLivenessState::Dead:
-      return false;
-    case ReEntrantDeleteLivenessState::Dying:
-      if (aIsDeleteReply) {
-        *aNext = ReEntrantDeleteLivenessState::Dead;
-      }
-      break;
-    default:
-      return false;
-  }
-  return true;
-}
-
 void TableToArray(const nsTHashtable<nsPtrHashKey<void>>& aTable,
                   nsTArray<void*>& aArray) {
   uint32_t i = 0;
   void** elements = aArray.AppendElements(aTable.Count());
   for (auto iter = aTable.ConstIter(); !iter.Done(); iter.Next()) {
     elements[i] = iter.Get()->GetKey();
     ++i;
   }
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -779,30 +779,16 @@ bool DuplicateHandle(HANDLE aSourceHandl
 #endif
 
 /**
  * Annotate the crash reporter with the error code from the most recent system
  * call. Returns the system error.
  */
 void AnnotateSystemError();
 
-enum class LivenessState { Dead, Null, Start = Null };
-
-bool StateTransition(bool aIsDelete, LivenessState* aNext);
-
-enum class ReEntrantDeleteLivenessState {
-  Dead,
-  Null,
-  Dying,
-  Start = Null,
-};
-
-bool ReEntrantDeleteStateTransition(bool aIsDelete, bool aIsDeleteReply,
-                                    ReEntrantDeleteLivenessState* aNext);
-
 /**
  * An endpoint represents one end of a partially initialized IPDL channel. To
  * set up a new top-level protocol:
  *
  * Endpoint<PFooParent> parentEp;
  * Endpoint<PFooChild> childEp;
  * nsresult rv;
  * rv = PFoo::CreateEndpoints(parentPid, childPid, &parentEp, &childEp);
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -146,20 +146,16 @@ def _actorId(actor=None):
         return ExprCall(ExprSelect(actor, '->', 'Id'))
     return ExprCall(ExprVar('Id'))
 
 
 def _actorHId(actorhandle):
     return ExprSelect(actorhandle, '.', 'mId')
 
 
-def _actorState(actor):
-    return ExprSelect(actor, '->', 'mLivenessState')
-
-
 def _backstagePass():
     return ExprCall(ExprVar('mozilla::ipc::PrivateIPDLInterface'))
 
 
 def _iterType(ptr):
     return Type('PickleIterator', ptr=ptr)
 
 
@@ -545,18 +541,16 @@ class _ConvertToCxxType(TypeVisitor):
         return Type(self.typename(s))
 
     def visitProtocolType(self, p): assert 0
 
     def visitMessageType(self, m): assert 0
 
     def visitVoidType(self, v): assert 0
 
-    def visitStateType(self, st): assert 0
-
 
 def _cxxBareType(ipdltype, side, fq=False):
     return ipdltype.accept(_ConvertToCxxType(side, fq))
 
 
 def _cxxRefType(ipdltype, side):
     t = _cxxBareType(ipdltype, side)
     t.ref = True
@@ -1190,28 +1184,16 @@ def _subtreeUsesShmem(p):
     ptype = p.decl.type
     for mgd in ptype.manages:
         if ptype is not mgd:
             if _subtreeUsesShmem(mgd._ast):
                 return True
     return False
 
 
-def _stateType(hasReentrantDelete):
-    if hasReentrantDelete:
-        return Type('mozilla::ipc::ReEntrantDeleteLivenessState')
-    else:
-        return Type('mozilla::ipc::LivenessState')
-
-
-def _startState(hasReentrantDelete):
-    pfx = _stateType(hasReentrantDelete).name + '::'
-    return ExprVar(pfx + 'Start')
-
-
 class Protocol(ipdl.ast.Protocol):
     def cxxTypedefs(self):
         return self.decl.cxxtypedefs
 
     def managerInterfaceType(self, ptr=False):
         return Type('mozilla::ipc::IProtocol', ptr=ptr)
 
     def openedProtocolInterfaceType(self, ptr=False):
@@ -1282,34 +1264,16 @@ class Protocol(ipdl.ast.Protocol):
 
     def routingId(self, actorThis=None):
         if self.decl.type.isToplevel():
             return ExprVar('MSG_ROUTING_CONTROL')
         if actorThis is not None:
             return ExprCall(ExprSelect(actorThis, '->', 'Id'))
         return ExprCall(ExprVar('Id'))
 
-    def stateVar(self):
-        return ExprVar('mLivenessState')
-
-    def fqStateType(self):
-        return _stateType(self.decl.type.hasReentrantDelete)
-
-    def startState(self):
-        return _startState(self.decl.type.hasReentrantDelete)
-
-    def deadState(self):
-        pfx = self.fqStateType().name + '::'
-        return ExprVar(pfx + 'Dead')
-
-    def dyingState(self):
-        assert self.decl.type.hasReentrantDelete
-        pfx = self.fqStateType().name + '::'
-        return ExprVar(pfx + 'Dying')
-
     def managerVar(self, thisexpr=None):
         assert thisexpr is not None or not self.decl.type.isToplevel()
         mvar = ExprCall(ExprVar('Manager'), args=[])
         if thisexpr is not None:
             mvar = ExprCall(ExprSelect(thisexpr, '->', 'Manager'), args=[])
         return mvar
 
     def managedCxxType(self, actortype, side):
@@ -2369,18 +2333,16 @@ before this struct.  Some types generate
         self.visited.add(s)
 
     def visitVoidType(self, v): assert 0
 
     def visitMessageType(self, v): assert 0
 
     def visitProtocolType(self, v): assert 0
 
-    def visitStateType(self, v): assert 0
-
 
 def _fieldStaticAssertions(sd):
     staticasserts = []
     for (size, fields) in itertools.groupby(sd.fields_member_order(),
                                             lambda f: pod_size(f.ipdltype)):
         if size == pod_size_sentinel:
             continue
 
@@ -3447,25 +3409,21 @@ class _GenerateProtocolActorCode(ipdl.as
         self.cls.addstmt(Label.PUBLIC)
         # Actor()
         ctor = ConstructorDefn(ConstructorDecl(self.clsname))
         side = ExprVar('mozilla::ipc::' + self.side.title() + 'Side')
         if ptype.isToplevel():
             name = ExprLiteral.String(_actorName(p.name, self.side))
             ctor.memberinits = [
                 ExprMemberInit(ExprVar('mozilla::ipc::IToplevelProtocol'),
-                               [name, _protocolId(ptype), side]),
-                ExprMemberInit(p.stateVar(),
-                               [p.startState()])
+                               [name, _protocolId(ptype), side])
             ]
         else:
             ctor.memberinits = [
-                ExprMemberInit(ExprVar('mozilla::ipc::IProtocol'), [side]),
-                ExprMemberInit(p.stateVar(),
-                               [p.deadState()])
+                ExprMemberInit(ExprVar('mozilla::ipc::IProtocol'), [side])
             ]
 
         ctor.addstmt(StmtExpr(ExprCall(ExprVar('MOZ_COUNT_CTOR'),
                                        [ExprVar(self.clsname)])))
         self.cls.addstmts([ctor, Whitespace.NL])
 
         # ~Actor()
         dtor = DestructorDefn(
@@ -3648,34 +3606,16 @@ class _GenerateProtocolActorCode(ipdl.as
                     StmtReturn(ExprCall(
                         ExprSelect(ExprCall(ExprSelect(proxyvar, '->', 'Get')),
                                    '->', name),
                         args=[ExprVar(p.name) for p in params])),
                 ])
 
                 method.addstmts([routedecl, routeif, Whitespace.NL])
 
-            # in the event of an Interrupt delete message, we want to loudly complain about
-            # messages that are received that are not a reply to the original message
-            if ptype.hasReentrantDelete:
-                msgVar = ExprVar(params[0].name)
-                ifdying = StmtIf(ExprBinary(
-                    ExprBinary(ExprVar('mLivenessState'), '==', self.protocol.dyingState()),
-                    '&&',
-                    ExprBinary(
-                        ExprBinary(ExprCall(ExprSelect(msgVar, '.', 'is_reply')),
-                                   '!=', ExprLiteral.TRUE),
-                        '||',
-                        ExprBinary(ExprCall(ExprSelect(msgVar, '.', 'is_interrupt')),
-                                   '!=', ExprLiteral.TRUE))))
-                ifdying.addifstmts([
-                    _fatalError('incoming message racing with actor deletion'),
-                    StmtReturn(_Result.Processed)])
-                method.addstmt(ifdying)
-
             # bug 509581: don't generate the switch stmt if there
             # is only the default case; MSVC doesn't like that
             if switch.nr_cases > 1:
                 method.addstmt(switch)
             else:
                 method.addstmt(StmtReturn(_Result.NotKnown))
 
             return method
@@ -3780,19 +3720,16 @@ class _GenerateProtocolActorCode(ipdl.as
                 StmtExpr(_callClearManagedActors(managedVar)),
 
             ])
             clearsubtree.addstmt(block)
         # don't release our own IPC reference: either the manager will do it,
         # or we're toplevel
         self.cls.addstmts([clearsubtree, Whitespace.NL])
 
-        # private members
-        self.cls.addstmt(StmtDecl(Decl(self.protocol.fqStateType(), p.stateVar().name)))
-
         for managed in ptype.manages:
             self.cls.addstmts([
                 StmtDecl(Decl(
                     p.managedVarType(managed, self.side),
                     p.managedVar(managed, self.side).name))])
 
     def genManagedEndpoint(self, managed):
         hereEp = 'ManagedEndpoint<%s>' % _actorName(managed.name(), self.side)
@@ -4169,19 +4106,16 @@ class _GenerateProtocolActorCode(ipdl.as
             # if (!actor) { return $errReturn; }
             self.failIfNullActor(actorvar, errfn, msg="Error constructing actor %s" %
                                  actortype.name() + self.side.capitalize()),
             # actor->SetManagerAndRegister(this[, id]);
             StmtExpr(setmanager),
             # mManagedPFoo.PutEntry(actor);
             StmtExpr(_callInsertManagedActor(
                 self.protocol.managedVar(actorproto, self.side), actorvar)),
-            # actor->mLivenessState = START;
-            StmtExpr(ExprAssn(_actorState(actorvar),
-                              _startState(actorproto.hasReentrantDelete))),
         ]
 
     def genHelperCtor(self, md):
         helperdecl = self.makeSendMethodDecl(md)
         helperdecl.params = helperdecl.params[1:]
         helper = MethodDefn(helperdecl)
 
         callctor = self.callAllocActor(md, retsems='out', side=self.side)
@@ -4239,19 +4173,16 @@ class _GenerateProtocolActorCode(ipdl.as
             errfnSentinel(), actorvar)
         ifsendok = StmtIf(ExprLiteral.FALSE)
         ifsendok.addifstmts(destmts)
         ifsendok.addifstmts([Whitespace.NL,
                              StmtExpr(ExprAssn(sendok, ExprLiteral.FALSE, '&='))])
 
         method.addstmt(ifsendok)
 
-        if self.protocol.decl.type.hasReentrantDelete:
-            method.addstmts(self.transition(md, actor.var(), reply=True, errorfn=errfnUnreachable))
-
         method.addstmts(
             self.dtorEpilogue(md, actor.var())
             + [Whitespace.NL, StmtReturn(sendok)])
 
         return method
 
     def destroyActor(self, md, actorexpr, why=_DestroyReason.Deletion):
         if md.decl.type.isCtor():
@@ -4388,17 +4319,16 @@ class _GenerateProtocolActorCode(ipdl.as
         actorhandle = self.handlevar
 
         stmts = self.deserializeMessage(md, self.side, errfnRecv,
                                         errfnSent=errfnSentinel(_Result.ValuError))
 
         idvar, saveIdStmts = self.saveActorId(md)
         case.addstmts(
             stmts
-            + self.transition(md, errorfn=errfnRecv)
             + [StmtDecl(Decl(r.bareType(self.side), r.var().name))
                 for r in md.returns]
             # alloc the actor, register it under the foreign ID
             + [StmtExpr(ExprAssn(
                 actorvar,
                 self.callAllocActor(md, retsems='in', side=self.side)))]
             + self.bindManagedActor(md.actorDecl(), errfn=_Result.ValuError,
                                     idexpr=_actorHId(actorhandle))
@@ -4418,17 +4348,16 @@ class _GenerateProtocolActorCode(ipdl.as
         case = StmtBlock()
 
         stmts = self.deserializeMessage(md, self.side, errfnRecv,
                                         errfnSent=errfnSentinel(_Result.ValuError))
 
         idvar, saveIdStmts = self.saveActorId(md)
         case.addstmts(
             stmts
-            + self.transition(md, errorfn=errfnRecv)
             + [StmtDecl(Decl(r.bareType(self.side), r.var().name))
                 for r in md.returns]
             + self.invokeRecvHandler(md, implicit=False)
             + [Whitespace.NL]
             + saveIdStmts
             + self.makeReply(md, errfnRecv, routingId=idvar)
             + [Whitespace.NL]
             + self.genVerifyMessage(md.decl.type.verify, md.returns, errfnRecv,
@@ -4448,17 +4377,16 @@ class _GenerateProtocolActorCode(ipdl.as
 
         idvar, saveIdStmts = self.saveActorId(md)
         declstmts = [StmtDecl(Decl(r.bareType(self.side), r.var().name))
                      for r in md.returns]
         if md.decl.type.isAsync() and md.returns:
             declstmts = self.makeResolver(md, errfnRecv, routingId=idvar)
         case.addstmts(
             stmts
-            + self.transition(md, errorfn=errfnRecv)
             + saveIdStmts
             + declstmts
             + self.invokeRecvHandler(md)
             + [Whitespace.NL]
             + self.makeReply(md, errfnRecv, routingId=idvar)
             + self.genVerifyMessage(md.decl.type.verify, md.returns, errfnRecv,
                                     self.replyvar)
             + [StmtReturn(_Result.Processed)])
@@ -4525,26 +4453,19 @@ class _GenerateProtocolActorCode(ipdl.as
         else:
             resolvedecl = Decl(md.returns[0].moveType(self.side), 'aParam')
             destructexpr = md.returns[0].var()
         selfvar = ExprVar('self__')
         ifactorisdead = StmtIf(ExprNot(selfvar))
         ifactorisdead.addifstmts([
             _printWarningMessage("Not resolving response because actor is dead."),
             StmtReturn()])
-        ifactorisdestroyed = StmtIf(ExprBinary(self.protocol.stateVar(), '==',
-                                               self.protocol.deadState()))
-        ifactorisdestroyed.addifstmts([
-            _printWarningMessage("Not resolving response because actor is destroyed."),
-            StmtReturn()])
-        returnifactorisdead = [ifactorisdead,
-                               ifactorisdestroyed]
         resolverfn = ExprLambda([ExprVar.THIS, selfvar, routingId, seqno],
                                 [resolvedecl])
-        resolverfn.addstmts(returnifactorisdead
+        resolverfn.addstmts([ifactorisdead]
                             + [StmtDecl(Decl(Type.BOOL, resolve.name),
                                         init=ExprLiteral.TRUE)]
                             + [StmtDecl(Decl(p.bareType(self.side), p.var().name))
                                 for p in md.returns]
                             + [StmtExpr(ExprAssn(destructexpr, ExprMove(ExprVar('aParam')))),
                                 StmtDecl(Decl(Type('IPC::Message', ptr=True), self.replyvar.name),
                                          init=ExprCall(ExprVar(md.pqReplyCtorFunc()),
                                                        args=[routingId]))]
@@ -4774,17 +4695,17 @@ class _GenerateProtocolActorCode(ipdl.as
 
     def sendAsync(self, md, msgexpr, actor=None):
         sendok = ExprVar('sendok__')
         resolvefn = ExprVar('aResolve')
         rejectfn = ExprVar('aReject')
 
         stmts = [Whitespace.NL,
                  self.logMessage(md, msgexpr, 'Sending ', actor),
-                 self.profilerLabel(md)] + self.transition(md, actor, errorfn=errfnUnreachable)
+                 self.profilerLabel(md)]
         stmts.append(Whitespace.NL)
 
         # Generate the actual call expression.
         send = ExprSelect(self.protocol.callGetChannel(actor), '->', 'Send')
         if md.returns:
             stmts.append(StmtExpr(ExprCall(send, args=[msgexpr,
                                                        ExprVar('this'),
                                                        ExprMove(resolvefn),
@@ -4799,17 +4720,16 @@ class _GenerateProtocolActorCode(ipdl.as
 
     def sendBlocking(self, md, msgexpr, replyexpr, actor=None):
         sendok = ExprVar('sendok__')
         return (
             sendok,
             ([Whitespace.NL,
               self.logMessage(md, msgexpr, 'Sending ', actor),
               self.profilerLabel(md)]
-             + self.transition(md, actor, errorfn=errfnUnreachable)
              + [Whitespace.NL,
                 StmtDecl(Decl(Type.BOOL, sendok.name)),
                 StmtBlock([
                     StmtExpr(ExprCall(ExprVar('AUTO_PROFILER_TRACING'),
                                       [ExprLiteral.String("IPC"),
                                        ExprLiteral.String(self.protocol.name + "::" +
                                                           md.prettyMsgName()),
                                        ExprVar('OTHER')])),
@@ -4964,40 +4884,16 @@ class _GenerateProtocolActorCode(ipdl.as
             # only save the ID if we're actually going to use it, to
             # avoid unused-variable warnings
             saveIdStmts = [StmtDecl(Decl(_actorIdType(), idvar.name),
                                     self.protocol.routingId())]
         else:
             saveIdStmts = []
         return idvar, saveIdStmts
 
-    def transition(self, md, actor=None, reply=False, errorfn=None):
-        msgid = md.msgId() if not reply else md.replyId()
-        args = [
-            ExprVar('true' if _deleteId().name == msgid else 'false'),
-        ]
-        if self.protocol.decl.type.hasReentrantDelete:
-            function = 'ReEntrantDeleteStateTransition'
-            args.append(
-                ExprVar('true' if _deleteReplyId().name == msgid else 'false'),
-            )
-        else:
-            function = 'StateTransition'
-
-        if actor is not None:
-            stateexpr = _actorState(actor)
-        else:
-            stateexpr = self.protocol.stateVar()
-
-        args.append(ExprAddrOf(stateexpr))
-
-        ifstmt = StmtIf(ExprNot(ExprCall(ExprVar(function), args=args)))
-        ifstmt.addifstmts(errorfn('Transition error'))
-        return [ifstmt]
-
     def endRead(self, msgexpr, iterexpr):
         msgtype = ExprCall(ExprSelect(msgexpr, '.', 'type'), [])
         return StmtExpr(ExprCall(ExprSelect(msgexpr, '.', 'EndRead'),
                                  args=[iterexpr, msgtype]))
 
 
 class _GenerateProtocolParentCode(_GenerateProtocolActorCode):
     def __init__(self):
--- a/ipc/ipdl/ipdl/type.py
+++ b/ipc/ipdl/ipdl/type.py
@@ -295,17 +295,16 @@ class MessageType(IPDLType):
 class ProtocolType(IPDLType):
     def __init__(self, qname, nested, sendSemantics):
         self.qname = qname
         self.nestedRange = (NOT_NESTED, nested)
         self.sendSemantics = sendSemantics
         self.managers = []           # ProtocolType
         self.manages = []
         self.hasDelete = False
-        self.hasReentrantDelete = False
 
     def isProtocol(self): return True
 
     def name(self):
         return self.qname.baseid
 
     def fullname(self):
         return str(self.qname)
@@ -987,19 +986,16 @@ class GatherDecls(TcheckVisitor):
 
         p.decl.type.hasDelete = (not not self.symtab.lookup(_DELETE_MSG))
         if not (p.decl.type.hasDelete or p.decl.type.isToplevel()):
             self.error(
                 p.loc,
                 "destructor declaration `%s(...)' required for managed protocol `%s'",
                 _DELETE_MSG, p.name)
 
-        p.decl.type.hasReentrantDelete = p.decl.type.hasDelete and self.symtab.lookup(
-            _DELETE_MSG).type.isInterrupt()
-
         # FIXME/cjones declare all the little C++ thingies that will
         # be generated.  they're not relevant to IPDL itself, but
         # those ("invisible") symbols can clash with others in the
         # IPDL spec, and we'd like to catch those before C++ compilers
         # are allowed to obfuscate the error
 
         self.symtab.exitScope()
 
--- a/ipc/ipdl/test/cxx/PTestActorPunning.ipdl
+++ b/ipc/ipdl/test/cxx/PTestActorPunning.ipdl
@@ -15,26 +15,12 @@ protocol PTestActorPunning {
 child:
     async Start();
 
 parent:
     async PTestActorPunningPunned();
     async PTestActorPunningSub();
     async Pun(PTestActorPunningSub a, Bad bad);
     async __delete__();
-
-/*
-state PING:
-    send Start goto CONSTRUCTING;
-
-state CONSTRUCTING:
-    recv PTestActorPunningPunned goto CONSTRUCTING;
-    recv PTestActorPunningSub goto CONSTRUCTING;
-    recv Pun goto DEAD;
-    // We never make it past this transition, --> error.
-
-state DEAD:
-    recv __delete__;
-*/
 };
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestCrashCleanup.ipdl
+++ b/ipc/ipdl/test/cxx/PTestCrashCleanup.ipdl
@@ -6,19 +6,12 @@
 namespace mozilla {
 namespace _ipdltest {
 
 // NB: needs to be RPC so that the parent blocks on the child's crash.
 intr protocol PTestCrashCleanup {
 child:
     intr DIEDIEDIE();
     async __delete__();
-
-/*
-state ALIVE:
-    call DIEDIEDIE goto CRASH;
-state CRASH:
-    send __delete__;
-*/
 };
 
 }
 }
--- a/ipc/ipdl/test/cxx/PTestDataStructures.ipdl
+++ b/ipc/ipdl/test/cxx/PTestDataStructures.ipdl
@@ -95,40 +95,13 @@ parent:
     sync Test17(Op[] ops);
 
     // test that the ParamTraits<nsTArray>::Read() workaround for
     // nsTArray's incorrect memmove() semantics works properly
     // (nsIntRegion isn't memmove()able)
     sync Test18(nsIntRegion[] ops);
 
     sync Dummy(ShmemUnion su) returns (ShmemUnion rsu);
-
-/*
-state CONSTRUCTING:
-    send PTestDataStructuresSub goto CONSTRUCTING;
-    send Start goto TEST1;
-state TEST1:   recv Test1 goto TEST2;
-state TEST2:   recv Test2 goto TEST3;
-state TEST3:   recv Test3 goto TEST4;
-state TEST4:   recv Test4 goto TEST5;
-state TEST5:   recv Test5 goto TEST6;
-state TEST6:   recv Test6 goto TEST7;
-state TEST7:   recv Test7 goto TEST8;
-state TEST8:   recv Test8 goto TEST9;
-state TEST9:   recv Test9 goto TEST10;
-state TEST10:  recv Test10 goto TEST11;
-state TEST11:  recv Test11 goto TEST12;
-state TEST12:  recv Test12 goto TEST13;
-state TEST13:  recv Test13 goto TEST14;
-state TEST14:  recv Test14 goto TEST15;
-state TEST15:  recv Test15 goto TEST16;
-state TEST16:  recv Test16 goto TEST17;
-state TEST17:  recv Test17 goto TEST18;
-state TEST18:  recv Test18 goto DEAD;
-
-state DEAD:
-    recv __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
 
--- a/ipc/ipdl/test/cxx/PTestDesc.ipdl
+++ b/ipc/ipdl/test/cxx/PTestDesc.ipdl
@@ -10,23 +10,12 @@ child:
     intr PTestDescSub(nullable PTestDescSubsub dummy);
 
     async Test(PTestDescSubsub a);
 
     async __delete__();
 
 parent:
     async Ok(PTestDescSubsub a);
-
-/*
-state CONSTRUCT:
-    call PTestDescSub goto TEST;
-state TEST:
-    send Test goto ACK;
-state ACK:
-    recv Ok goto DEAD;
-state DEAD:
-    send __delete__;
-*/
 };
 
 }
 }
--- a/ipc/ipdl/test/cxx/PTestEndpointOpensOpened.ipdl
+++ b/ipc/ipdl/test/cxx/PTestEndpointOpensOpened.ipdl
@@ -10,23 +10,13 @@ child:
     async Hi();
     intr HiRpc();
 
 parent:
     async Hello();
     sync HelloSync();
     intr HelloRpc();
     async __delete__();
-
-/*
-state START:       recv Hello goto HI;
-state HI:          send Hi goto HELLO_SYNC;
-state HELLO_SYNC:  recv HelloSync goto HELLO_RPC;
-state HELLO_RPC:   answer HelloRpc goto HI_RPC;
-state HI_RPC:      call HiRpc goto DEAD;
-state DEAD:
-    recv __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest2
--- a/ipc/ipdl/test/cxx/PTestFailedCtor.ipdl
+++ b/ipc/ipdl/test/cxx/PTestFailedCtor.ipdl
@@ -3,19 +3,12 @@ include protocol PTestFailedCtorSub;
 namespace mozilla {
 namespace _ipdltest {
 
 intr protocol PTestFailedCtor {
     manages PTestFailedCtorSub; 
 child:
     intr PTestFailedCtorSub();
     async __delete__();
-
-/*
-state CONSTRUCT:
-    call PTestFailedCtorSub goto DEAD;
-state DEAD:
-    send __delete__;
-*/
 };
 
 }
 }
--- a/ipc/ipdl/test/cxx/PTestHangs.ipdl
+++ b/ipc/ipdl/test/cxx/PTestHangs.ipdl
@@ -8,34 +8,12 @@ both:
 
 parent:
     async Nonce();
 
 child:
     async Start();
     intr Hang();
     async __delete__();
-
-/*
-state START:
-    send Start goto RACE;
-
-state RACE:
-    recv Nonce goto RACE1;
-    call StackFrame goto RACE2;
-state RACE1:
-    call StackFrame goto FRAME2;
-state RACE2:
-    recv Nonce goto FRAME2;
-
-// So as to test unwinding the RPC stack
-state FRAME2: answer StackFrame goto FRAME3;
-state FRAME3: call StackFrame goto FRAME4;
-state FRAME4: answer StackFrame goto HANG;
-state HANG:   call Hang goto DEATH;
-
-state DEATH:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestInterruptRaces.ipdl
+++ b/ipc/ipdl/test/cxx/PTestInterruptRaces.ipdl
@@ -13,73 +13,12 @@ parent:
     sync GetAnsweredParent() returns (bool answeredParent);
 
 child:
     async Start();
     async Wakeup();
     async Wakeup3();
     intr Child();
     async __delete__();
-
-/*
-state START:
-    send Start goto TEST1;
-
-// First test: race while no other messages are on the Interrupt stack
-state TEST1:
-    recv StartRace goto RACE1;
-state RACE1:
-    call Race goto DUMMY1_1;
-    answer Race goto DUMMY1_2;
-state DUMMY1_1:
-    answer Race goto TEST2;
-state DUMMY1_2:
-    call Race goto TEST2;
-
-// Second test: race while other messages are on the Interrupt stack
-state TEST2:
-    call StackFrame goto MORESTACK;
-state MORESTACK:
-    answer StackFrame goto STARTRACE;
-state STARTRACE:
-    send Wakeup goto RACE2;
-state RACE2:
-    call Race goto DUMMY2_1;
-    answer Race goto DUMMY2_2;
-state DUMMY2_1:
-    answer Race goto TEST3;
-state DUMMY2_2:
-    call Race goto TEST3;
-
-// Third test: resolve race using custom policy
-state TEST3:
-    call StackFrame3 goto MORESTACK3;
-state MORESTACK3:
-    answer StackFrame3 goto STARTRACE3;
-state STARTRACE3:
-    send Wakeup3 goto RACE3;
-state RACE3:
-    call Child goto DUMMY3_1;
-    answer Parent goto DUMMY3_2;
-state DUMMY3_1:
-    // the parent receives this from the child in this state
-    recv GetAnsweredParent goto CHECK;
-    // this transition is never taken (if the custom race resolution
-    // works correctly)
-    answer Parent goto CHECK;
-state DUMMY3_2:
-    call Child goto CHECK;
-state CHECK:
-    // the child sends this from this state
-    recv GetAnsweredParent goto DYING;
-    // because of deferred processing, the parent receives the child's
-    // message here
-    answer Parent goto DYING;
-
-
-state DYING:
-    send __delete__;
-*/
-
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestInterruptShutdownRace.ipdl
+++ b/ipc/ipdl/test/cxx/PTestInterruptShutdownRace.ipdl
@@ -5,32 +5,12 @@ intr protocol PTestInterruptShutdownRace
 parent:
     sync StartDeath();
     async Orphan();
 
 child:
     async Start();
     intr Exit();
     async __delete__();
-
-/*
-state START:
-    send Start goto START_DEATH;
-
-state START_DEATH:
-    recv StartDeath goto EXITING;
-
-state EXITING:
-    recv Orphan goto QUITTING1;
-    call Exit goto QUITTING2;
-
-state QUITTING1:
-    call Exit goto DEAD;
-state QUITTING2:
-    recv Orphan goto DEAD;
-
-state DEAD:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestJSON.ipdl
+++ b/ipc/ipdl/test/cxx/PTestJSON.ipdl
@@ -35,22 +35,12 @@ sync protocol PTestJSON {
 child:
     async Start();
 
 parent:
     async PTestHandle();
     sync Test(JSONVariant i)
         returns (JSONVariant o);
     async __delete__();
-
-/*
-state START:
-    send Start goto TEST;
-
-state TEST:
-    recv PTestHandle goto TEST;
-    recv Test goto TEST;
-    recv __delete__;
-*/
 };
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestLatency.ipdl
+++ b/ipc/ipdl/test/cxx/PTestLatency.ipdl
@@ -14,64 +14,13 @@ child:
     intr Synchro();
     async CompressedSpam(uint32_t seqno) compress;
     intr Synchro2() returns (uint32_t lastSeqno,
                             uint32_t numMessagesDispatched);
 
 parent:
     async Pong();
     async Pong5();
-
-/*
-state START:
-    // if the timing resolution is too low, abort the test
-    send __delete__;
-    // otherwise, kick off the ping/pong trials
-    send Ping goto PONG;
-
-    // Trial 1: single ping/pong latency
-state PING:
-    send Ping goto PONG;
-    send Ping5 goto PING4;
-
-state PONG:
-    recv Pong goto PING;
-
-    // Trial 2: "overlapped" ping/pong latency
-state PING5:
-    send Ping5 goto PING4;
-    call Rpc goto RPC;
-
-state PING4: send Ping5 goto PING3;
-state PING3: send Ping5 goto PING2;
-state PING2: send Ping5 goto PING1;
-state PING1: send Ping5 goto PONG1;
-
-state PONG1: recv Pong5 goto PONG2;
-state PONG2: recv Pong5 goto PONG3;
-state PONG3: recv Pong5 goto PONG4;
-state PONG4: recv Pong5 goto PONG5;
-state PONG5: recv Pong5 goto PING5;
-
-    // Trial 3: lotsa RPC
-state RPC:
-    call Rpc goto RPC;
-    send Spam goto SPAM;
-
-    // Trial 4: lots of sequential asyn messages, which tests pipelining
-state SPAM:
-    send Spam goto SPAM;
-    call Synchro goto COMPRESSED_SPAM;
-
-    // Trial 5: lots of async spam, but compressed to cut down on
-    // dispatch overhead
-state COMPRESSED_SPAM:          // compressed spam, mmm
-    send CompressedSpam goto COMPRESSED_SPAM;
-    call Synchro2 goto DONE;
-
-state DONE:
-    send __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestMultiMgrs.ipdl
+++ b/ipc/ipdl/test/cxx/PTestMultiMgrs.ipdl
@@ -11,26 +11,12 @@ protocol PTestMultiMgrs {
 parent:
     async OK();
 
 child:
     async PTestMultiMgrsLeft();
     async PTestMultiMgrsRight();
     async Check();
     async __delete__();
-
-/*
-state START:
-    send PTestMultiMgrsLeft goto CONSTRUCT_RIGHT;
-state CONSTRUCT_RIGHT:
-    send PTestMultiMgrsRight goto CHILD_CHECK;
-state CHILD_CHECK:
-    send Check goto CHILD_ACK;
-state CHILD_ACK:
-    recv OK goto DONE;
-
-state DONE:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestMultiMgrsBottom.ipdl
+++ b/ipc/ipdl/test/cxx/PTestMultiMgrsBottom.ipdl
@@ -4,17 +4,12 @@ include protocol PTestMultiMgrsRight;
 namespace mozilla {
 namespace _ipdltest {
 
 protocol PTestMultiMgrsBottom {
     manager PTestMultiMgrsLeft or PTestMultiMgrsRight;
 
 child:
     async __delete__();
-
-/*
-state DOA:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestMultiMgrsLeft.ipdl
+++ b/ipc/ipdl/test/cxx/PTestMultiMgrsLeft.ipdl
@@ -7,20 +7,12 @@ namespace _ipdltest {
 protocol PTestMultiMgrsLeft {
     manager PTestMultiMgrs;
 
     manages PTestMultiMgrsBottom;
 
 child:
     async PTestMultiMgrsBottom();
     async __delete__();
-
-/*
-state START:
-    send PTestMultiMgrsBottom goto DONE;
-
-state DONE:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestMultiMgrsRight.ipdl
+++ b/ipc/ipdl/test/cxx/PTestMultiMgrsRight.ipdl
@@ -7,20 +7,12 @@ namespace _ipdltest {
 protocol PTestMultiMgrsRight {
     manager PTestMultiMgrs;
 
     manages PTestMultiMgrsBottom;
 
 child:
     async PTestMultiMgrsBottom();
     async __delete__();
-
-/*
-state START:
-    send PTestMultiMgrsBottom goto DONE;
-
-state DONE:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestNestedLoops.ipdl
+++ b/ipc/ipdl/test/cxx/PTestNestedLoops.ipdl
@@ -7,29 +7,13 @@ intr protocol PTestNestedLoops {
 
 child:
     async Start();
     intr R();
     async __delete__();
 
 parent:
     async Nonce();
-
-/*
-state START:
-    send Start goto RACE;
-
-state RACE:
-    recv Nonce goto RACE1;
-    call R goto RACE2;
-state RACE1:
-    call R goto DEAD;
-state RACE2:
-    recv Nonce goto DEAD;
-
-state DEAD:
-    send __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestRaceDeferral.ipdl
+++ b/ipc/ipdl/test/cxx/PTestRaceDeferral.ipdl
@@ -8,38 +8,12 @@ parent:
 child:
     async StartRace();
     intr Win();
     intr Rpc();
     async __delete__();
 
 // Test that messages deferred due to race resolution are
 // re-considered when the winner makes later RPCs
-
-// IPDL's type system can't express this protocol because the race
-// resolution causes state to diverge for multiple steps, so we'll
-// leave it "stateless"
-/*
-state START:
-    send StartRace goto DEFER;
-state DEFER:
-    call Win goto PARENT;
-    answer Lose goto CHILD;
-
-state PARENT:
-    // 'Lose' is received here but deferred
-    call Rpc goto PARENT_LOSE;
-state PARENT_LOSE:
-    // Calling 'Rpc' undefers 'Lose', and it wins the "race" with 'Rpc'
-    answer Lose goto DONE;
-
-state CHILD:
-    call Win goto CHILD_RPC;
-state CHILD_RPC:
-    call Rpc goto DONE;
-
-state DONE:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestRacyInterruptReplies.ipdl
+++ b/ipc/ipdl/test/cxx/PTestRacyInterruptReplies.ipdl
@@ -6,38 +6,12 @@ child:
     intr R_() returns (int replyNum);
     async _A();
     async ChildTest();
     async __delete__();
 
 parent:
     intr _R() returns (int replyNum);
     async A_();
-
-/*
-state PARENT_START:
-    call R_ goto PARENT_S1;
-
-state PARENT_S1:
-    recv A_ goto PARENT_S2;
-
-state PARENT_S2:
-    call R_ goto CHILD_TEST;
-
-state CHILD_TEST:
-    send ChildTest goto CHILD_START;
-
-state CHILD_START:
-    answer _R goto CHILD_S1;
-
-state CHILD_S1:
-    send _A goto CHILD_S2;
-
-state CHILD_S2:
-    answer _R goto DYING;
-
-state DYING:
-    send __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestSanity.ipdl
+++ b/ipc/ipdl/test/cxx/PTestSanity.ipdl
@@ -6,24 +6,13 @@ namespace _ipdltest {
 protocol PTestSanity {
 
 child:
     async Ping(int zero, float zeroPtFive, int8_t dummy);
     async __delete__();
 
 parent:
     async Pong(int one, float zeroPtTwoFive, uint8_t dummy);
-
-/*
-state PING:
-    send Ping goto PONG;
-
-state PONG:
-    recv Pong goto DEAD;
-
-state DEAD:
-    send __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestSelfManage.ipdl
+++ b/ipc/ipdl/test/cxx/PTestSelfManage.ipdl
@@ -6,19 +6,13 @@ namespace _ipdltest {
 
 protocol PTestSelfManage {
     manager PTestSelfManageRoot or PTestSelfManage;
     manages PTestSelfManage;
 
 child:
     async PTestSelfManage();
     async __delete__();
-
-/*
-state LIVE:
-    send PTestSelfManage goto LIVE;
-    send __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestSelfManageRoot.ipdl
+++ b/ipc/ipdl/test/cxx/PTestSelfManageRoot.ipdl
@@ -5,21 +5,13 @@ namespace _ipdltest {
 
 
 protocol PTestSelfManageRoot {
     manages PTestSelfManage;
 
 child:
     async PTestSelfManage();
     async __delete__();
-
-/*
-state LIVE:
-    send PTestSelfManage goto DEAD;
-
-state DEAD:
-    send __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestShmem.ipdl
+++ b/ipc/ipdl/test/cxx/PTestShmem.ipdl
@@ -3,21 +3,12 @@ namespace _ipdltest {
 
 protocol PTestShmem {
 child:
     async Give(Shmem mem, Shmem unsafe, uint32_t expectedSize);
 
 parent:
     async Take(Shmem mem, Shmem unsafe, uint32_t expectedSize);
     async __delete__();
-
-/*
-state GIVING:
-    send Give goto TAKING;
-
-state TAKING:
-    recv Take goto TAKING;
-    recv __delete__;
-*/
 };
 
 }
 }
--- a/ipc/ipdl/test/cxx/PTestShutdown.ipdl
+++ b/ipc/ipdl/test/cxx/PTestShutdown.ipdl
@@ -15,24 +15,12 @@ parent:
     // tests check shutdown semantics
     async PTestShutdownSub(bool expectCrash);
 
     // Used to synchronize between parent and child, to avoid races
     // around flushing socket write queues
     sync Sync();
 
     async __delete__();
-
-/*
-state START:
-    send Start goto TESTING;
-
-state TESTING:
-    recv PTestShutdownSub goto TESTING;
-    recv Sync goto DYING;
-
-state DYING:
-    recv __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestShutdownSub.ipdl
+++ b/ipc/ipdl/test/cxx/PTestShutdownSub.ipdl
@@ -9,24 +9,12 @@ intr protocol PTestShutdownSub {
     manages PTestShutdownSubsub;
 
 both:
     intr StackFrame();
 
 parent:
     async PTestShutdownSubsub(bool expectParentDeleted);
     sync __delete__();
-
-/*
-state CREATING:
-    recv PTestShutdownSubsub goto CREATING;
-    answer StackFrame goto DUMMYFRAME;
-
-state DUMMYFRAME:
-    call StackFrame goto DEAD;
-
-state DEAD:
-    recv __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestShutdownSubsub.ipdl
+++ b/ipc/ipdl/test/cxx/PTestShutdownSubsub.ipdl
@@ -3,17 +3,12 @@ include protocol PTestShutdownSub;
 namespace mozilla {
 namespace _ipdltest {
 
 sync protocol PTestShutdownSubsub {
     manager PTestShutdownSub;
 
 parent:
     sync __delete__();
-
-/*
-state LIVE:
-    recv __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/PTestStackHooks.ipdl
+++ b/ipc/ipdl/test/cxx/PTestStackHooks.ipdl
@@ -14,44 +14,13 @@ parent:
     sync Sync();
     intr Rpc();
 
 both:
     intr StackFrame();
 
 parent:
     async __delete__();
-
-/*
-state START:
-    send Start goto TEST1;
-
-state TEST1:
-    recv Async goto TEST2;
-
-state TEST2:
-    recv Sync goto TEST3;
-
-state TEST3:
-    answer Rpc goto TEST4;
-
-state TEST4:
-    answer StackFrame goto TEST4_2;
-state TEST4_2:
-    call StackFrame goto TEST4_3;
-state TEST4_3:
-    recv Async goto TEST5;
-
-state TEST5:
-    answer StackFrame goto TEST5_2;
-state TEST5_2:
-    call StackFrame goto TEST5_3;
-state TEST5_3:
-    recv Sync goto DEAD;
-
-state DEAD:
-    recv __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestSyncError.ipdl
+++ b/ipc/ipdl/test/cxx/PTestSyncError.ipdl
@@ -6,24 +6,13 @@ namespace _ipdltest {
 sync protocol PTestSyncError {
 
 child:
     async Start();
 
 parent:
     sync Error();
     async __delete__();
-
-/*
-state START:
-    send Start goto SYNC_ERROR;
-
-state SYNC_ERROR:
-    recv Error goto DEAD;
-
-state DEAD:
-    recv __delete__;
-*/
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestSyncHang.ipdl
+++ b/ipc/ipdl/test/cxx/PTestSyncHang.ipdl
@@ -1,16 +1,14 @@
 
 namespace mozilla {
 namespace _ipdltest {
 
 
 protocol PTestSyncHang {
 
 child:
-    // Add this unused message so we don't get compiler errors
-    // complaining that mLivenessState is an unused private field.
     async UnusedMessage();
 };
 
 
 } // namespace mozilla
 } // namespace _ipdltest
--- a/ipc/ipdl/test/cxx/PTestSyncWakeup.ipdl
+++ b/ipc/ipdl/test/cxx/PTestSyncWakeup.ipdl
@@ -9,34 +9,12 @@ child:
     async Start();
     async Note1();
     async Note2();
 
 parent:
     sync Sync1();
     sync Sync2();
     async __delete__();
-
-/*
-state START:
-    send Start goto TEST1;
-
-state TEST1:
-    recv Sync1 goto TEST1_P2;
-state TEST1_P2:
-    send Note1 goto TEST2;
-
-state TEST2:
-    answer StackFrame goto TEST2_P2;
-state TEST2_P2:
-    call StackFrame goto TEST2_P3;
-state TEST2_P3:
-    recv Sync2 goto TEST2_P4;
-state TEST2_P4:
-    send Note2 goto DONE;
-
-state DONE:
-    recv __delete__;
-*/
 };
 
 } // namespace _ipdltest
 } // namespace mozilla
--- a/ipc/ipdl/test/cxx/TestHangs.cpp
+++ b/ipc/ipdl/test/cxx/TestHangs.cpp
@@ -71,18 +71,16 @@ bool TestHangsParent::ShouldContinueFrom
   GetIPCChannel()->CloseWithTimeout();
 
   return false;
 }
 
 mozilla::ipc::IPCResult TestHangsParent::AnswerStackFrame() {
   ++mNumAnswerStackFrame;
 
-  // MOZ_ASSERT((PTestHangs::HANG != state()) == (mNumAnswerStackFrame == 1));
-
   if (mNumAnswerStackFrame == 1) {
     if (CallStackFrame()) {
       fail("should have timed out!");
     }
   } else if (mNumAnswerStackFrame == 2) {
     // minimum possible, 2 ms.  We want to detecting a hang to race
     // with the reply coming in, as reliably as possible
     SetReplyTimeoutMs(2);
--- a/ipc/ipdl/test/cxx/TestLatency.cpp
+++ b/ipc/ipdl/test/cxx/TestLatency.cpp
@@ -70,18 +70,16 @@ mozilla::ipc::IPCResult TestLatencyParen
   else
     Ping5Pong5Trial();
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult TestLatencyParent::RecvPong5() {
   ++mWhichPong5;
 
-  // MOZ_ASSERT((PTestLatency::PING5 != state()) == (mWhichPong5 < 5));
-
   if (mWhichPong5 < 5) {
     return IPC_OK();
   }
 
   mWhichPong5 = 0;
 
   TimeDuration thisTrial = (TimeStamp::Now() - mStart);
   mPP5TimeTotal += thisTrial;
@@ -164,18 +162,16 @@ TestLatencyChild::~TestLatencyChild() { 
 mozilla::ipc::IPCResult TestLatencyChild::RecvPing() {
   SendPong();
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult TestLatencyChild::RecvPing5() {
   ++mWhichPing5;
 
-  // MOZ_ASSERT((PTestLatency::PONG1 != state()) == (mWhichPing5 < 5));
-
   if (mWhichPing5 < 5) {
     return IPC_OK();
   }
 
   mWhichPing5 = 0;
 
   if (!SendPong5() || !SendPong5() || !SendPong5() || !SendPong5() ||
       !SendPong5())
--- a/ipc/ipdl/test/cxx/TestStackHooks.cpp
+++ b/ipc/ipdl/test/cxx/TestStackHooks.cpp
@@ -72,20 +72,18 @@ mozilla::ipc::IPCResult TestStackHooksCh
 mozilla::ipc::IPCResult TestStackHooksChild::AnswerStackFrame() {
   ++mNumAnswerStackFrame;
 
   if (!mOnStack) fail("missed stack notification");
 
   if (1 != mIncallDepth) fail("missed EnteredCall or ExitedCall hook");
 
   if (mNumAnswerStackFrame == 1) {
-    // MOZ_ASSERT(PTestStackHooks::TEST4_3 == state());
     if (!SendAsync()) fail("sending Async()");
   } else if (mNumAnswerStackFrame == 2) {
-    // MOZ_ASSERT(PTestStackHooks::TEST5_3 == state());
     if (!SendSync()) fail("sending Sync()");
   } else {
     fail("unexpected state");
   }
 
   if (!mOnStack) fail("bad stack exit notification");
 
   return IPC_OK();