Bug 848237 - Let IPDL generate runtime aborts for constructor failures in child processes. r=bsmedberg
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Mon, 15 Apr 2013 15:57:14 +0200
changeset 140528 5de9e9db23c570c7135c14353ddb818640c19a25
parent 140508 aa620f3fc2f7116e6fad91915cb273160a2f5f0a
child 140529 5dc7a73fee0558be6d71d4fe8695f687d6da98ba
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs848237
milestone23.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 848237 - Let IPDL generate runtime aborts for constructor failures in child processes. r=bsmedberg
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -4648,19 +4648,25 @@ class _GenerateProtocolActorCode(ipdl.as
             StmtExpr(ExprAssn(_actorState(actorvar),
                               _startState(actorproto, fq=1)))
         ]
 
     def failCtorIf(self, md, cond):
         actorvar = md.actorDecl().var()
         type = md.decl.type.constructedType()
         failif = StmtIf(cond)
-        failif.addifstmts(self.destroyActor(md, actorvar,
-                                            why=_DestroyReason.FailedConstructor)
-                          + [ StmtReturn(ExprLiteral.NULL) ])
+        
+        if self.side=='child':
+            # in the child process this should not fail
+            failif.addifstmt(_runtimeAbort('constructor for actor failed'))
+        else:
+            failif.addifstmts(self.destroyActor(md, actorvar,
+                              why=_DestroyReason.FailedConstructor))
+
+        failif.addifstmt(StmtReturn(ExprLiteral.NULL))
         return [ failif ]
 
     def genHelperCtor(self, md):
         helperdecl = self.makeSendMethodDecl(md)
         helperdecl.params = helperdecl.params[1:]
         helper = MethodDefn(helperdecl)
 
         callctor = self.callAllocActor(md, retsems='out')