Bug 1158896 - prevent dead code from being generated in lower.py; r=bent
authorNathan Froyd <froydnj@mozilla.com>
Mon, 27 Apr 2015 13:08:12 -0400
changeset 241336 f284c64e55371a5ecbbb86d0790e9ce418767ef8
parent 241335 4f898b4ffd633ed3dc2c75cd5e38e8016b2e3ea6
child 241337 b2dd209a43df1379f9f7e7272032ec4b94585b32
push id28658
push usercbook@mozilla.com
push dateTue, 28 Apr 2015 10:01:27 +0000
treeherdermozilla-central@e0299ad29b85 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs1158896
milestone40.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 1158896 - prevent dead code from being generated in lower.py; r=bent Coverity was complaining that we have things like: if ((!(actor))) { return false; } if ((!(actor))) { return false; } in the generated code, as the second return will clearly never be hit. To address this, let's remove a redundant call to dtorPrologue.
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -4967,17 +4967,16 @@ class _GenerateProtocolActorCode(ipdl.as
         return helper
 
 
     def genAsyncDtor(self, md):
         actor = md.actorDecl()
         actorvar = actor.var()
         method = MethodDefn(self.makeDtorMethodDecl(md))
 
-        method.addstmts(self.dtorPrologue(actor.var()))
         method.addstmts(self.dtorPrologue(actorvar))
 
         msgvar, stmts = self.makeMessage(md, errfnSendDtor, actorvar)
         sendok, sendstmts = self.sendAsync(md, msgvar, actorvar)
         method.addstmts(
             stmts
             + sendstmts
             + [ Whitespace.NL ]