diff --git a/dom/ipc/CrashReporterParent.cpp b/dom/ipc/CrashReporterParent.cpp index a58f33b1e058..fc627387fc00 100644 --- a/dom/ipc/CrashReporterParent.cpp +++ b/dom/ipc/CrashReporterParent.cpp @@ -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 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 diff --git a/dom/ipc/CrashReporterParent.h b/dom/ipc/CrashReporterParent.h index 6ecddeccbe83..25824f279351 100644 --- a/dom/ipc/CrashReporterParent.h +++ b/dom/ipc/CrashReporterParent.h @@ -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(); diff --git a/dom/storage/DOMStorageIPC.cpp b/dom/storage/DOMStorageIPC.cpp index 879dc35d695e..b3a93fc282b0 100644 --- a/dom/storage/DOMStorageIPC.cpp +++ b/dom/storage/DOMStorageIPC.cpp @@ -371,18 +371,6 @@ DOMStorageDBParent::~DOMStorageDBParent() } } -mozilla::ipc::IProtocol* -DOMStorageDBParent::CloneProtocol(Channel* aChannel, - mozilla::ipc::ProtocolCloneContext* aCtx) -{ - ContentParent* contentParent = aCtx->GetContentParent(); - nsAutoPtr actor(contentParent->AllocPStorageParent()); - if (!actor || !contentParent->RecvPStorageConstructor(actor)) { - return nullptr; - } - return actor.forget(); -} - DOMStorageDBParent::CacheParentBridge* DOMStorageDBParent::NewCache(const nsACString& aOriginSuffix, const nsACString& aOriginNoSuffix) { diff --git a/dom/storage/DOMStorageIPC.h b/dom/storage/DOMStorageIPC.h index 784b5ddda8af..b3508a588015 100644 --- a/dom/storage/DOMStorageIPC.h +++ b/dom/storage/DOMStorageIPC.h @@ -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); diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp index 52408a0c8409..7409dbbf9d48 100644 --- a/hal/sandbox/SandboxHal.cpp +++ b/hal/sandbox/SandboxHal.cpp @@ -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 actor(contentParent->AllocPHalParent()); - if (!actor || !contentParent->RecvPHalConstructor(actor)) { - return nullptr; - } - return actor.forget(); - } }; class HalChild : public PHalChild { diff --git a/ipc/glue/ProtocolUtils.cpp b/ipc/glue/ProtocolUtils.cpp index 7d2a9a2c10d6..a3bf8f0df5b5 100644 --- a/ipc/glue/ProtocolUtils.cpp +++ b/ipc/glue/ProtocolUtils.cpp @@ -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) { diff --git a/ipc/glue/ProtocolUtils.h b/ipc/glue/ProtocolUtils.h index 886fe958171d..59f88da933ec 100644 --- a/ipc/glue/ProtocolUtils.h +++ b/ipc/glue/ProtocolUtils.h @@ -130,31 +130,6 @@ struct Trigger uint32_t mMessage : 31; }; -class ProtocolCloneContext -{ - typedef mozilla::dom::ContentParent ContentParent; - typedef mozilla::net::NeckoParent NeckoParent; - - RefPtr 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 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 diff --git a/ipc/ipdl/ipdl/lower.py b/ipc/ipdl/ipdl/lower.py index 0bab0412c334..5043171d2f50 100644 --- a/ipc/ipdl/ipdl/lower.py +++ b/ipc/ipdl/ipdl/lower.py @@ -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): diff --git a/netwerk/cookie/CookieServiceParent.cpp b/netwerk/cookie/CookieServiceParent.cpp index e2ec6fbca74c..005ef44b4a0e 100644 --- a/netwerk/cookie/CookieServiceParent.cpp +++ b/netwerk/cookie/CookieServiceParent.cpp @@ -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 actor(manager->AllocPCookieServiceParent()); - if (!actor || !manager->RecvPCookieServiceConstructor(actor)) { - return nullptr; - } - return actor.forget(); -} - } // namespace net } // namespace mozilla diff --git a/netwerk/cookie/CookieServiceParent.h b/netwerk/cookie/CookieServiceParent.h index 2dc4f1d34ec4..7be2c97e9d9d 100644 --- a/netwerk/cookie/CookieServiceParent.h +++ b/netwerk/cookie/CookieServiceParent.h @@ -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 mCookieService; }; diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp index b7b55c6d3e61..032bbfea15ca 100644 --- a/netwerk/ipc/NeckoParent.cpp +++ b/netwerk/ipc/NeckoParent.cpp @@ -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 actor(contentParent->AllocPNeckoParent()); - if (!actor || !contentParent->RecvPNeckoConstructor(actor)) { - return nullptr; - } - return actor.forget(); -} - namespace { std::map >& CallbackMap() diff --git a/netwerk/ipc/NeckoParent.h b/netwerk/ipc/NeckoParent.h index e18d585b1941..ac9f7e41e54f 100644 --- a/netwerk/ipc/NeckoParent.h +++ b/netwerk/ipc/NeckoParent.h @@ -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;