зеркало из https://github.com/mozilla/gecko-dev.git
Bug 792652 - Get rid of CloneProtocol (r=dvander)
CloneProtocol is leftover code from Nuwa. We can remove it now.
This commit is contained in:
Родитель
e48b1dfd12
Коммит
d9f445e359
|
@ -47,34 +47,6 @@ CrashReporterParent::RecvAppendAppNotes(const nsCString& data)
|
|||
return true;
|
||||
}
|
||||
|
||||
mozilla::ipc::IProtocol*
|
||||
CrashReporterParent::CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx)
|
||||
{
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
ContentParent* contentParent = aCtx->GetContentParent();
|
||||
CrashReporter::ThreadId childThreadId = contentParent->Pid();
|
||||
GeckoProcessType childProcessType =
|
||||
contentParent->Process()->GetProcessType();
|
||||
|
||||
nsAutoPtr<PCrashReporterParent> actor(
|
||||
contentParent->AllocPCrashReporterParent(childThreadId,
|
||||
childProcessType)
|
||||
);
|
||||
if (!actor ||
|
||||
!contentParent->RecvPCrashReporterConstructor(actor,
|
||||
childThreadId,
|
||||
childThreadId)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return actor.forget();
|
||||
#else
|
||||
MOZ_CRASH("Not Implemented");
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
CrashReporterParent::CrashReporterParent()
|
||||
:
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
|
|
@ -160,10 +160,6 @@ public:
|
|||
|
||||
virtual bool RecvAppendAppNotes(const nsCString& aData) override;
|
||||
|
||||
virtual mozilla::ipc::IProtocol*
|
||||
CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext *aCtx) override;
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
void
|
||||
NotifyCrashService();
|
||||
|
|
|
@ -371,18 +371,6 @@ DOMStorageDBParent::~DOMStorageDBParent()
|
|||
}
|
||||
}
|
||||
|
||||
mozilla::ipc::IProtocol*
|
||||
DOMStorageDBParent::CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx)
|
||||
{
|
||||
ContentParent* contentParent = aCtx->GetContentParent();
|
||||
nsAutoPtr<PStorageParent> actor(contentParent->AllocPStorageParent());
|
||||
if (!actor || !contentParent->RecvPStorageConstructor(actor)) {
|
||||
return nullptr;
|
||||
}
|
||||
return actor.forget();
|
||||
}
|
||||
|
||||
DOMStorageDBParent::CacheParentBridge*
|
||||
DOMStorageDBParent::NewCache(const nsACString& aOriginSuffix, const nsACString& aOriginNoSuffix)
|
||||
{
|
||||
|
|
|
@ -125,10 +125,6 @@ class DOMStorageDBParent final : public PStorageParent
|
|||
public:
|
||||
DOMStorageDBParent();
|
||||
|
||||
virtual mozilla::ipc::IProtocol*
|
||||
CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx) override;
|
||||
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void);
|
||||
|
||||
|
|
|
@ -901,18 +901,6 @@ public:
|
|||
hal::FactoryReset(reason);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual mozilla::ipc::IProtocol*
|
||||
CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx) override
|
||||
{
|
||||
ContentParent* contentParent = aCtx->GetContentParent();
|
||||
nsAutoPtr<PHalParent> actor(contentParent->AllocPHalParent());
|
||||
if (!actor || !contentParent->RecvPHalConstructor(actor)) {
|
||||
return nullptr;
|
||||
}
|
||||
return actor.forget();
|
||||
}
|
||||
};
|
||||
|
||||
class HalChild : public PHalChild {
|
||||
|
|
|
@ -53,18 +53,6 @@ MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPSecurityDescriptor, \
|
|||
|
||||
namespace ipc {
|
||||
|
||||
ProtocolCloneContext::ProtocolCloneContext()
|
||||
: mNeckoParent(nullptr)
|
||||
{}
|
||||
|
||||
ProtocolCloneContext::~ProtocolCloneContext()
|
||||
{}
|
||||
|
||||
void ProtocolCloneContext::SetContentParent(ContentParent* aContentParent)
|
||||
{
|
||||
mContentParent = aContentParent;
|
||||
}
|
||||
|
||||
IToplevelProtocol::IToplevelProtocol(ProtocolId aProtoId)
|
||||
: mProtocolId(aProtoId)
|
||||
{
|
||||
|
|
|
@ -130,31 +130,6 @@ struct Trigger
|
|||
uint32_t mMessage : 31;
|
||||
};
|
||||
|
||||
class ProtocolCloneContext
|
||||
{
|
||||
typedef mozilla::dom::ContentParent ContentParent;
|
||||
typedef mozilla::net::NeckoParent NeckoParent;
|
||||
|
||||
RefPtr<ContentParent> mContentParent;
|
||||
NeckoParent* mNeckoParent;
|
||||
|
||||
public:
|
||||
ProtocolCloneContext();
|
||||
|
||||
~ProtocolCloneContext();
|
||||
|
||||
void SetContentParent(ContentParent* aContentParent);
|
||||
|
||||
ContentParent* GetContentParent() { return mContentParent; }
|
||||
|
||||
void SetNeckoParent(NeckoParent* aNeckoParent)
|
||||
{
|
||||
mNeckoParent = aNeckoParent;
|
||||
}
|
||||
|
||||
NeckoParent* GetNeckoParent() { return mNeckoParent; }
|
||||
};
|
||||
|
||||
template<class ListenerT>
|
||||
class IProtocolManager
|
||||
{
|
||||
|
@ -198,15 +173,6 @@ typedef IPCMessageStart ProtocolId;
|
|||
*/
|
||||
class IProtocol : public MessageListener
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* This function is used to clone this protocol actor.
|
||||
*
|
||||
* see IProtocol::CloneProtocol()
|
||||
*/
|
||||
virtual IProtocol*
|
||||
CloneProtocol(MessageChannel* aChannel,
|
||||
ProtocolCloneContext* aCtx) = 0;
|
||||
};
|
||||
|
||||
template<class PFooSide>
|
||||
|
|
|
@ -1169,9 +1169,6 @@ class Protocol(ipdl.ast.Protocol):
|
|||
fn = ExprSelect(actorThis, '->', fn.name)
|
||||
return ExprCall(fn)
|
||||
|
||||
def cloneProtocol(self):
|
||||
return ExprVar('CloneProtocol')
|
||||
|
||||
def processingErrorVar(self):
|
||||
assert self.decl.type.isToplevel()
|
||||
return ExprVar('ProcessingError')
|
||||
|
@ -2636,8 +2633,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
Typedef(Type('mozilla::ipc::MessageChannel'), 'MessageChannel'),
|
||||
Typedef(Type('mozilla::ipc::SharedMemory'), 'SharedMemory'),
|
||||
Typedef(Type('mozilla::ipc::Trigger'), 'Trigger'),
|
||||
Typedef(Type('mozilla::ipc::ProtocolCloneContext'),
|
||||
'ProtocolCloneContext')
|
||||
]
|
||||
|
||||
|
||||
|
@ -3641,8 +3636,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
ivar = ExprVar('i')
|
||||
kidsvar = ExprVar('kids')
|
||||
ithkid = ExprIndex(kidsvar, ivar)
|
||||
clonecontexttype = Type('ProtocolCloneContext', ptr=1)
|
||||
clonecontextvar = ExprVar('aCtx')
|
||||
|
||||
register = MethodDefn(MethodDecl(
|
||||
p.registerMethod().name,
|
||||
|
@ -3698,13 +3691,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
ret=Type('MessageChannel', ptr=1),
|
||||
virtual=1))
|
||||
|
||||
cloneprotocol = MethodDefn(MethodDecl(
|
||||
p.cloneProtocol().name,
|
||||
params=[ Decl(Type('Channel', ptr=True), 'aChannel'),
|
||||
Decl(clonecontexttype, clonecontextvar.name) ],
|
||||
ret=Type(p.fqBaseClass(), ptr=1),
|
||||
virtual=1))
|
||||
|
||||
if p.decl.type.isToplevel():
|
||||
tmpvar = ExprVar('tmp')
|
||||
|
||||
|
@ -3893,11 +3879,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
p.callOtherPid(p.managerVar())))
|
||||
getchannel.addstmt(StmtReturn(p.channelVar()))
|
||||
|
||||
cloneprotocol.addstmts([
|
||||
_fatalError('Clone() has not yet been implemented'),
|
||||
StmtReturn(ExprLiteral.NULL)
|
||||
])
|
||||
|
||||
othervar = ExprVar('other')
|
||||
managertype = Type(_actorName(p.name, self.side), ptr=1)
|
||||
|
||||
|
@ -3967,7 +3948,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
|
|||
destroyshmem,
|
||||
otherpid,
|
||||
getchannel,
|
||||
cloneprotocol,
|
||||
Whitespace.NL ]
|
||||
|
||||
def makeShmemIface(self):
|
||||
|
|
|
@ -152,18 +152,6 @@ CookieServiceParent::RecvSetCookieString(const URIParams& aHost,
|
|||
return true;
|
||||
}
|
||||
|
||||
mozilla::ipc::IProtocol*
|
||||
CookieServiceParent::CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx)
|
||||
{
|
||||
NeckoParent* manager = aCtx->GetNeckoParent();
|
||||
nsAutoPtr<PCookieServiceParent> actor(manager->AllocPCookieServiceParent());
|
||||
if (!actor || !manager->RecvPCookieServiceConstructor(actor)) {
|
||||
return nullptr;
|
||||
}
|
||||
return actor.forget();
|
||||
}
|
||||
|
||||
} // namespace net
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -36,10 +36,6 @@ protected:
|
|||
const bool& aFromHttp,
|
||||
const NeckoOriginAttributes& aAttrs) override;
|
||||
|
||||
virtual mozilla::ipc::IProtocol*
|
||||
CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx) override;
|
||||
|
||||
RefPtr<nsCookieService> mCookieService;
|
||||
};
|
||||
|
||||
|
|
|
@ -745,18 +745,6 @@ NeckoParent::DeallocPTransportProviderParent(PTransportProviderParent* aActor)
|
|||
return true;
|
||||
}
|
||||
|
||||
mozilla::ipc::IProtocol*
|
||||
NeckoParent::CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx)
|
||||
{
|
||||
ContentParent* contentParent = aCtx->GetContentParent();
|
||||
nsAutoPtr<PNeckoParent> actor(contentParent->AllocPNeckoParent());
|
||||
if (!actor || !contentParent->RecvPNeckoConstructor(actor)) {
|
||||
return nullptr;
|
||||
}
|
||||
return actor.forget();
|
||||
}
|
||||
|
||||
namespace {
|
||||
std::map<uint64_t, nsCOMPtr<nsIAuthPromptCallback> >&
|
||||
CallbackMap()
|
||||
|
|
|
@ -167,10 +167,6 @@ protected:
|
|||
AllocPWebSocketEventListenerParent(const uint64_t& aInnerWindowID) override;
|
||||
virtual bool DeallocPWebSocketEventListenerParent(PWebSocketEventListenerParent*) override;
|
||||
|
||||
virtual mozilla::ipc::IProtocol*
|
||||
CloneProtocol(Channel* aChannel,
|
||||
mozilla::ipc::ProtocolCloneContext* aCtx) override;
|
||||
|
||||
virtual PDataChannelParent*
|
||||
AllocPDataChannelParent(const uint32_t& channelId) override;
|
||||
virtual bool DeallocPDataChannelParent(PDataChannelParent* parent) override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче