Bug 1842754 - Make LoadInfoArgs non-optional over IPC r=necko-reviewers,jesup

This makes all occurences of LoadInfoArgs non-optional also when
converting between nsILoadInfo in BackgroundUtils.h.

Differential Revision: https://phabricator.services.mozilla.com/D185299
This commit is contained in:
Manuel Bucher 2023-08-08 10:25:04 +00:00
Родитель 46b5ba840a
Коммит 25a2f89619
29 изменённых файлов: 87 добавлений и 123 удалений

Просмотреть файл

@ -4284,16 +4284,12 @@ mozilla::ipc::IPCResult ContentChild::RecvScriptError(
}
mozilla::ipc::IPCResult ContentChild::RecvReportFrameTimingData(
const mozilla::Maybe<LoadInfoArgs>& loadInfoArgs, const nsString& entryName,
const LoadInfoArgs& loadInfoArgs, const nsString& entryName,
const nsString& initiatorType, UniquePtr<PerformanceTimingData>&& aData) {
if (!aData) {
return IPC_FAIL(this, "aData should not be null");
}
if (loadInfoArgs.isNothing()) {
return IPC_FAIL(this, "loadInfoArgs should not be null");
}
nsCOMPtr<nsILoadInfo> loadInfo;
nsresult rv = mozilla::ipc::LoadInfoArgsToLoadInfo(
loadInfoArgs, NOT_REMOTE_TYPE, getter_AddRefs(loadInfo));

Просмотреть файл

@ -729,9 +729,8 @@ class ContentChild final : public PContentChild,
const uint64_t& aInnerWindowId, const bool& aFromChromeContext);
mozilla::ipc::IPCResult RecvReportFrameTimingData(
const mozilla::Maybe<LoadInfoArgs>& loadInfoArgs,
const nsString& entryName, const nsString& initiatorType,
UniquePtr<PerformanceTimingData>&& aData);
const LoadInfoArgs& loadInfoArgs, const nsString& entryName,
const nsString& initiatorType, UniquePtr<PerformanceTimingData>&& aData);
mozilla::ipc::IPCResult RecvLoadURI(
const MaybeDiscarded<BrowsingContext>& aContext,

Просмотреть файл

@ -4709,7 +4709,7 @@ mozilla::ipc::IPCResult ContentParent::RecvAddSecurityState(
already_AddRefed<PExternalHelperAppParent>
ContentParent::AllocPExternalHelperAppParent(
nsIURI* uri, const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
nsIURI* uri, const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aMimeContentType, const nsACString& aContentDisposition,
const uint32_t& aContentDispositionHint,
const nsAString& aContentDispositionFilename, const bool& aForceSave,
@ -4724,7 +4724,7 @@ ContentParent::AllocPExternalHelperAppParent(
mozilla::ipc::IPCResult ContentParent::RecvPExternalHelperAppConstructor(
PExternalHelperAppParent* actor, nsIURI* uri,
const Maybe<LoadInfoArgs>& loadInfoArgs, const nsACString& aMimeContentType,
const LoadInfoArgs& loadInfoArgs, const nsACString& aMimeContentType,
const nsACString& aContentDisposition,
const uint32_t& aContentDispositionHint,
const nsAString& aContentDispositionFilename, const bool& aForceSave,
@ -5073,19 +5073,14 @@ mozilla::ipc::IPCResult ContentParent::RecvConsoleMessage(
}
mozilla::ipc::IPCResult ContentParent::RecvReportFrameTimingData(
const mozilla::Maybe<LoadInfoArgs>& loadInfoArgs,
const nsAString& entryName, const nsAString& initiatorType,
UniquePtr<PerformanceTimingData>&& aData) {
const LoadInfoArgs& loadInfoArgs, const nsAString& entryName,
const nsAString& initiatorType, UniquePtr<PerformanceTimingData>&& aData) {
if (!aData) {
return IPC_FAIL(this, "aData should not be null");
}
if (loadInfoArgs.isNothing()) {
return IPC_FAIL(this, "loadInfoArgs should not be null");
}
RefPtr<WindowGlobalParent> parent =
WindowGlobalParent::GetByInnerWindowId(loadInfoArgs->innerWindowID());
WindowGlobalParent::GetByInnerWindowId(loadInfoArgs.innerWindowID());
if (!parent || !parent->GetContentParent()) {
return IPC_OK();
}

Просмотреть файл

@ -938,7 +938,7 @@ class ContentParent final : public PContentParent,
bool DeallocPScriptCacheParent(PScriptCacheParent* shell);
already_AddRefed<PExternalHelperAppParent> AllocPExternalHelperAppParent(
nsIURI* aUri, const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
nsIURI* aUri, const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aMimeContentType, const nsACString& aContentDisposition,
const uint32_t& aContentDispositionHint,
const nsAString& aContentDispositionFilename, const bool& aForceSave,
@ -948,8 +948,8 @@ class ContentParent final : public PContentParent,
mozilla::ipc::IPCResult RecvPExternalHelperAppConstructor(
PExternalHelperAppParent* actor, nsIURI* uri,
const Maybe<LoadInfoArgs>& loadInfoArgs,
const nsACString& aMimeContentType, const nsACString& aContentDisposition,
const LoadInfoArgs& loadInfoArgs, const nsACString& aMimeContentType,
const nsACString& aContentDisposition,
const uint32_t& aContentDispositionHint,
const nsAString& aContentDispositionFilename, const bool& aForceSave,
const int64_t& aContentLength, const bool& aWasFileChannel,
@ -1073,9 +1073,8 @@ class ContentParent final : public PContentParent,
const uint64_t& aInnerWindowId, const bool& aIsFromChromeContext);
mozilla::ipc::IPCResult RecvReportFrameTimingData(
const mozilla::Maybe<LoadInfoArgs>& loadInfoArgs,
const nsAString& entryName, const nsAString& initiatorType,
UniquePtr<PerformanceTimingData>&& aData);
const LoadInfoArgs& loadInfoArgs, const nsAString& entryName,
const nsAString& initiatorType, UniquePtr<PerformanceTimingData>&& aData);
mozilla::ipc::IPCResult RecvScriptErrorWithStack(
const nsAString& aMessage, const nsAString& aSourceName,

Просмотреть файл

@ -1185,7 +1185,7 @@ parent:
// Pass true for aShouldCloseWindow to specify that aContext was opened specifically
// for this load, and should be closed once we've handled it.
async PExternalHelperApp(nullable nsIURI uri,
LoadInfoArgs? loadInfoArgs,
LoadInfoArgs loadInfoArgs,
nsCString aMimeContentType,
nsCString aContentDisposition,
uint32_t aContentDispositionHint,
@ -1851,7 +1851,7 @@ both:
* loadInfo is passed in order to enforce same-origin security checks
* aData must be non-null.
*/
async ReportFrameTimingData(LoadInfoArgs? loadInfo, nsString entryName,
async ReportFrameTimingData(LoadInfoArgs loadInfo, nsString entryName,
nsString initiatorType,
UniquePtr<PerformanceTimingData> aData);

Просмотреть файл

@ -4623,11 +4623,11 @@ std::unique_ptr<NrSocketProxyConfig> PeerConnectionImpl::GetProxyConfig()
new net::LoadInfo(doc->NodePrincipal(), doc->NodePrincipal(), doc, 0,
nsIContentPolicy::TYPE_INVALID);
Maybe<net::LoadInfoArgs> loadInfoArgs;
net::LoadInfoArgs loadInfoArgs;
MOZ_ALWAYS_SUCCEEDS(
mozilla::ipc::LoadInfoToLoadInfoArgs(loadInfo, &loadInfoArgs));
return std::unique_ptr<NrSocketProxyConfig>(new NrSocketProxyConfig(
net::WebrtcProxyConfig(id, alpn, *loadInfoArgs, mForceProxy)));
net::WebrtcProxyConfig(id, alpn, loadInfoArgs, mForceProxy)));
}
std::map<uint64_t, PeerConnectionAutoTimer>

Просмотреть файл

@ -399,7 +399,6 @@ nsresult WebrtcTCPSocket::OpenWithHttpProxy() {
}
nsCOMPtr<nsILoadInfo> loadInfo;
Maybe<net::LoadInfoArgs> loadInfoArgs = Some(mProxyConfig->loadInfoArgs());
// FIXME: We don't know the remote type of the process which provided these
// LoadInfoArgs. Pass in `NOT_REMOTE_TYPE` as the origin process to blindly
@ -407,8 +406,8 @@ nsresult WebrtcTCPSocket::OpenWithHttpProxy() {
// using it for security checks here.
// If this code ever starts checking the triggering remote type, this needs to
// be changed.
rv = ipc::LoadInfoArgsToLoadInfo(loadInfoArgs, NOT_REMOTE_TYPE,
getter_AddRefs(loadInfo));
rv = ipc::LoadInfoArgsToLoadInfo(mProxyConfig->loadInfoArgs(),
NOT_REMOTE_TYPE, getter_AddRefs(loadInfo));
if (NS_FAILED(rv)) {
LOG(("WebrtcTCPSocket %p: could not init load info\n", this));
return rv;

Просмотреть файл

@ -399,7 +399,7 @@ nsresult RHEntryToRHEntryInfo(nsIRedirectHistoryEntry* aRHEntry,
}
nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo,
Maybe<LoadInfoArgs>* aOptionalLoadInfoArgs) {
LoadInfoArgs* outLoadInfoArgs) {
nsresult rv = NS_OK;
Maybe<PrincipalInfo> loadingPrincipalInfo;
if (nsIPrincipal* loadingPrin = aLoadInfo->GetLoadingPrincipal()) {
@ -541,7 +541,7 @@ nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo,
redirectChain, interceptionInfo->FromThirdParty()));
}
*aOptionalLoadInfoArgs = Some(LoadInfoArgs(
*aLoadInfoArgs = LoadInfoArgs(
loadingPrincipalInfo, triggeringPrincipalInfo, principalToInheritInfo,
topLevelPrincipalInfo, optionalResultPrincipalURI, triggeringRemoteType,
aLoadInfo->GetSandboxedNullPrincipalID(), aLoadInfo->GetSecurityFlags(),
@ -584,23 +584,23 @@ nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo,
aLoadInfo->GetStoragePermission(), aLoadInfo->GetIsMetaRefresh(),
aLoadInfo->GetLoadingEmbedderPolicy(),
aLoadInfo->GetIsOriginTrialCoepCredentiallessEnabledForTopLevel(),
unstrippedURI, interceptionInfoArg));
unstrippedURI, interceptionInfoArg);
return NS_OK;
}
nsresult LoadInfoArgsToLoadInfo(
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, nsILoadInfo** outLoadInfo) {
return LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, aOriginRemoteType,
nullptr, outLoadInfo);
nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
nsILoadInfo** outLoadInfo) {
return LoadInfoArgsToLoadInfo(aLoadInfoArgs, aOriginRemoteType, nullptr,
outLoadInfo);
}
nsresult LoadInfoArgsToLoadInfo(
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext,
nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
nsINode* aCspToInheritLoadingContext,
nsILoadInfo** outLoadInfo) {
RefPtr<LoadInfo> loadInfo;
nsresult rv = LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, aOriginRemoteType,
nsresult rv = LoadInfoArgsToLoadInfo(aLoadInfoArgs, aOriginRemoteType,
aCspToInheritLoadingContext,
getter_AddRefs(loadInfo));
NS_ENSURE_SUCCESS(rv, rv);
@ -609,23 +609,16 @@ nsresult LoadInfoArgsToLoadInfo(
return NS_OK;
}
nsresult LoadInfoArgsToLoadInfo(
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, LoadInfo** outLoadInfo) {
return LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, aOriginRemoteType,
nullptr, outLoadInfo);
}
nsresult LoadInfoArgsToLoadInfo(
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext,
nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
LoadInfo** outLoadInfo) {
return LoadInfoArgsToLoadInfo(aLoadInfoArgs, aOriginRemoteType, nullptr,
outLoadInfo);
}
nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& loadInfoArgs,
const nsACString& aOriginRemoteType,
nsINode* aCspToInheritLoadingContext,
LoadInfo** outLoadInfo) {
if (aOptionalLoadInfoArgs.isNothing()) {
*outLoadInfo = nullptr;
return NS_OK;
}
const LoadInfoArgs& loadInfoArgs = aOptionalLoadInfoArgs.ref();
nsCOMPtr<nsIPrincipal> loadingPrincipal;
if (loadInfoArgs.requestingPrincipalInfo().isSome()) {
auto loadingPrincipalOrErr =

Просмотреть файл

@ -135,26 +135,25 @@ nsresult RHEntryToRHEntryInfo(
/**
* Convert a LoadInfo to LoadInfoArgs struct.
*/
nsresult LoadInfoToLoadInfoArgs(
nsILoadInfo* aLoadInfo,
Maybe<mozilla::net::LoadInfoArgs>* outOptionalLoadInfoArgs);
nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo,
mozilla::net::LoadInfoArgs* outLoadInfoArgs);
/**
* Convert LoadInfoArgs to a LoadInfo.
*/
nsresult LoadInfoArgsToLoadInfo(
const Maybe<mozilla::net::LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, nsILoadInfo** outLoadInfo);
nsresult LoadInfoArgsToLoadInfo(
const Maybe<mozilla::net::LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext,
nsresult LoadInfoArgsToLoadInfo(const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
nsILoadInfo** outLoadInfo);
nsresult LoadInfoArgsToLoadInfo(
const Maybe<net::LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, mozilla::net::LoadInfo** outLoadInfo);
nsresult LoadInfoArgsToLoadInfo(
const Maybe<net::LoadInfoArgs>& aOptionalLoadInfoArgs,
const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext,
nsresult LoadInfoArgsToLoadInfo(const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
nsINode* aCspToInheritLoadingContext,
nsILoadInfo** outLoadInfo);
nsresult LoadInfoArgsToLoadInfo(const net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
mozilla::net::LoadInfo** outLoadInfo);
nsresult LoadInfoArgsToLoadInfo(const net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
nsINode* aCspToInheritLoadingContext,
mozilla::net::LoadInfo** outLoadInfo);
/**

Просмотреть файл

@ -43,9 +43,9 @@ class LoadInfo;
namespace ipc {
// we have to forward declare that function so we can use it as a friend.
nsresult LoadInfoArgsToLoadInfo(
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext,
nsresult LoadInfoArgsToLoadInfo(const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType,
nsINode* aCspToInheritLoadingContext,
net::LoadInfo** outLoadInfo);
} // namespace ipc
@ -252,7 +252,7 @@ class LoadInfo final : public nsILoadInfo {
const RedirectHistoryArray& aArra);
friend nsresult mozilla::ipc::LoadInfoArgsToLoadInfo(
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext,
net::LoadInfo** outLoadInfo);

Просмотреть файл

@ -2135,13 +2135,6 @@ DocumentLoadListener::RedirectToRealChannel(
args.timing() = std::move(mTiming);
}
auto loadInfo = args.loadInfo();
if (loadInfo.isNothing()) {
return PDocumentChannelParent::RedirectToRealChannelPromise::
CreateAndReject(ipc::ResponseRejectReason::SendError, __func__);
}
cp->TransmitBlobDataIfBlobURL(args.uri());
if (CanonicalBrowsingContext* bc = GetDocumentBrowsingContext()) {

Просмотреть файл

@ -328,7 +328,7 @@ struct HttpChannelOpenArgs
nsCString contentTypeHint;
nsString integrityMetadata;
IPCStream? uploadStream;
LoadInfoArgs? loadInfo;
LoadInfoArgs loadInfo;
uint32_t loadFlags;
uint32_t thirdPartyFlags;
uint32_t tlsFlags;
@ -478,7 +478,7 @@ struct RedirectToRealChannelArgs {
nullable nsIURI uri;
uint32_t newLoadFlags;
ReplacementChannelConfigInit? init;
LoadInfoArgs? loadInfo;
LoadInfoArgs loadInfo;
uint64_t channelId;
nullable nsIURI originalURI;
uint32_t redirectMode;
@ -585,7 +585,7 @@ struct GIOChannelOpenArgs
uint64_t startPos;
nsCString entityID;
IPCStream? uploadStream;
LoadInfoArgs? loadInfo;
LoadInfoArgs loadInfo;
uint32_t loadFlags;
};

Просмотреть файл

@ -93,14 +93,9 @@ static PBOverrideStatus PBOverrideStatusFromLoadContext(
}
static already_AddRefed<nsIPrincipal> GetRequestingPrincipal(
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs) {
if (aOptionalLoadInfoArgs.isNothing()) {
return nullptr;
}
const LoadInfoArgs& loadInfoArgs = aOptionalLoadInfoArgs.ref();
const LoadInfoArgs& aLoadInfoArgs) {
const Maybe<PrincipalInfo>& optionalPrincipalInfo =
loadInfoArgs.requestingPrincipalInfo();
aLoadInfoArgs.requestingPrincipalInfo();
if (optionalPrincipalInfo.isNothing()) {
return nullptr;
@ -794,7 +789,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvEnsureHSTSData(
}
mozilla::ipc::IPCResult NeckoParent::RecvGetPageThumbStream(
nsIURI* aURI, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs,
GetPageThumbStreamResolver&& aResolver) {
// Only the privileged about content process is allowed to access
// things over the moz-page-thumb protocol. Any other content process
@ -839,7 +834,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvGetPageThumbStream(
}
mozilla::ipc::IPCResult NeckoParent::RecvGetPageIconStream(
nsIURI* aURI, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs,
GetPageIconStreamResolver&& aResolver) {
#ifdef MOZ_PLACES
const nsACString& remoteType =
@ -855,10 +850,6 @@ mozilla::ipc::IPCResult NeckoParent::RecvGetPageIconStream(
return IPC_FAIL(this, "Wrong process type");
}
if (aLoadInfoArgs.isNothing()) {
return IPC_FAIL(this, "Page-icon request must include loadInfo");
}
nsCOMPtr<nsILoadInfo> loadInfo;
nsresult rv = mozilla::ipc::LoadInfoArgsToLoadInfo(aLoadInfoArgs, remoteType,
getter_AddRefs(loadInfo));

Просмотреть файл

@ -195,12 +195,12 @@ class NeckoParent : public PNeckoParent {
/* Page thumbnails remote resource loading */
mozilla::ipc::IPCResult RecvGetPageThumbStream(
nsIURI* aURI, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs,
GetPageThumbStreamResolver&& aResolve);
/* Page icon remote resource loading */
mozilla::ipc::IPCResult RecvGetPageIconStream(
nsIURI* aURI, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs,
GetPageIconStreamResolver&& aResolve);
mozilla::ipc::IPCResult RecvInitSocketProcessBridge(

Просмотреть файл

@ -147,8 +147,8 @@ parent:
/**
* Page thumbnails remote resource loading
*/
async GetPageThumbStream(nullable nsIURI uri, LoadInfoArgs? loadInfo) returns (RemoteStreamInfo? info);
async GetPageIconStream(nullable nsIURI uri, LoadInfoArgs? loadInfo) returns (RemoteStreamInfo? info);
async GetPageThumbStream(nullable nsIURI uri, LoadInfoArgs loadInfo) returns (RemoteStreamInfo? info);
async GetPageIconStream(nullable nsIURI uri, LoadInfoArgs loadInfo) returns (RemoteStreamInfo? info);
child:
/* Predictor Methods */

Просмотреть файл

@ -76,7 +76,7 @@ bool GIOChannelParent::DoAsyncOpen(const URIParams& aURI,
const uint64_t& aStartPos,
const nsCString& aEntityID,
const Maybe<IPCStream>& aUploadStream,
const Maybe<LoadInfoArgs>& aLoadInfoArgs,
const LoadInfoArgs& aLoadInfoArgs,
const uint32_t& aLoadFlags) {
nsresult rv;

Просмотреть файл

@ -45,7 +45,7 @@ class GIOChannelParent final : public PGIOChannelParent,
bool DoAsyncOpen(const URIParams& aURI, const uint64_t& aStartPos,
const nsCString& aEntityID,
const Maybe<mozilla::ipc::IPCStream>& aUploadStream,
const Maybe<LoadInfoArgs>& aLoadInfoArgs,
const LoadInfoArgs& aLoadInfoArgs,
const uint32_t& aLoadFlags);
// used to connect redirected-to channel in parent with just created

Просмотреть файл

@ -5639,7 +5639,7 @@ void HttpBaseChannel::MaybeReportTimingData() {
return;
}
Maybe<LoadInfoArgs> loadInfoArgs;
LoadInfoArgs loadInfoArgs;
mozilla::ipc::LoadInfoToLoadInfoArgs(mLoadInfo, &loadInfoArgs);
child->SendReportFrameTimingData(loadInfoArgs, entryName, initiatorType,
std::move(performanceTimingData));

Просмотреть файл

@ -390,7 +390,7 @@ bool HttpChannelParent::DoAsyncOpen(
const uint64_t& startPos, const nsCString& entityID, const bool& allowSpdy,
const bool& allowHttp3, const bool& allowAltSvc, const bool& beConservative,
const bool& bypassProxy, const uint32_t& tlsFlags,
const Maybe<LoadInfoArgs>& aLoadInfoArgs, const uint32_t& aCacheKey,
const LoadInfoArgs& aLoadInfoArgs, const uint32_t& aCacheKey,
const uint64_t& aRequestContextID,
const Maybe<CorsPreflightArgs>& aCorsPreflightArgs,
const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt,

Просмотреть файл

@ -150,7 +150,7 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
const uint64_t& startPos, const nsCString& entityID,
const bool& allowSpdy, const bool& allowHttp3, const bool& allowAltSvc,
const bool& beConservative, const bool& bypassProxy,
const uint32_t& tlsFlags, const Maybe<LoadInfoArgs>& aLoadInfoArgs,
const uint32_t& tlsFlags, const LoadInfoArgs& aLoadInfoArgs,
const uint32_t& aCacheKey, const uint64_t& aRequestContextID,
const Maybe<CorsPreflightArgs>& aCorsPreflightArgs,
const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt,

Просмотреть файл

@ -36,7 +36,7 @@ RequestOrReason RemoteStreamGetter::GetAsync(nsIStreamListener* aListener,
nsCOMPtr<nsICancelable> cancelableRequest(this);
RefPtr<RemoteStreamGetter> self = this;
Maybe<LoadInfoArgs> loadInfoArgs;
LoadInfoArgs loadInfoArgs;
nsresult rv = ipc::LoadInfoToLoadInfoArgs(mLoadInfo, &loadInfoArgs);
if (NS_FAILED(rv)) {
return Err(rv);

Просмотреть файл

@ -26,7 +26,7 @@ using RemoteStreamPromise =
mozilla::MozPromise<RemoteStreamInfo, nsresult, false>;
using Method = RefPtr<
MozPromise<Maybe<RemoteStreamInfo>, ipc::ResponseRejectReason, true>> (
PNeckoChild::*)(nsIURI*, const Maybe<LoadInfoArgs>&);
PNeckoChild::*)(nsIURI*, const LoadInfoArgs&);
/**
* Helper class used with SimpleChannel to asynchronously obtain an input

Просмотреть файл

@ -38,7 +38,7 @@ parent:
bool aClientSetPingInterval,
uint32_t aPingTimeout,
bool aClientSetPingTimeout,
LoadInfoArgs? aLoadInfoArgs,
LoadInfoArgs aLoadInfoArgs,
PTransportProvider? aProvider,
nsCString aNegotiatedExtensions);
async Close(uint16_t code, nsCString reason);

Просмотреть файл

@ -494,7 +494,7 @@ WebSocketChannelChild::AsyncOpenNative(
AddIPDLReference();
nsCOMPtr<nsIURI> uri;
Maybe<LoadInfoArgs> loadInfoArgs;
LoadInfoArgs loadInfoArgs;
Maybe<NotNull<PTransportProviderChild*>> transportProvider;
if (!mIsServerSide) {

Просмотреть файл

@ -56,7 +56,7 @@ mozilla::ipc::IPCResult WebSocketChannelParent::RecvAsyncOpen(
const nsCString& aProtocol, const bool& aSecure,
const uint32_t& aPingInterval, const bool& aClientSetPingInterval,
const uint32_t& aPingTimeout, const bool& aClientSetPingTimeout,
const Maybe<LoadInfoArgs>& aLoadInfoArgs,
const LoadInfoArgs& aLoadInfoArgs,
const Maybe<PTransportProviderParent*>& aTransportProvider,
const nsCString& aNegotiatedExtensions) {
LOG(("WebSocketChannelParent::RecvAsyncOpen() %p\n", this));

Просмотреть файл

@ -44,7 +44,7 @@ class WebSocketChannelParent : public PWebSocketParent,
const nsCString& aProtocol, const bool& aSecure,
const uint32_t& aPingInterval, const bool& aClientSetPingInterval,
const uint32_t& aPingTimeout, const bool& aClientSetPingTimeout,
const Maybe<LoadInfoArgs>& aLoadInfoArgs,
const LoadInfoArgs& aLoadInfoArgs,
const Maybe<PTransportProviderParent*>& aTransportProvider,
const nsCString& aNegotiatedExtensions);
mozilla::ipc::IPCResult RecvClose(const uint16_t& code,

Просмотреть файл

@ -60,7 +60,7 @@ ExternalHelperAppParent::ExternalHelperAppParent(
}
bool ExternalHelperAppParent::Init(
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aMimeContentType, const bool& aForceSave,
nsIURI* aReferrer, BrowsingContext* aContext,
const bool& aShouldCloseWindow) {

Просмотреть файл

@ -85,7 +85,7 @@ class ExternalHelperAppParent
const nsACString& aContentDispositionHeader,
const uint32_t& aContentDispositionHint,
const nsAString& aContentDispositionFilename);
bool Init(const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
bool Init(const mozilla::net::LoadInfoArgs& aLoadInfoArgs,
const nsACString& aMimeContentType, const bool& aForceSave,
nsIURI* aReferrer, BrowsingContext* aContext,
const bool& aShouldCloseWindow);

Просмотреть файл

@ -676,7 +676,7 @@ nsresult nsExternalHelperAppService::DoContentContentProcessHelper(
nsCOMPtr<nsIURI> referrer;
NS_GetReferrerFromChannel(channel, getter_AddRefs(referrer));
Maybe<mozilla::net::LoadInfoArgs> loadInfoArgs;
mozilla::net::LoadInfoArgs loadInfoArgs;
MOZ_ALWAYS_SUCCEEDS(LoadInfoToLoadInfoArgs(loadInfo, &loadInfoArgs));
nsCOMPtr<nsIPropertyBag2> props(do_QueryInterface(aRequest));