mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1529942 - part 1 - move initialization of ExternalHelperAppParent into Recv*; r=qdot
Alloc methods can't take arguments by move reference, whereas Recv methods can, and we'd like to take OptionalLoadInfoArgs (at least) by move reference. Since Init is infallible anyway, it doesn't really matter where we do it, so move it to this separate method to pave the way for rvalue reference OptionalLoadInfoArgs.
This commit is contained in:
parent
ac968578cf
commit
f71c238411
@ -3608,7 +3608,6 @@ PExternalHelperAppParent* ContentParent::AllocPExternalHelperAppParent(
|
||||
uri, aLoadInfoArgs, aContentLength, aWasFileChannel, aContentDisposition,
|
||||
aContentDispositionHint, aContentDispositionFilename);
|
||||
parent->AddRef();
|
||||
parent->Init(aMimeContentType, aForceSave, aReferrer, aBrowser);
|
||||
return parent;
|
||||
}
|
||||
|
||||
@ -3620,6 +3619,17 @@ bool ContentParent::DeallocPExternalHelperAppParent(
|
||||
return true;
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvPExternalHelperAppConstructor(
|
||||
PExternalHelperAppParent* actor, const OptionalURIParams& uri,
|
||||
const OptionalLoadInfoArgs& loadInfoArgs, const nsCString& aMimeContentType,
|
||||
const nsCString& aContentDisposition, const uint32_t& aContentDispositionHint,
|
||||
const nsString& aContentDispositionFilename, const bool& aForceSave,
|
||||
const int64_t& aContentLength, const bool& aWasFileChannel,
|
||||
const OptionalURIParams& aReferrer, PBrowserParent* aBrowser) {
|
||||
actor->Init(aMimeContentType, aForceSave, aReferrer, aBrowser);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
PHandlerServiceParent* ContentParent::AllocPHandlerServiceParent() {
|
||||
HandlerServiceParent* actor = new HandlerServiceParent();
|
||||
actor->AddRef();
|
||||
|
@ -909,6 +909,14 @@ class ContentParent final : public PContentParent,
|
||||
|
||||
bool DeallocPExternalHelperAppParent(PExternalHelperAppParent* aService);
|
||||
|
||||
mozilla::ipc::IPCResult RecvPExternalHelperAppConstructor(
|
||||
PExternalHelperAppParent* actor, const OptionalURIParams& uri,
|
||||
const OptionalLoadInfoArgs& loadInfoArgs, const nsCString& aMimeContentType,
|
||||
const nsCString& aContentDisposition, const uint32_t& aContentDispositionHint,
|
||||
const nsString& aContentDispositionFilename, const bool& aForceSave,
|
||||
const int64_t& aContentLength, const bool& aWasFileChannel,
|
||||
const OptionalURIParams& aReferrer, PBrowserParent* aBrowser) override;
|
||||
|
||||
PHandlerServiceParent* AllocPHandlerServiceParent();
|
||||
|
||||
bool DeallocPHandlerServiceParent(PHandlerServiceParent*);
|
||||
|
Loading…
Reference in New Issue
Block a user