forked from mirrors/gecko-dev
Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D22138 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
47e3c782c9
commit
e5279ff3f7
38 changed files with 118 additions and 143 deletions
|
|
@ -31,7 +31,7 @@ static nsresult BroadcastDomainSetChange(DomainSetType aSetType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
OptionalURIParams uri;
|
||||
Maybe<URIParams> uri;
|
||||
SerializeURI(aDomain, uri);
|
||||
|
||||
for (uint32_t i = 0; i < parents.Length(); i++) {
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword,
|
|||
}
|
||||
|
||||
RefPtr<nsIInputStream> postData;
|
||||
ipc::OptionalURIParams uri;
|
||||
Maybe<ipc::URIParams> uri;
|
||||
nsAutoString providerName;
|
||||
if (!contentChild->SendKeywordToURI(keyword, &providerName, &postData,
|
||||
&uri)) {
|
||||
|
|
|
|||
|
|
@ -873,7 +873,7 @@ nsresult ContentChild::ProvideWindowCommon(
|
|||
return rv;
|
||||
}
|
||||
|
||||
OptionalURIParams uriToLoad;
|
||||
Maybe<URIParams> uriToLoad;
|
||||
SerializeURI(aURI, uriToLoad);
|
||||
Unused << SendCreateWindowInDifferentProcess(
|
||||
aTabOpener, aChromeFlags, aCalledFromJS, aPositionSpecified,
|
||||
|
|
@ -1073,11 +1073,9 @@ nsresult ContentChild::ProvideWindowCommon(
|
|||
return rv;
|
||||
}
|
||||
|
||||
OptionalURIParams uriToLoad;
|
||||
Maybe<URIParams> uriToLoad;
|
||||
if (aURI) {
|
||||
SerializeURI(aURI, uriToLoad);
|
||||
} else {
|
||||
uriToLoad = mozilla::void_t();
|
||||
}
|
||||
|
||||
SendCreateWindow(aTabOpener, newChild, aChromeFlags, aCalledFromJS,
|
||||
|
|
@ -2017,13 +2015,13 @@ bool ContentChild::DeallocPPSMContentDownloaderChild(
|
|||
}
|
||||
|
||||
PExternalHelperAppChild* ContentChild::AllocPExternalHelperAppChild(
|
||||
const OptionalURIParams& uri,
|
||||
const Maybe<URIParams>& uri,
|
||||
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
||||
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, PBrowserChild* aBrowser) {
|
||||
const Maybe<URIParams>& aReferrer, PBrowserChild* aBrowser) {
|
||||
auto* child = new ExternalHelperAppChild();
|
||||
child->AddRef();
|
||||
return child;
|
||||
|
|
@ -2742,7 +2740,7 @@ bool ContentChild::DeallocPOfflineCacheUpdateChild(
|
|||
|
||||
mozilla::ipc::IPCResult ContentChild::RecvDomainSetChanged(
|
||||
const uint32_t& aSetType, const uint32_t& aChangeType,
|
||||
const OptionalURIParams& aDomain) {
|
||||
const Maybe<URIParams>& aDomain) {
|
||||
if (aChangeType == ACTIVATE_POLICY) {
|
||||
if (mPolicy) {
|
||||
return IPC_OK();
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ nsresult GetObjDir(nsIFile** aObjDir);
|
|||
#endif /* XP_MACOSX */
|
||||
|
||||
namespace ipc {
|
||||
class OptionalURIParams;
|
||||
class URIParams;
|
||||
} // namespace ipc
|
||||
|
||||
|
|
@ -85,7 +84,6 @@ class ContentChild final : public PContentChild,
|
|||
public mozilla::ipc::IShmemAllocator {
|
||||
typedef mozilla::dom::ClonedMessageData ClonedMessageData;
|
||||
typedef mozilla::ipc::FileDescriptor FileDescriptor;
|
||||
typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
|
||||
typedef mozilla::ipc::PFileDescriptorSetChild PFileDescriptorSetChild;
|
||||
typedef mozilla::ipc::URIParams URIParams;
|
||||
|
||||
|
|
@ -279,13 +277,13 @@ class ContentChild final : public PContentChild,
|
|||
PPSMContentDownloaderChild* aDownloader);
|
||||
|
||||
PExternalHelperAppChild* AllocPExternalHelperAppChild(
|
||||
const OptionalURIParams& uri,
|
||||
const Maybe<URIParams>& uri,
|
||||
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
||||
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, PBrowserChild* aBrowser);
|
||||
const Maybe<URIParams>& aReferrer, PBrowserChild* aBrowser);
|
||||
|
||||
bool DeallocPExternalHelperAppChild(PExternalHelperAppChild* aService);
|
||||
|
||||
|
|
@ -450,9 +448,9 @@ class ContentChild final : public PContentChild,
|
|||
|
||||
mozilla::ipc::IPCResult RecvUpdateWindow(const uintptr_t& aChildId);
|
||||
|
||||
mozilla::ipc::IPCResult RecvDomainSetChanged(
|
||||
const uint32_t& aSetType, const uint32_t& aChangeType,
|
||||
const OptionalURIParams& aDomain);
|
||||
mozilla::ipc::IPCResult RecvDomainSetChanged(const uint32_t& aSetType,
|
||||
const uint32_t& aChangeType,
|
||||
const Maybe<URIParams>& aDomain);
|
||||
|
||||
mozilla::ipc::IPCResult RecvShutdown();
|
||||
|
||||
|
|
|
|||
|
|
@ -3631,13 +3631,13 @@ bool ContentParent::DeallocPPSMContentDownloaderParent(
|
|||
}
|
||||
|
||||
PExternalHelperAppParent* ContentParent::AllocPExternalHelperAppParent(
|
||||
const OptionalURIParams& uri,
|
||||
const Maybe<URIParams>& uri,
|
||||
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
||||
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) {
|
||||
const Maybe<URIParams>& aReferrer, PBrowserParent* aBrowser) {
|
||||
ExternalHelperAppParent* parent = new ExternalHelperAppParent(
|
||||
uri, aContentLength, aWasFileChannel, aContentDisposition,
|
||||
aContentDispositionHint, aContentDispositionFilename);
|
||||
|
|
@ -3654,13 +3654,13 @@ bool ContentParent::DeallocPExternalHelperAppParent(
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvPExternalHelperAppConstructor(
|
||||
PExternalHelperAppParent* actor, const OptionalURIParams& uri,
|
||||
PExternalHelperAppParent* actor, const Maybe<URIParams>& uri,
|
||||
const Maybe<LoadInfoArgs>& 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) {
|
||||
const Maybe<URIParams>& aReferrer, PBrowserParent* aBrowser) {
|
||||
static_cast<ExternalHelperAppParent*>(actor)->Init(
|
||||
loadInfoArgs, aMimeContentType, aForceSave, aReferrer, aBrowser);
|
||||
return IPC_OK();
|
||||
|
|
@ -4185,9 +4185,9 @@ nsresult ContentParent::DoSendAsyncMessage(JSContext* aCx,
|
|||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvKeywordToURI(
|
||||
const nsCString& aKeyword, nsString* aProviderName,
|
||||
RefPtr<nsIInputStream>* aPostData, OptionalURIParams* aURI) {
|
||||
RefPtr<nsIInputStream>* aPostData, Maybe<URIParams>* aURI) {
|
||||
*aPostData = nullptr;
|
||||
*aURI = void_t();
|
||||
*aURI = Nothing();
|
||||
|
||||
nsCOMPtr<nsIURIFixup> fixup = components::URIFixup::Service();
|
||||
if (!fixup) {
|
||||
|
|
@ -4872,7 +4872,7 @@ mozilla::ipc::IPCResult ContentParent::RecvCreateWindow(
|
|||
PBrowserParent* aThisTab, PBrowserParent* aNewTab,
|
||||
const uint32_t& aChromeFlags, const bool& aCalledFromJS,
|
||||
const bool& aPositionSpecified, const bool& aSizeSpecified,
|
||||
const OptionalURIParams& aURIToLoad, const nsCString& aFeatures,
|
||||
const Maybe<URIParams>& aURIToLoad, const nsCString& aFeatures,
|
||||
const nsCString& aBaseURI, const float& aFullZoom,
|
||||
const IPC::Principal& aTriggeringPrincipal, nsIContentSecurityPolicy* aCsp,
|
||||
const uint32_t& aReferrerPolicy, CreateWindowResolver&& aResolve) {
|
||||
|
|
@ -4952,7 +4952,7 @@ mozilla::ipc::IPCResult ContentParent::RecvCreateWindow(
|
|||
mozilla::ipc::IPCResult ContentParent::RecvCreateWindowInDifferentProcess(
|
||||
PBrowserParent* aThisTab, const uint32_t& aChromeFlags,
|
||||
const bool& aCalledFromJS, const bool& aPositionSpecified,
|
||||
const bool& aSizeSpecified, const OptionalURIParams& aURIToLoad,
|
||||
const bool& aSizeSpecified, const Maybe<URIParams>& aURIToLoad,
|
||||
const nsCString& aFeatures, const nsCString& aBaseURI,
|
||||
const float& aFullZoom, const nsString& aName,
|
||||
const IPC::Principal& aTriggeringPrincipal, nsIContentSecurityPolicy* aCsp,
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ class PrintingParent;
|
|||
|
||||
namespace ipc {
|
||||
class CrashReporterHost;
|
||||
class OptionalURIParams;
|
||||
class PFileDescriptorSetParent;
|
||||
class URIParams;
|
||||
class TestShellParent;
|
||||
|
|
@ -130,7 +129,6 @@ class ContentParent final : public PContentParent,
|
|||
public CPOWManagerGetter,
|
||||
public mozilla::ipc::IShmemAllocator {
|
||||
typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
|
||||
typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
|
||||
typedef mozilla::ipc::PFileDescriptorSetParent PFileDescriptorSetParent;
|
||||
typedef mozilla::ipc::TestShellParent TestShellParent;
|
||||
typedef mozilla::ipc::URIParams URIParams;
|
||||
|
|
@ -514,7 +512,7 @@ class ContentParent final : public PContentParent,
|
|||
PBrowserParent* aThisTabParent, PBrowserParent* aNewTab,
|
||||
const uint32_t& aChromeFlags, const bool& aCalledFromJS,
|
||||
const bool& aPositionSpecified, const bool& aSizeSpecified,
|
||||
const OptionalURIParams& aURIToLoad, const nsCString& aFeatures,
|
||||
const Maybe<URIParams>& aURIToLoad, const nsCString& aFeatures,
|
||||
const nsCString& aBaseURI, const float& aFullZoom,
|
||||
const IPC::Principal& aTriggeringPrincipal,
|
||||
nsIContentSecurityPolicy* aCsp, const uint32_t& aReferrerPolicy,
|
||||
|
|
@ -523,7 +521,7 @@ class ContentParent final : public PContentParent,
|
|||
mozilla::ipc::IPCResult RecvCreateWindowInDifferentProcess(
|
||||
PBrowserParent* aThisTab, const uint32_t& aChromeFlags,
|
||||
const bool& aCalledFromJS, const bool& aPositionSpecified,
|
||||
const bool& aSizeSpecified, const OptionalURIParams& aURIToLoad,
|
||||
const bool& aSizeSpecified, const Maybe<URIParams>& aURIToLoad,
|
||||
const nsCString& aFeatures, const nsCString& aBaseURI,
|
||||
const float& aFullZoom, const nsString& aName,
|
||||
const IPC::Principal& aTriggeringPrincipal,
|
||||
|
|
@ -875,24 +873,24 @@ class ContentParent final : public PContentParent,
|
|||
PPSMContentDownloaderParent* aDownloader);
|
||||
|
||||
PExternalHelperAppParent* AllocPExternalHelperAppParent(
|
||||
const OptionalURIParams& aUri,
|
||||
const Maybe<URIParams>& aUri,
|
||||
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
||||
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);
|
||||
const Maybe<URIParams>& aReferrer, PBrowserParent* aBrowser);
|
||||
|
||||
bool DeallocPExternalHelperAppParent(PExternalHelperAppParent* aService);
|
||||
|
||||
mozilla::ipc::IPCResult RecvPExternalHelperAppConstructor(
|
||||
PExternalHelperAppParent* actor, const OptionalURIParams& uri,
|
||||
PExternalHelperAppParent* actor, const Maybe<URIParams>& uri,
|
||||
const Maybe<LoadInfoArgs>& 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;
|
||||
const Maybe<URIParams>& aReferrer, PBrowserParent* aBrowser) override;
|
||||
|
||||
PHandlerServiceParent* AllocPHandlerServiceParent();
|
||||
|
||||
|
|
@ -1039,7 +1037,7 @@ class ContentParent final : public PContentParent,
|
|||
mozilla::ipc::IPCResult RecvKeywordToURI(const nsCString& aKeyword,
|
||||
nsString* aProviderName,
|
||||
RefPtr<nsIInputStream>* aPostData,
|
||||
OptionalURIParams* aURI);
|
||||
Maybe<URIParams>* aURI);
|
||||
|
||||
mozilla::ipc::IPCResult RecvNotifyKeywordSearchLoading(
|
||||
const nsString& aProvider, const nsString& aKeyword);
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ child:
|
|||
|
||||
parent:
|
||||
/** Records a history visit. */
|
||||
async VisitURI(URIParams aURI, OptionalURIParams aLastVisitedURI,
|
||||
async VisitURI(URIParams aURI, URIParams? aLastVisitedURI,
|
||||
uint32_t aFlags);
|
||||
|
||||
/** Fetches the visited status for an array of URIs (Android-only). */
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ struct XPCOMInitData
|
|||
nsString[] dictionaries;
|
||||
ClipboardCapabilities clipboardCaps;
|
||||
DomainPolicyClone domainPolicy;
|
||||
OptionalURIParams userContentSheetURL;
|
||||
URIParams? userContentSheetURL;
|
||||
GfxVarUpdate[] gfxNonDefaultVarUpdates;
|
||||
ContentDeviceData contentDeviceData;
|
||||
GfxInfoFeatureStatus[] gfxFeatureStatus;
|
||||
|
|
@ -587,7 +587,7 @@ child:
|
|||
LayoutDeviceIntPoint aDragEndPoint,
|
||||
uint32_t aKeyModifiers);
|
||||
|
||||
async DomainSetChanged(uint32_t aSetType, uint32_t aChangeType, OptionalURIParams aDomain);
|
||||
async DomainSetChanged(uint32_t aSetType, uint32_t aChangeType, URIParams? aDomain);
|
||||
|
||||
/**
|
||||
* Notify the child to shutdown. The child will in turn call FinishShutdown
|
||||
|
|
@ -901,7 +901,7 @@ parent:
|
|||
|
||||
async PPSMContentDownloader(uint32_t aCertType);
|
||||
|
||||
async PExternalHelperApp(OptionalURIParams uri,
|
||||
async PExternalHelperApp(URIParams? uri,
|
||||
LoadInfoArgs? loadInfoArgs,
|
||||
nsCString aMimeContentType,
|
||||
nsCString aContentDisposition,
|
||||
|
|
@ -910,7 +910,7 @@ parent:
|
|||
bool aForceSave,
|
||||
int64_t aContentLength,
|
||||
bool aWasFileChannel,
|
||||
OptionalURIParams aReferrer,
|
||||
URIParams? aReferrer,
|
||||
nullable PBrowser aBrowser);
|
||||
|
||||
async PHandlerService();
|
||||
|
|
@ -971,7 +971,7 @@ parent:
|
|||
async DeviceReset();
|
||||
|
||||
sync KeywordToURI(nsCString keyword)
|
||||
returns (nsString providerName, nsIInputStream postData, OptionalURIParams uri);
|
||||
returns (nsString providerName, nsIInputStream postData, URIParams? uri);
|
||||
|
||||
sync NotifyKeywordSearchLoading(nsString providerName, nsString keyword);
|
||||
|
||||
|
|
@ -1120,7 +1120,7 @@ parent:
|
|||
bool aCalledFromJS,
|
||||
bool aPositionSpecified,
|
||||
bool aSizeSpecified,
|
||||
OptionalURIParams aURIToLoad,
|
||||
URIParams? aURIToLoad,
|
||||
nsCString aFeatures,
|
||||
nsCString aBaseURI,
|
||||
float aFullZoom,
|
||||
|
|
@ -1135,7 +1135,7 @@ parent:
|
|||
bool aCalledFromJS,
|
||||
bool aPositionSpecified,
|
||||
bool aSizeSpecified,
|
||||
OptionalURIParams aURIToLoad,
|
||||
URIParams? aURIToLoad,
|
||||
nsCString aFeatures,
|
||||
nsCString aBaseURI,
|
||||
float aFullZoom,
|
||||
|
|
|
|||
|
|
@ -3393,7 +3393,7 @@ mozilla::ipc::IPCResult TabParent::RecvShowCanvasPermissionPrompt(
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult TabParent::RecvVisitURI(
|
||||
const URIParams& aURI, const OptionalURIParams& aLastVisitedURI,
|
||||
const URIParams& aURI, const Maybe<URIParams>& aLastVisitedURI,
|
||||
const uint32_t& aFlags) {
|
||||
nsCOMPtr<nsIURI> ourURI = DeserializeURI(aURI);
|
||||
if (!ourURI) {
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ class TabParent final : public PBrowserParent,
|
|||
mozilla::ipc::IPCResult RecvGetSystemFont(nsCString* aFontName);
|
||||
|
||||
mozilla::ipc::IPCResult RecvVisitURI(const URIParams& aURI,
|
||||
const OptionalURIParams& aLastVisitedURI,
|
||||
const Maybe<URIParams>& aLastVisitedURI,
|
||||
const uint32_t& aFlags);
|
||||
|
||||
mozilla::ipc::IPCResult RecvQueryVisitedState(
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
#include "nsILoadInfo.h"
|
||||
#include "nsContentSecurityManager.h"
|
||||
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/ipc/URIUtils.h"
|
||||
|
||||
using mozilla::dom::AutoEntryScript;
|
||||
|
|
@ -1231,7 +1232,7 @@ NS_IMETHODIMP_(void) nsJSURI::Serialize(mozilla::ipc::URIParams& aParams) {
|
|||
if (mBaseURI) {
|
||||
SerializeURI(mBaseURI, jsParams.baseURI());
|
||||
} else {
|
||||
jsParams.baseURI() = mozilla::void_t();
|
||||
jsParams.baseURI() = mozilla::Nothing();
|
||||
}
|
||||
|
||||
aParams = jsParams;
|
||||
|
|
@ -1248,8 +1249,8 @@ bool nsJSURI::Deserialize(const mozilla::ipc::URIParams& aParams) {
|
|||
const JSURIParams& jsParams = aParams.get_JSURIParams();
|
||||
mozilla::net::nsSimpleURI::Deserialize(jsParams.simpleParams());
|
||||
|
||||
if (jsParams.baseURI().type() != OptionalURIParams::Tvoid_t) {
|
||||
mBaseURI = DeserializeURI(jsParams.baseURI().get_URIParams());
|
||||
if (jsParams.baseURI().isSome()) {
|
||||
mBaseURI = DeserializeURI(jsParams.baseURI().ref());
|
||||
} else {
|
||||
mBaseURI = nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -552,9 +552,9 @@ void nsMozIconURI::Serialize(URIParams& aParams) {
|
|||
return;
|
||||
}
|
||||
|
||||
params.uri() = iconURLParams;
|
||||
params.uri() = Some(std::move(iconURLParams));
|
||||
} else {
|
||||
params.uri() = void_t();
|
||||
params.uri() = Nothing();
|
||||
}
|
||||
|
||||
params.size() = mSize;
|
||||
|
|
@ -573,8 +573,8 @@ bool nsMozIconURI::Deserialize(const URIParams& aParams) {
|
|||
}
|
||||
|
||||
const IconURIParams& params = aParams.get_IconURIParams();
|
||||
if (params.uri().type() != OptionalURIParams::Tvoid_t) {
|
||||
nsCOMPtr<nsIURI> uri = DeserializeURI(params.uri().get_URIParams());
|
||||
if (params.uri().isSome()) {
|
||||
nsCOMPtr<nsIURI> uri = DeserializeURI(params.uri().ref());
|
||||
mIconURL = do_QueryInterface(uri);
|
||||
if (!mIconURL) {
|
||||
MOZ_ASSERT_UNREACHABLE("bad nsIURI passed");
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo,
|
|||
Some(topLevelStorageAreaPrincipalInfoTemp);
|
||||
}
|
||||
|
||||
OptionalURIParams optionalResultPrincipalURI = mozilla::void_t();
|
||||
Maybe<URIParams> optionalResultPrincipalURI;
|
||||
nsCOMPtr<nsIURI> resultPrincipalURI;
|
||||
Unused << aLoadInfo->GetResultPrincipalURI(
|
||||
getter_AddRefs(resultPrincipalURI));
|
||||
|
|
@ -573,7 +573,7 @@ nsresult LoadInfoArgsToLoadInfo(
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIURI> resultPrincipalURI;
|
||||
if (loadInfoArgs.resultPrincipalURI().type() != OptionalURIParams::Tvoid_t) {
|
||||
if (loadInfoArgs.resultPrincipalURI().isSome()) {
|
||||
resultPrincipalURI = DeserializeURI(loadInfoArgs.resultPrincipalURI());
|
||||
NS_ENSURE_TRUE(resultPrincipalURI, NS_ERROR_UNEXPECTED);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct JARURIParams
|
|||
|
||||
struct IconURIParams
|
||||
{
|
||||
OptionalURIParams uri;
|
||||
URIParams? uri;
|
||||
uint32_t size;
|
||||
nsCString contentType;
|
||||
nsCString fileName;
|
||||
|
|
@ -86,16 +86,10 @@ union URIParams
|
|||
HostObjectURIParams;
|
||||
};
|
||||
|
||||
union OptionalURIParams
|
||||
{
|
||||
void_t;
|
||||
URIParams;
|
||||
};
|
||||
|
||||
struct JSURIParams
|
||||
{
|
||||
SimpleURIParams simpleParams;
|
||||
OptionalURIParams baseURI;
|
||||
URIParams? baseURI;
|
||||
};
|
||||
|
||||
struct SimpleNestedURIParams
|
||||
|
|
|
|||
|
|
@ -46,15 +46,15 @@ void SerializeURI(nsIURI* aURI, URIParams& aParams) {
|
|||
}
|
||||
}
|
||||
|
||||
void SerializeURI(nsIURI* aURI, OptionalURIParams& aParams) {
|
||||
void SerializeURI(nsIURI* aURI, Maybe<URIParams>& aParams) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (aURI) {
|
||||
URIParams params;
|
||||
SerializeURI(aURI, params);
|
||||
aParams = params;
|
||||
aParams = Some(std::move(params));
|
||||
} else {
|
||||
aParams = mozilla::void_t();
|
||||
aParams = Nothing();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -116,21 +116,13 @@ already_AddRefed<nsIURI> DeserializeURI(const URIParams& aParams) {
|
|||
return uri.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<nsIURI> DeserializeURI(const OptionalURIParams& aParams) {
|
||||
already_AddRefed<nsIURI> DeserializeURI(const Maybe<URIParams>& aParams) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
|
||||
switch (aParams.type()) {
|
||||
case OptionalURIParams::Tvoid_t:
|
||||
break;
|
||||
|
||||
case OptionalURIParams::TURIParams:
|
||||
uri = DeserializeURI(aParams.get_URIParams());
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_CRASH("Unknown params!");
|
||||
if (aParams.isSome()) {
|
||||
uri = DeserializeURI(aParams.ref());
|
||||
}
|
||||
|
||||
return uri.forget();
|
||||
|
|
|
|||
|
|
@ -17,23 +17,23 @@ namespace ipc {
|
|||
|
||||
void SerializeURI(nsIURI* aURI, URIParams& aParams);
|
||||
|
||||
void SerializeURI(nsIURI* aURI, OptionalURIParams& aParams);
|
||||
void SerializeURI(nsIURI* aURI, Maybe<URIParams>& aParams);
|
||||
|
||||
already_AddRefed<nsIURI> DeserializeURI(const URIParams& aParams);
|
||||
|
||||
already_AddRefed<nsIURI> DeserializeURI(const OptionalURIParams& aParams);
|
||||
already_AddRefed<nsIURI> DeserializeURI(const Maybe<URIParams>& aParams);
|
||||
|
||||
template <>
|
||||
struct IPDLParamTraits<nsIURI> {
|
||||
static void Write(IPC::Message* aMsg, IProtocol* aActor, nsIURI* aParam) {
|
||||
OptionalURIParams params;
|
||||
Maybe<URIParams> params;
|
||||
SerializeURI(aParam, params);
|
||||
WriteIPDLParam(aMsg, aActor, params);
|
||||
}
|
||||
|
||||
static bool Read(const IPC::Message* aMsg, PickleIterator* aIter,
|
||||
IProtocol* aActor, RefPtr<nsIURI>* aResult) {
|
||||
OptionalURIParams params;
|
||||
Maybe<URIParams> params;
|
||||
if (!ReadIPDLParam(aMsg, aIter, aActor, ¶ms)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ GeckoViewHistory::VisitURI(nsIWidget* aWidget, nsIURI* aURI,
|
|||
URIParams uri;
|
||||
SerializeURI(aURI, uri);
|
||||
|
||||
OptionalURIParams lastVisitedURI;
|
||||
Maybe<URIParams> lastVisitedURI;
|
||||
SerializeURI(aLastVisitedURI, lastVisitedURI);
|
||||
|
||||
// If we're in the content process, send the visit to the parent. The parent
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ class PredictorLearnRunnable final : public Runnable {
|
|||
ipc::URIParams serTargetURI;
|
||||
SerializeURI(mTargetURI, serTargetURI);
|
||||
|
||||
ipc::OptionalURIParams serSourceURI;
|
||||
Maybe<ipc::URIParams> serSourceURI;
|
||||
SerializeURI(mSourceURI, serSourceURI);
|
||||
|
||||
PREDICTOR_LOG(("predictor::learn (async) forwarding to parent"));
|
||||
|
|
@ -657,7 +657,7 @@ Predictor::PredictNative(nsIURI *targetURI, nsIURI *sourceURI,
|
|||
|
||||
PREDICTOR_LOG((" called on child process"));
|
||||
|
||||
ipc::OptionalURIParams serTargetURI, serSourceURI;
|
||||
Maybe<ipc::URIParams> serTargetURI, serSourceURI;
|
||||
SerializeURI(targetURI, serTargetURI);
|
||||
SerializeURI(sourceURI, serSourceURI);
|
||||
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ nsresult CookieServiceChild::SetCookieStringInternal(nsIURI *aHostURI,
|
|||
URIParams hostURIParams;
|
||||
SerializeURI(aHostURI, hostURIParams);
|
||||
|
||||
OptionalURIParams channelURIParams;
|
||||
Maybe<URIParams> channelURIParams;
|
||||
mozilla::OriginAttributes attrs;
|
||||
if (aChannel) {
|
||||
nsCOMPtr<nsIURI> channelURI;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ void CookieServiceParent::ActorDestroy(ActorDestroyReason aWhy) {
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult CookieServiceParent::RecvSetCookieString(
|
||||
const URIParams &aHost, const OptionalURIParams &aChannelURI,
|
||||
const URIParams &aHost, const Maybe<URIParams> &aChannelURI,
|
||||
const bool &aIsForeign, const bool &aIsTrackingResource,
|
||||
const bool &aFirstPartyStorageAccessGranted, const nsCString &aCookieString,
|
||||
const nsCString &aServerTime, const OriginAttributes &aAttrs,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class CookieServiceParent : public PCookieServiceParent {
|
|||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
|
||||
mozilla::ipc::IPCResult RecvSetCookieString(
|
||||
const URIParams &aHost, const OptionalURIParams &aChannelURI,
|
||||
const URIParams &aHost, const Maybe<URIParams> &aChannelURI,
|
||||
const bool &aIsForeign, const bool &aIsTrackingResource,
|
||||
const bool &aFirstPartyStorageAccessGranted,
|
||||
const nsCString &aCookieString, const nsCString &aServerTime,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ parent:
|
|||
* @see mozIThirdPartyUtil.isThirdPartyChannel
|
||||
*/
|
||||
nested(inside_cpow) async SetCookieString(URIParams host,
|
||||
OptionalURIParams channelURI,
|
||||
URIParams? channelURI,
|
||||
bool isForeign,
|
||||
bool isTrackingResource,
|
||||
bool firstPartyStorageAccessGranted,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ struct PreferredAlternativeDataTypeParams
|
|||
struct RedirectHistoryEntryInfo
|
||||
{
|
||||
PrincipalInfo principalInfo;
|
||||
OptionalURIParams referrerUri;
|
||||
URIParams? referrerUri;
|
||||
nsCString remoteAddress;
|
||||
};
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ struct LoadInfoArgs
|
|||
PrincipalInfo? sandboxedLoadingPrincipalInfo;
|
||||
PrincipalInfo? topLevelPrincipalInfo;
|
||||
PrincipalInfo? topLevelStorageAreaPrincipalInfo;
|
||||
OptionalURIParams resultPrincipalURI;
|
||||
URIParams? resultPrincipalURI;
|
||||
uint32_t securityFlags;
|
||||
uint32_t contentPolicyType;
|
||||
uint32_t tainting;
|
||||
|
|
@ -209,12 +209,12 @@ struct HttpChannelOpenArgs
|
|||
// - TODO: bug 571161: unclear if any HTTP channel clients ever
|
||||
// set originalURI != uri (about:credits?); also not clear if
|
||||
// chrome channel would ever need to know. Get rid of next arg?
|
||||
OptionalURIParams original;
|
||||
OptionalURIParams doc;
|
||||
OptionalURIParams originalReferrer;
|
||||
URIParams? original;
|
||||
URIParams? doc;
|
||||
URIParams? originalReferrer;
|
||||
uint32_t referrerPolicy;
|
||||
OptionalURIParams apiRedirectTo;
|
||||
OptionalURIParams topWindowURI;
|
||||
URIParams? apiRedirectTo;
|
||||
URIParams? topWindowURI;
|
||||
nsIPrincipal topWindowPrincipal;
|
||||
uint32_t loadFlags;
|
||||
RequestHeaderTuples requestHeaders;
|
||||
|
|
|
|||
|
|
@ -743,8 +743,8 @@ mozilla::ipc::IPCResult NeckoParent::RecvOnAuthCancelled(
|
|||
|
||||
/* Predictor Messages */
|
||||
mozilla::ipc::IPCResult NeckoParent::RecvPredPredict(
|
||||
const ipc::OptionalURIParams& aTargetURI,
|
||||
const ipc::OptionalURIParams& aSourceURI, const uint32_t& aReason,
|
||||
const Maybe<ipc::URIParams>& aTargetURI,
|
||||
const Maybe<ipc::URIParams>& aSourceURI, const uint32_t& aReason,
|
||||
const OriginAttributes& aOriginAttributes, const bool& hasVerifier) {
|
||||
nsCOMPtr<nsIURI> targetURI = DeserializeURI(aTargetURI);
|
||||
nsCOMPtr<nsIURI> sourceURI = DeserializeURI(aSourceURI);
|
||||
|
|
@ -765,7 +765,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvPredPredict(
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult NeckoParent::RecvPredLearn(
|
||||
const ipc::URIParams& aTargetURI, const ipc::OptionalURIParams& aSourceURI,
|
||||
const ipc::URIParams& aTargetURI, const Maybe<ipc::URIParams>& aSourceURI,
|
||||
const uint32_t& aReason, const OriginAttributes& aOriginAttributes) {
|
||||
nsCOMPtr<nsIURI> targetURI = DeserializeURI(aTargetURI);
|
||||
nsCOMPtr<nsIURI> sourceURI = DeserializeURI(aSourceURI);
|
||||
|
|
|
|||
|
|
@ -200,14 +200,13 @@ class NeckoParent : public PNeckoParent {
|
|||
|
||||
/* Predictor Messages */
|
||||
mozilla::ipc::IPCResult RecvPredPredict(
|
||||
const ipc::OptionalURIParams& aTargetURI,
|
||||
const ipc::OptionalURIParams& aSourceURI,
|
||||
const Maybe<ipc::URIParams>& aTargetURI,
|
||||
const Maybe<ipc::URIParams>& aSourceURI,
|
||||
const PredictorPredictReason& aReason,
|
||||
const OriginAttributes& aOriginAttributes, const bool& hasVerifier);
|
||||
|
||||
mozilla::ipc::IPCResult RecvPredLearn(
|
||||
const ipc::URIParams& aTargetURI,
|
||||
const ipc::OptionalURIParams& aSourceURI,
|
||||
const ipc::URIParams& aTargetURI, const Maybe<ipc::URIParams>& aSourceURI,
|
||||
const PredictorPredictReason& aReason,
|
||||
const OriginAttributes& aOriginAttributes);
|
||||
mozilla::ipc::IPCResult RecvPredReset();
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ parent:
|
|||
async PWebSocketEventListener(uint64_t aInnerWindowID);
|
||||
|
||||
/* Predictor Methods */
|
||||
async PredPredict(OptionalURIParams targetURI, OptionalURIParams sourceURI,
|
||||
async PredPredict(URIParams? targetURI, URIParams? sourceURI,
|
||||
uint32_t reason, OriginAttributes originAttributes,
|
||||
bool hasVerifier);
|
||||
async PredLearn(URIParams targetURI, OptionalURIParams sourceURI,
|
||||
async PredLearn(URIParams targetURI, URIParams? sourceURI,
|
||||
uint32_t reason, OriginAttributes originAttributes);
|
||||
async PredReset();
|
||||
|
||||
|
|
|
|||
|
|
@ -2141,11 +2141,11 @@ NS_IMETHODIMP
|
|||
HttpChannelChild::OnRedirectVerifyCallback(nsresult result) {
|
||||
LOG(("HttpChannelChild::OnRedirectVerifyCallback [this=%p]\n", this));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
OptionalURIParams redirectURI;
|
||||
Maybe<URIParams> redirectURI;
|
||||
nsresult rv;
|
||||
|
||||
uint32_t referrerPolicy = REFERRER_POLICY_UNSET;
|
||||
OptionalURIParams referrerURI;
|
||||
Maybe<URIParams> referrerURI;
|
||||
SerializeURI(nullptr, referrerURI);
|
||||
|
||||
nsCOMPtr<nsIHttpChannel> newHttpChannel =
|
||||
|
|
|
|||
|
|
@ -382,11 +382,11 @@ void HttpChannelParent::InvokeAsyncOpen(nsresult rv) {
|
|||
}
|
||||
|
||||
bool HttpChannelParent::DoAsyncOpen(
|
||||
const URIParams& aURI, const OptionalURIParams& aOriginalURI,
|
||||
const OptionalURIParams& aDocURI,
|
||||
const OptionalURIParams& aOriginalReferrerURI,
|
||||
const uint32_t& aReferrerPolicy, const OptionalURIParams& aAPIRedirectToURI,
|
||||
const OptionalURIParams& aTopWindowURI, nsIPrincipal* aTopWindowPrincipal,
|
||||
const URIParams& aURI, const Maybe<URIParams>& aOriginalURI,
|
||||
const Maybe<URIParams>& aDocURI,
|
||||
const Maybe<URIParams>& aOriginalReferrerURI,
|
||||
const uint32_t& aReferrerPolicy, const Maybe<URIParams>& aAPIRedirectToURI,
|
||||
const Maybe<URIParams>& aTopWindowURI, nsIPrincipal* aTopWindowPrincipal,
|
||||
const uint32_t& aLoadFlags, const RequestHeaderTuples& requestHeaders,
|
||||
const nsCString& requestMethod, const Maybe<IPCStream>& uploadStream,
|
||||
const bool& uploadStreamHasHeaders, const int16_t& priority,
|
||||
|
|
@ -827,8 +827,8 @@ mozilla::ipc::IPCResult HttpChannelParent::RecvRedirect2Verify(
|
|||
const nsresult& aResult, const RequestHeaderTuples& changedHeaders,
|
||||
const ChildLoadInfoForwarderArgs& aLoadInfoForwarder,
|
||||
const uint32_t& loadFlags, const uint32_t& referrerPolicy,
|
||||
const OptionalURIParams& aReferrerURI,
|
||||
const OptionalURIParams& aAPIRedirectURI,
|
||||
const Maybe<URIParams>& aReferrerURI,
|
||||
const Maybe<URIParams>& aAPIRedirectURI,
|
||||
const OptionalCorsPreflightArgs& aCorsPreflightArgs,
|
||||
const bool& aChooseAppcache) {
|
||||
LOG(("HttpChannelParent::RecvRedirect2Verify [this=%p result=%" PRIx32 "]\n",
|
||||
|
|
|
|||
|
|
@ -138,12 +138,12 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
|
|||
const bool& shouldIntercept);
|
||||
|
||||
MOZ_MUST_USE bool DoAsyncOpen(
|
||||
const URIParams& uri, const OptionalURIParams& originalUri,
|
||||
const OptionalURIParams& docUri,
|
||||
const OptionalURIParams& originalReferrerUri,
|
||||
const URIParams& uri, const Maybe<URIParams>& originalUri,
|
||||
const Maybe<URIParams>& docUri,
|
||||
const Maybe<URIParams>& originalReferrerUri,
|
||||
const uint32_t& referrerPolicy,
|
||||
const OptionalURIParams& internalRedirectUri,
|
||||
const OptionalURIParams& topWindowUri, nsIPrincipal* aTopWindowPrincipal,
|
||||
const Maybe<URIParams>& internalRedirectUri,
|
||||
const Maybe<URIParams>& topWindowUri, nsIPrincipal* aTopWindowPrincipal,
|
||||
const uint32_t& loadFlags, const RequestHeaderTuples& requestHeaders,
|
||||
const nsCString& requestMethod, const Maybe<IPCStream>& uploadStream,
|
||||
const bool& uploadStreamHasHeaders, const int16_t& priority,
|
||||
|
|
@ -189,8 +189,8 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
|
|||
const nsresult& result, const RequestHeaderTuples& changedHeaders,
|
||||
const ChildLoadInfoForwarderArgs& aLoadInfoForwarder,
|
||||
const uint32_t& loadFlags, const uint32_t& referrerPolicy,
|
||||
const OptionalURIParams& aReferrerURI,
|
||||
const OptionalURIParams& apiRedirectUri,
|
||||
const Maybe<URIParams>& aReferrerURI,
|
||||
const Maybe<URIParams>& apiRedirectUri,
|
||||
const OptionalCorsPreflightArgs& aCorsPreflightArgs,
|
||||
const bool& aChooseAppcache) override;
|
||||
virtual mozilla::ipc::IPCResult RecvDocumentChannelCleanup(
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ parent:
|
|||
async Redirect2Verify(nsresult result, RequestHeaderTuples changedHeaders,
|
||||
ChildLoadInfoForwarderArgs loadInfoForwarder,
|
||||
uint32_t loadFlags, uint32_t referrerPolicy,
|
||||
OptionalURIParams referrerUri,
|
||||
OptionalURIParams apiRedirectTo,
|
||||
URIParams? referrerUri, URIParams? apiRedirectTo,
|
||||
OptionalCorsPreflightArgs corsPreflightArgs,
|
||||
bool chooseAppcache);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ async protocol PWebSocket
|
|||
|
||||
parent:
|
||||
// Forwarded methods corresponding to methods on nsIWebSocketChannel
|
||||
async AsyncOpen(OptionalURIParams aURI,
|
||||
async AsyncOpen(URIParams? aURI,
|
||||
nsCString aOrigin,
|
||||
uint64_t aInnerWindowID,
|
||||
nsCString aProtocol,
|
||||
|
|
|
|||
|
|
@ -444,21 +444,18 @@ WebSocketChannelChild::AsyncOpen(nsIURI* aURI, const nsACString& aOrigin,
|
|||
// Corresponding release in DeallocPWebSocket
|
||||
AddIPDLReference();
|
||||
|
||||
OptionalURIParams uri;
|
||||
Maybe<URIParams> uri;
|
||||
Maybe<LoadInfoArgs> loadInfoArgs;
|
||||
OptionalTransportProvider transportProvider;
|
||||
|
||||
if (!mIsServerSide) {
|
||||
uri = URIParams();
|
||||
SerializeURI(aURI, uri.get_URIParams());
|
||||
uri.emplace(URIParams());
|
||||
SerializeURI(aURI, uri.ref());
|
||||
nsresult rv = LoadInfoToLoadInfoArgs(mLoadInfo, &loadInfoArgs);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
transportProvider = void_t();
|
||||
} else {
|
||||
uri = void_t();
|
||||
loadInfoArgs = Nothing();
|
||||
|
||||
MOZ_ASSERT(mServerTransportProvider);
|
||||
PTransportProviderChild* ipcChild;
|
||||
nsresult rv = mServerTransportProvider->GetIPCChild(&ipcChild);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ mozilla::ipc::IPCResult WebSocketChannelParent::RecvDeleteSelf() {
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult WebSocketChannelParent::RecvAsyncOpen(
|
||||
const OptionalURIParams& aURI, const nsCString& aOrigin,
|
||||
const Maybe<URIParams>& aURI, const nsCString& aOrigin,
|
||||
const uint64_t& aInnerWindowID, const nsCString& aProtocol,
|
||||
const bool& aSecure, const uint32_t& aPingInterval,
|
||||
const bool& aClientSetPingInterval, const uint32_t& aPingTimeout,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class WebSocketChannelParent : public PWebSocketParent,
|
|||
|
||||
private:
|
||||
mozilla::ipc::IPCResult RecvAsyncOpen(
|
||||
const OptionalURIParams& aURI, const nsCString& aOrigin,
|
||||
const Maybe<URIParams>& aURI, const nsCString& aOrigin,
|
||||
const uint64_t& aInnerWindowID, const nsCString& aProtocol,
|
||||
const bool& aSecure, const uint32_t& aPingInterval,
|
||||
const bool& aClientSetPingInterval, const uint32_t& aPingTimeout,
|
||||
|
|
|
|||
|
|
@ -2008,7 +2008,7 @@ History::VisitURI(nsIWidget* aWidget, nsIURI* aURI, nsIURI* aLastVisitedURI,
|
|||
URIParams uri;
|
||||
SerializeURI(aURI, uri);
|
||||
|
||||
OptionalURIParams lastVisitedURI;
|
||||
Maybe<URIParams> lastVisitedURI;
|
||||
SerializeURI(aLastVisitedURI, lastVisitedURI);
|
||||
|
||||
NS_ENSURE_ARG(aWidget);
|
||||
|
|
|
|||
|
|
@ -33,9 +33,8 @@ NS_IMPL_ISUPPORTS_INHERITED(ExternalHelperAppParent, nsHashPropertyBag,
|
|||
nsIStreamListener, nsIExternalHelperAppParent)
|
||||
|
||||
ExternalHelperAppParent::ExternalHelperAppParent(
|
||||
const OptionalURIParams& uri,
|
||||
const int64_t& aContentLength, const bool& aWasFileChannel,
|
||||
const nsCString& aContentDispositionHeader,
|
||||
const Maybe<URIParams>& uri, const int64_t& aContentLength,
|
||||
const bool& aWasFileChannel, const nsCString& aContentDispositionHeader,
|
||||
const uint32_t& aContentDispositionHint,
|
||||
const nsString& aContentDispositionFilename)
|
||||
: mURI(DeserializeURI(uri)),
|
||||
|
|
@ -88,7 +87,7 @@ void UpdateContentContext(nsIStreamListener* aListener,
|
|||
void ExternalHelperAppParent::Init(
|
||||
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
||||
const nsCString& aMimeContentType, const bool& aForceSave,
|
||||
const OptionalURIParams& aReferrer, PBrowserParent* aBrowser) {
|
||||
const Maybe<URIParams>& aReferrer, PBrowserParent* aBrowser) {
|
||||
mozilla::ipc::LoadInfoArgsToLoadInfo(aLoadInfoArgs,
|
||||
getter_AddRefs(mLoadInfo));
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class URI;
|
|||
namespace mozilla {
|
||||
|
||||
namespace ipc {
|
||||
class OptionalURIParams;
|
||||
class URIParams;
|
||||
} // namespace ipc
|
||||
|
||||
namespace net {
|
||||
|
|
@ -61,7 +61,6 @@ class ExternalHelperAppParent
|
|||
public nsIStreamListener,
|
||||
public net::PrivateBrowsingChannel<ExternalHelperAppParent>,
|
||||
public nsIExternalHelperAppParent {
|
||||
typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
@ -84,15 +83,16 @@ class ExternalHelperAppParent
|
|||
|
||||
bool WasFileChannel() override { return mWasFileChannel; }
|
||||
|
||||
ExternalHelperAppParent(
|
||||
const OptionalURIParams& uri,
|
||||
const int64_t& contentLength, const bool& wasFileChannel,
|
||||
const nsCString& aContentDispositionHeader,
|
||||
const uint32_t& aContentDispositionHint,
|
||||
const nsString& aContentDispositionFilename);
|
||||
ExternalHelperAppParent(const Maybe<mozilla::ipc::URIParams>& uri,
|
||||
const int64_t& contentLength,
|
||||
const bool& wasFileChannel,
|
||||
const nsCString& aContentDispositionHeader,
|
||||
const uint32_t& aContentDispositionHint,
|
||||
const nsString& aContentDispositionFilename);
|
||||
void Init(const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
||||
const nsCString& aMimeContentType, const bool& aForceSave,
|
||||
const OptionalURIParams& aReferrer, PBrowserParent* aBrowser);
|
||||
const Maybe<mozilla::ipc::URIParams>& aReferrer,
|
||||
PBrowserParent* aBrowser);
|
||||
|
||||
protected:
|
||||
virtual ~ExternalHelperAppParent();
|
||||
|
|
|
|||
|
|
@ -634,7 +634,7 @@ nsresult nsExternalHelperAppService::DoContentContentProcessHelper(
|
|||
nsCOMPtr<nsIURI> referrer;
|
||||
NS_GetReferrerFromChannel(channel, getter_AddRefs(referrer));
|
||||
|
||||
OptionalURIParams uriParams, referrerParams;
|
||||
Maybe<URIParams> uriParams, referrerParams;
|
||||
SerializeURI(uri, uriParams);
|
||||
SerializeURI(referrer, referrerParams);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue