зеркало из https://github.com/mozilla/gecko-dev.git
Bug 792652 - IToplevelProtocol refactoring (r=dvander)
Currently toplevel protocols inherit from both IProtocolManager<IProtocol> and IToplevelProtocol. This change makes IToplevelProtocol inherit from IProtocol, so now toplevel protocols only inherit from IToplevelProtocol.
This commit is contained in:
Родитель
4e78a26c74
Коммит
5e4a576d00
|
@ -176,7 +176,7 @@ class Endpoint;
|
|||
* IToplevelProtocol tracks all top-level protocol actors created from
|
||||
* this protocol actor.
|
||||
*/
|
||||
class IToplevelProtocol
|
||||
class IToplevelProtocol : public IProtocol
|
||||
{
|
||||
template<class PFooSide> friend class Endpoint;
|
||||
|
||||
|
|
|
@ -2809,10 +2809,13 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
CppDirective('include', '"'+ p.channelHeaderFile() +'"'),
|
||||
Whitespace.NL ])
|
||||
|
||||
optinherits = []
|
||||
inherits = []
|
||||
if ptype.isToplevel():
|
||||
optinherits.append(Inherit(p.openedProtocolInterfaceType(),
|
||||
viz='public'))
|
||||
inherits.append(Inherit(p.openedProtocolInterfaceType(),
|
||||
viz='public'))
|
||||
else:
|
||||
inherits.append(Inherit(p.managerInterfaceType(), viz='public'))
|
||||
|
||||
if ptype.isToplevel() and self.side is 'parent':
|
||||
self.hdrfile.addthings([
|
||||
_makeForwardDeclForQClass('nsIFile', []),
|
||||
|
@ -2821,8 +2824,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
|
||||
self.cls = Class(
|
||||
self.clsname,
|
||||
inherits=[ Inherit(p.managerInterfaceType(), viz='public') ] +
|
||||
optinherits,
|
||||
inherits=inherits,
|
||||
abstract=True)
|
||||
|
||||
bridgeActorsCreated = ProcessGraph.bridgeEndpointsOf(ptype, self.side)
|
||||
|
|
Загрузка…
Ссылка в новой задаче