Bug 1367176 - Expose promise typedef to public so it can be used outside of actor. r=billm
authorKan-Ru Chen <kanru@kanru.info>
Wed, 24 May 2017 13:06:35 -0400
changeset 360704 8db29d17d984a04b4ff9a64caed1f1568f9d5f6a
parent 360703 3f656e09389019507d547e2d8fa39de7baa248fd
child 360705 f1342f98acb15bc18e52bb768d42681b7e849fca
push id31892
push userryanvm@gmail.com
push dateFri, 26 May 2017 01:29:45 +0000
treeherdermozilla-central@c2ff59dd31bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1367176
milestone55.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 1367176 - Expose promise typedef to public so it can be used outside of actor. r=billm MozReview-Commit-ID: JRlPR2rs3ij
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -2613,26 +2613,30 @@ class _GenerateProtocolActorCode(ipdl.as
                                            self.prettyside)),
                 Whitespace.NL ])
 
         self.cls.addstmt(Label.PROTECTED)
         for typedef in p.cxxTypedefs():
             self.cls.addstmt(typedef)
         for typedef in self.includedActorTypedefs:
             self.cls.addstmt(typedef)
+
+        self.cls.addstmt(Whitespace.NL)
+
+        self.cls.addstmts([ Typedef(p.fqStateType(), 'State'), Whitespace.NL ])
+
+        self.cls.addstmt(Label.PUBLIC)
         for md in p.messageDecls:
             if self.receivesMessage(md) and md.hasAsyncReturns():
                 self.cls.addstmt(
                     Typedef(_makePromise(md.returns, self.side, resolver=True),
                             md.promiseName()))
-
         self.cls.addstmt(Whitespace.NL)
 
-        self.cls.addstmts([ Typedef(p.fqStateType(), 'State'), Whitespace.NL ])
-
+        self.cls.addstmt(Label.PROTECTED)
         # interface methods that the concrete subclass has to impl
         for md in p.messageDecls:
             isctor, isdtor = md.decl.type.isCtor(), md.decl.type.isDtor()
 
             if self.receivesMessage(md):
                 # generate Recv/Answer* interface
                 implicit = (not isdtor)
                 returnsems = 'resolver' if md.decl.type.isAsync() else 'out'