Bug 1338455 - SetManager in prior to Register to Inherit EventTarget from Manager. r=billm a=gchang
authorBevis Tseng <btseng@mozilla.com>
Fri, 10 Feb 2017 15:42:45 +0800
changeset 378433 4f8cf5f4df94aa9c9b83c11a8985f70f01a17fed
parent 378432 364d760583b395c31562ccb6b777dadff067c4cd
child 378434 64915a68d19056e45c4c1ad1bd75593fdbb8b4c7
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm, gchang
bugs1338455
milestone53.0a2
Bug 1338455 - SetManager in prior to Register to Inherit EventTarget from Manager. r=billm a=gchang MozReview-Commit-ID: DkbhLm4g939
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -4004,18 +4004,19 @@ class _GenerateProtocolActorCode(ipdl.as
             registerexpr = ExprCall(self.protocol.registerMethod(),
                                     args=[ actorvar ])
         else:
             registerexpr = ExprCall(self.protocol.registerIDMethod(),
                                     args=[ actorvar, idexpr ])
 
         return [
             self.failIfNullActor(actorvar, errfn, msg="Error constructing actor %s" % actortype.name() + self.side.capitalize()),
+            # set manager in prior to register to inherit EventTarget from manager.
+            StmtExpr(ExprCall(ExprSelect(actorvar, '->', 'SetManager'), args=[ExprVar.THIS])),
             StmtExpr(registerexpr),
-            StmtExpr(ExprCall(ExprSelect(actorvar, '->', 'SetManager'), args=[ExprVar.THIS])),
             StmtExpr(ExprCall(ExprSelect(actorvar, '->', 'SetIPCChannel'),
                               args=[self.protocol.callGetChannel()])),
             StmtExpr(_callInsertManagedActor(
                 self.protocol.managedVar(md.decl.type.constructedType(),
                                          self.side),
                 actorvar)),
             StmtExpr(ExprAssn(_actorState(actorvar),
                               _startState(actorproto, fq=1)))