зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1419455, part 2 - Clean up standardTypedefs. r=kanru
There's already a typedef for MessageChannel, so use that instead of Channel. Also, use IProtocol and not ProtocolBase or ChannelListener, for simplicity. MozReview-Commit-ID: 2zCjTpPTW4L --HG-- extra : rebase_source : eed8d6d51a512ac85f6b4962fc12591bf81c2981
This commit is contained in:
Родитель
1bae204066
Коммит
65015439d9
|
@ -1143,7 +1143,7 @@ class Protocol(ipdl.ast.Protocol):
|
|||
return '->'
|
||||
|
||||
def channelType(self):
|
||||
return Type('Channel', ptr=not self.decl.type.isToplevel())
|
||||
return Type('MessageChannel', ptr=not self.decl.type.isToplevel())
|
||||
|
||||
def managerInterfaceType(self, ptr=0):
|
||||
return Type('mozilla::ipc::IProtocol', ptr=ptr)
|
||||
|
@ -2471,10 +2471,8 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
|
||||
def standardTypedefs(self):
|
||||
return [
|
||||
Typedef(Type('mozilla::ipc::IProtocol'), 'ProtocolBase'),
|
||||
Typedef(Type('mozilla::ipc::IProtocol'), 'IProtocol'),
|
||||
Typedef(Type('IPC::Message'), 'Message'),
|
||||
Typedef(Type('mozilla::ipc::MessageChannel'), 'Channel'),
|
||||
Typedef(Type('mozilla::ipc::IProtocol'), 'ChannelListener'),
|
||||
Typedef(Type('base::ProcessHandle'), 'ProcessHandle'),
|
||||
Typedef(Type('mozilla::ipc::MessageChannel'), 'MessageChannel'),
|
||||
Typedef(Type('mozilla::ipc::SharedMemory'), 'SharedMemory'),
|
||||
|
@ -2972,7 +2970,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
ExprVar('MSG_ROUTING_CONTROL'), '!=', routevar))
|
||||
routedvar = ExprVar('routed__')
|
||||
routeif.ifb.addstmt(
|
||||
StmtDecl(Decl(Type('ChannelListener', ptr=1),
|
||||
StmtDecl(Decl(Type('IProtocol', ptr=1),
|
||||
routedvar.name),
|
||||
_lookupListener(routevar)))
|
||||
failif = StmtIf(ExprPrefixUnop(routedvar, '!'))
|
||||
|
@ -3235,7 +3233,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
sizevar = ExprVar('aSize')
|
||||
typevar = ExprVar('aType')
|
||||
unsafevar = ExprVar('aUnsafe')
|
||||
protocolbase = Type('ProtocolBase', ptr=1)
|
||||
protocolbase = Type('IProtocol', ptr=1)
|
||||
sourcevar = ExprVar('aSource')
|
||||
ivar = ExprVar('i')
|
||||
kidsvar = ExprVar('kids')
|
||||
|
|
Загрузка…
Ссылка в новой задаче