Bug 1004196: Make all IPDL argument names be of form "aFoo" instead of "foo”. r=bent
authorJosh Aas <joshmoz@gmail.com>
Mon, 05 May 2014 17:00:55 -0500
changeset 181609 5f56d502fca1ae45bb392fe33366f82fa39f8c86
parent 181608 6e1d2f5b54e3f42d35104cf09cad968eb1ce2e85
child 181610 75413bfa9dd89adfd083fbca68aec9c7480ca68d
push id43112
push userjosh@mozilla.com
push dateMon, 05 May 2014 22:01:03 +0000
treeherdermozilla-inbound@5f56d502fca1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs1004196
milestone32.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 1004196: Make all IPDL argument names be of form "aFoo" instead of "foo”. r=bent
ipc/ipdl/ipdl/lower.py
--- a/ipc/ipdl/ipdl/lower.py
+++ b/ipc/ipdl/ipdl/lower.py
@@ -2809,47 +2809,47 @@ class _GenerateProtocolActorCode(ipdl.as
             self.cls.addstmt(StmtDecl(MethodDecl(
                 _allocMethod(managed, self.side).name,
                 params=md.makeCxxParams(side=self.side, implicit=0),
                 ret=actortype,
                 virtual=1, pure=1)))
 
             self.cls.addstmt(StmtDecl(MethodDecl(
                 _deallocMethod(managed, self.side).name,
-                params=[ Decl(actortype, 'actor') ],
+                params=[ Decl(actortype, 'aActor') ],
                 ret=Type.BOOL,
                 virtual=1, pure=1)))
 
         for actor in channelOpenedActors:
             # add the Alloc interface for actors created when a
             # new channel is opened
             actortype = _cxxBareType(actor.asType(), actor.side)
             self.cls.addstmt(StmtDecl(MethodDecl(
                 _allocMethod(actor.ptype, actor.side).name,
-                params=[ Decl(Type('Transport', ptr=1), 'transport'),
-                         Decl(Type('ProcessId'), 'otherProcess') ],
+                params=[ Decl(Type('Transport', ptr=1), 'aTransport'),
+                         Decl(Type('ProcessId'), 'aOtherProcess') ],
                 ret=actortype,
                 virtual=1, pure=1)))
 
         # ActorDestroy() method; default is no-op
         self.cls.addstmts([
             Whitespace.NL,
             MethodDefn(MethodDecl(
                 _destroyMethod().name,
-                params=[ Decl(_DestroyReason.Type(), 'why') ],
+                params=[ Decl(_DestroyReason.Type(), 'aWhy') ],
                 ret=Type.VOID,
                 virtual=1, pure=(self.side == 'parent'))),
             Whitespace.NL
         ])
 
         if ptype.isToplevel():
             # void ProcessingError(code); default to no-op
             processingerror = MethodDefn(
                 MethodDecl(p.processingErrorVar().name,
-                           params=[ Param(_Result.Type(), 'code') ],
+                           params=[ Param(_Result.Type(), 'aCode') ],
                            virtual=1))
 
             # bool ShouldContinueFromReplyTimeout(); default to |true|
             shouldcontinue = MethodDefn(
                 MethodDecl(p.shouldContinueFromTimeoutVar().name,
                            ret=Type.BOOL, virtual=1))
             shouldcontinue.addstmt(StmtReturn.TRUE)
 
@@ -3157,17 +3157,17 @@ class _GenerateProtocolActorCode(ipdl.as
             Whitespace.NL
         ])
 
         destroysubtreevar = ExprVar('DestroySubtree')
         deallocsubtreevar = ExprVar('DeallocSubtree')
         deallocshmemvar = ExprVar('DeallocShmems')
 
         # OnProcesingError(code)
-        codevar = ExprVar('code')
+        codevar = ExprVar('aCode')
         onprocessingerror = MethodDefn(
             MethodDecl('OnProcessingError',
                        params=[ Param(_Result.Type(), codevar.name) ]))
         if ptype.isToplevel():
             onprocessingerror.addstmt(StmtReturn(
                 ExprCall(p.processingErrorVar(), args=[ codevar ])))
         else:
             onprocessingerror.addstmt(
@@ -3254,17 +3254,17 @@ class _GenerateProtocolActorCode(ipdl.as
             ])
         else:
             onerror.addstmt(
                 _runtimeAbort("`OnError' called on non-toplevel actor"))
         self.cls.addstmts([ onerror, Whitespace.NL ])
 
         # OnChannelConnected()
         onconnected = MethodDefn(MethodDecl('OnChannelConnected',
-                                            params=[ Decl(Type.INT32, 'pid') ]))
+                                            params=[ Decl(Type.INT32, 'aPid') ]))
         if not ptype.isToplevel():
             onconnected.addstmt(
                 _runtimeAbort("'OnConnected' called on non-toplevel actor"))
 
         self.cls.addstmts([ onconnected, Whitespace.NL ])
 
         # User-facing shmem methods
         self.cls.addstmts(self.makeShmemIface())