diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 2cf96a91881b..d3ad5e3705a1 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -4284,12 +4284,16 @@ mozilla::ipc::IPCResult ContentChild::RecvScriptError( } mozilla::ipc::IPCResult ContentChild::RecvReportFrameTimingData( - const LoadInfoArgs& loadInfoArgs, const nsString& entryName, + const mozilla::Maybe& loadInfoArgs, const nsString& entryName, const nsString& initiatorType, UniquePtr&& 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 loadInfo; nsresult rv = mozilla::ipc::LoadInfoArgsToLoadInfo( loadInfoArgs, NOT_REMOTE_TYPE, getter_AddRefs(loadInfo)); diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index ced7af9fcaba..05b6da2e5bb6 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -729,8 +729,9 @@ class ContentChild final : public PContentChild, const uint64_t& aInnerWindowId, const bool& aFromChromeContext); mozilla::ipc::IPCResult RecvReportFrameTimingData( - const LoadInfoArgs& loadInfoArgs, const nsString& entryName, - const nsString& initiatorType, UniquePtr&& aData); + const mozilla::Maybe& loadInfoArgs, + const nsString& entryName, const nsString& initiatorType, + UniquePtr&& aData); mozilla::ipc::IPCResult RecvLoadURI( const MaybeDiscarded& aContext, diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 5c13a69150f8..8db930918e89 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -4709,7 +4709,7 @@ mozilla::ipc::IPCResult ContentParent::RecvAddSecurityState( already_AddRefed ContentParent::AllocPExternalHelperAppParent( - nsIURI* uri, const mozilla::net::LoadInfoArgs& aLoadInfoArgs, + nsIURI* uri, const Maybe& 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 LoadInfoArgs& loadInfoArgs, const nsACString& aMimeContentType, + const Maybe& loadInfoArgs, const nsACString& aMimeContentType, const nsACString& aContentDisposition, const uint32_t& aContentDispositionHint, const nsAString& aContentDispositionFilename, const bool& aForceSave, @@ -5073,14 +5073,19 @@ mozilla::ipc::IPCResult ContentParent::RecvConsoleMessage( } mozilla::ipc::IPCResult ContentParent::RecvReportFrameTimingData( - const LoadInfoArgs& loadInfoArgs, const nsAString& entryName, - const nsAString& initiatorType, UniquePtr&& aData) { + const mozilla::Maybe& loadInfoArgs, + const nsAString& entryName, const nsAString& initiatorType, + UniquePtr&& 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 parent = - WindowGlobalParent::GetByInnerWindowId(loadInfoArgs.innerWindowID()); + WindowGlobalParent::GetByInnerWindowId(loadInfoArgs->innerWindowID()); if (!parent || !parent->GetContentParent()) { return IPC_OK(); } diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index fed29bbb3c56..3322199eaa8a 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -938,7 +938,7 @@ class ContentParent final : public PContentParent, bool DeallocPScriptCacheParent(PScriptCacheParent* shell); already_AddRefed AllocPExternalHelperAppParent( - nsIURI* aUri, const mozilla::net::LoadInfoArgs& aLoadInfoArgs, + nsIURI* aUri, const Maybe& 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 LoadInfoArgs& loadInfoArgs, const nsACString& aMimeContentType, - const nsACString& aContentDisposition, + const Maybe& 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,8 +1073,9 @@ class ContentParent final : public PContentParent, const uint64_t& aInnerWindowId, const bool& aIsFromChromeContext); mozilla::ipc::IPCResult RecvReportFrameTimingData( - const LoadInfoArgs& loadInfoArgs, const nsAString& entryName, - const nsAString& initiatorType, UniquePtr&& aData); + const mozilla::Maybe& loadInfoArgs, + const nsAString& entryName, const nsAString& initiatorType, + UniquePtr&& aData); mozilla::ipc::IPCResult RecvScriptErrorWithStack( const nsAString& aMessage, const nsAString& aSourceName, diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 9d471514e4ba..cbdd2372b685 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -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 aData); diff --git a/dom/media/webrtc/jsapi/PeerConnectionImpl.cpp b/dom/media/webrtc/jsapi/PeerConnectionImpl.cpp index 6a993b68f2d9..29cab757fc3f 100644 --- a/dom/media/webrtc/jsapi/PeerConnectionImpl.cpp +++ b/dom/media/webrtc/jsapi/PeerConnectionImpl.cpp @@ -4623,11 +4623,11 @@ std::unique_ptr PeerConnectionImpl::GetProxyConfig() new net::LoadInfo(doc->NodePrincipal(), doc->NodePrincipal(), doc, 0, nsIContentPolicy::TYPE_INVALID); - net::LoadInfoArgs loadInfoArgs; + Maybe loadInfoArgs; MOZ_ALWAYS_SUCCEEDS( mozilla::ipc::LoadInfoToLoadInfoArgs(loadInfo, &loadInfoArgs)); return std::unique_ptr(new NrSocketProxyConfig( - net::WebrtcProxyConfig(id, alpn, loadInfoArgs, mForceProxy))); + net::WebrtcProxyConfig(id, alpn, *loadInfoArgs, mForceProxy))); } std::map diff --git a/dom/media/webrtc/transport/ipc/WebrtcTCPSocket.cpp b/dom/media/webrtc/transport/ipc/WebrtcTCPSocket.cpp index 27d00c8525ee..447b4cc7417c 100644 --- a/dom/media/webrtc/transport/ipc/WebrtcTCPSocket.cpp +++ b/dom/media/webrtc/transport/ipc/WebrtcTCPSocket.cpp @@ -399,6 +399,7 @@ nsresult WebrtcTCPSocket::OpenWithHttpProxy() { } nsCOMPtr loadInfo; + Maybe 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 @@ -406,8 +407,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(mProxyConfig->loadInfoArgs(), - NOT_REMOTE_TYPE, getter_AddRefs(loadInfo)); + rv = ipc::LoadInfoArgsToLoadInfo(loadInfoArgs, NOT_REMOTE_TYPE, + getter_AddRefs(loadInfo)); if (NS_FAILED(rv)) { LOG(("WebrtcTCPSocket %p: could not init load info\n", this)); return rv; diff --git a/ipc/glue/BackgroundUtils.cpp b/ipc/glue/BackgroundUtils.cpp index 4aa378c13f8f..198729bcc9a9 100644 --- a/ipc/glue/BackgroundUtils.cpp +++ b/ipc/glue/BackgroundUtils.cpp @@ -399,7 +399,7 @@ nsresult RHEntryToRHEntryInfo(nsIRedirectHistoryEntry* aRHEntry, } nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo, - LoadInfoArgs* outLoadInfoArgs) { + Maybe* aOptionalLoadInfoArgs) { nsresult rv = NS_OK; Maybe loadingPrincipalInfo; if (nsIPrincipal* loadingPrin = aLoadInfo->GetLoadingPrincipal()) { @@ -541,7 +541,7 @@ nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo, redirectChain, interceptionInfo->FromThirdParty())); } - *aLoadInfoArgs = LoadInfoArgs( + *aOptionalLoadInfoArgs = Some(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 LoadInfoArgs& aLoadInfoArgs, - const nsACString& aOriginRemoteType, - nsILoadInfo** outLoadInfo) { - return LoadInfoArgsToLoadInfo(aLoadInfoArgs, aOriginRemoteType, nullptr, - outLoadInfo); +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, nsILoadInfo** outLoadInfo) { + return LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, aOriginRemoteType, + nullptr, outLoadInfo); } -nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& aLoadInfoArgs, - const nsACString& aOriginRemoteType, - nsINode* aCspToInheritLoadingContext, - nsILoadInfo** outLoadInfo) { +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext, + nsILoadInfo** outLoadInfo) { RefPtr loadInfo; - nsresult rv = LoadInfoArgsToLoadInfo(aLoadInfoArgs, aOriginRemoteType, + nsresult rv = LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, aOriginRemoteType, aCspToInheritLoadingContext, getter_AddRefs(loadInfo)); NS_ENSURE_SUCCESS(rv, rv); @@ -609,16 +609,23 @@ nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& aLoadInfoArgs, return NS_OK; } -nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& aLoadInfoArgs, - const nsACString& aOriginRemoteType, - LoadInfo** outLoadInfo) { - return LoadInfoArgsToLoadInfo(aLoadInfoArgs, aOriginRemoteType, nullptr, - outLoadInfo); +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, LoadInfo** outLoadInfo) { + return LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, aOriginRemoteType, + nullptr, outLoadInfo); } -nsresult LoadInfoArgsToLoadInfo(const LoadInfoArgs& loadInfoArgs, - const nsACString& aOriginRemoteType, - nsINode* aCspToInheritLoadingContext, - LoadInfo** outLoadInfo) { +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext, + LoadInfo** outLoadInfo) { + if (aOptionalLoadInfoArgs.isNothing()) { + *outLoadInfo = nullptr; + return NS_OK; + } + + const LoadInfoArgs& loadInfoArgs = aOptionalLoadInfoArgs.ref(); + nsCOMPtr loadingPrincipal; if (loadInfoArgs.requestingPrincipalInfo().isSome()) { auto loadingPrincipalOrErr = diff --git a/ipc/glue/BackgroundUtils.h b/ipc/glue/BackgroundUtils.h index 5d8f80e935cb..db1d48d2e003 100644 --- a/ipc/glue/BackgroundUtils.h +++ b/ipc/glue/BackgroundUtils.h @@ -135,26 +135,27 @@ nsresult RHEntryToRHEntryInfo( /** * Convert a LoadInfo to LoadInfoArgs struct. */ -nsresult LoadInfoToLoadInfoArgs(nsILoadInfo* aLoadInfo, - mozilla::net::LoadInfoArgs* outLoadInfoArgs); +nsresult LoadInfoToLoadInfoArgs( + nsILoadInfo* aLoadInfo, + Maybe* outOptionalLoadInfoArgs); /** * Convert LoadInfoArgs to a LoadInfo. */ -nsresult LoadInfoArgsToLoadInfo(const mozilla::net::LoadInfoArgs& aLoadInfoArgs, - const nsACString& aOriginRemoteType, - nsILoadInfo** outLoadInfo); -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); +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, nsILoadInfo** outLoadInfo); +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext, + nsILoadInfo** outLoadInfo); +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, mozilla::net::LoadInfo** outLoadInfo); +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aOptionalLoadInfoArgs, + const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext, + mozilla::net::LoadInfo** outLoadInfo); /** * Fills ParentLoadInfoForwarderArgs with properties we want to carry to child diff --git a/netwerk/base/LoadInfo.h b/netwerk/base/LoadInfo.h index c499f9954843..dace62e98dff 100644 --- a/netwerk/base/LoadInfo.h +++ b/netwerk/base/LoadInfo.h @@ -43,10 +43,10 @@ class LoadInfo; namespace ipc { // we have to forward declare that function so we can use it as a friend. -nsresult LoadInfoArgsToLoadInfo(const mozilla::net::LoadInfoArgs& aLoadInfoArgs, - const nsACString& aOriginRemoteType, - nsINode* aCspToInheritLoadingContext, - net::LoadInfo** outLoadInfo); +nsresult LoadInfoArgsToLoadInfo( + const Maybe& aLoadInfoArgs, + const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext, + net::LoadInfo** outLoadInfo); } // namespace ipc namespace net { @@ -252,7 +252,7 @@ class LoadInfo final : public nsILoadInfo { const RedirectHistoryArray& aArra); friend nsresult mozilla::ipc::LoadInfoArgsToLoadInfo( - const mozilla::net::LoadInfoArgs& aLoadInfoArgs, + const Maybe& aLoadInfoArgs, const nsACString& aOriginRemoteType, nsINode* aCspToInheritLoadingContext, net::LoadInfo** outLoadInfo); diff --git a/netwerk/ipc/DocumentLoadListener.cpp b/netwerk/ipc/DocumentLoadListener.cpp index e465c421bc28..d721aa16fa02 100644 --- a/netwerk/ipc/DocumentLoadListener.cpp +++ b/netwerk/ipc/DocumentLoadListener.cpp @@ -2135,6 +2135,13 @@ 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()) { diff --git a/netwerk/ipc/NeckoChannelParams.ipdlh b/netwerk/ipc/NeckoChannelParams.ipdlh index 4283ab361710..40ed9de5dabd 100644 --- a/netwerk/ipc/NeckoChannelParams.ipdlh +++ b/netwerk/ipc/NeckoChannelParams.ipdlh @@ -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; }; diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp index 102b46a37843..06d6781c575f 100644 --- a/netwerk/ipc/NeckoParent.cpp +++ b/netwerk/ipc/NeckoParent.cpp @@ -93,9 +93,14 @@ static PBOverrideStatus PBOverrideStatusFromLoadContext( } static already_AddRefed GetRequestingPrincipal( - const LoadInfoArgs& aLoadInfoArgs) { + const Maybe& aOptionalLoadInfoArgs) { + if (aOptionalLoadInfoArgs.isNothing()) { + return nullptr; + } + + const LoadInfoArgs& loadInfoArgs = aOptionalLoadInfoArgs.ref(); const Maybe& optionalPrincipalInfo = - aLoadInfoArgs.requestingPrincipalInfo(); + loadInfoArgs.requestingPrincipalInfo(); if (optionalPrincipalInfo.isNothing()) { return nullptr; @@ -789,7 +794,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvEnsureHSTSData( } mozilla::ipc::IPCResult NeckoParent::RecvGetPageThumbStream( - nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs, + nsIURI* aURI, const Maybe& aLoadInfoArgs, GetPageThumbStreamResolver&& aResolver) { // Only the privileged about content process is allowed to access // things over the moz-page-thumb protocol. Any other content process @@ -834,7 +839,7 @@ mozilla::ipc::IPCResult NeckoParent::RecvGetPageThumbStream( } mozilla::ipc::IPCResult NeckoParent::RecvGetPageIconStream( - nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs, + nsIURI* aURI, const Maybe& aLoadInfoArgs, GetPageIconStreamResolver&& aResolver) { #ifdef MOZ_PLACES const nsACString& remoteType = @@ -850,6 +855,10 @@ 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 loadInfo; nsresult rv = mozilla::ipc::LoadInfoArgsToLoadInfo(aLoadInfoArgs, remoteType, getter_AddRefs(loadInfo)); diff --git a/netwerk/ipc/NeckoParent.h b/netwerk/ipc/NeckoParent.h index 9c7ffa4636a0..4c8c056c8116 100644 --- a/netwerk/ipc/NeckoParent.h +++ b/netwerk/ipc/NeckoParent.h @@ -195,12 +195,12 @@ class NeckoParent : public PNeckoParent { /* Page thumbnails remote resource loading */ mozilla::ipc::IPCResult RecvGetPageThumbStream( - nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs, + nsIURI* aURI, const Maybe& aLoadInfoArgs, GetPageThumbStreamResolver&& aResolve); /* Page icon remote resource loading */ mozilla::ipc::IPCResult RecvGetPageIconStream( - nsIURI* aURI, const LoadInfoArgs& aLoadInfoArgs, + nsIURI* aURI, const Maybe& aLoadInfoArgs, GetPageIconStreamResolver&& aResolve); mozilla::ipc::IPCResult RecvInitSocketProcessBridge( diff --git a/netwerk/ipc/PNecko.ipdl b/netwerk/ipc/PNecko.ipdl index 9eb9b5ca27f2..698ae38e7e5f 100644 --- a/netwerk/ipc/PNecko.ipdl +++ b/netwerk/ipc/PNecko.ipdl @@ -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 */ diff --git a/netwerk/protocol/gio/GIOChannelParent.cpp b/netwerk/protocol/gio/GIOChannelParent.cpp index a19829a81d53..e6127dcd6954 100644 --- a/netwerk/protocol/gio/GIOChannelParent.cpp +++ b/netwerk/protocol/gio/GIOChannelParent.cpp @@ -76,7 +76,7 @@ bool GIOChannelParent::DoAsyncOpen(const URIParams& aURI, const uint64_t& aStartPos, const nsCString& aEntityID, const Maybe& aUploadStream, - const LoadInfoArgs& aLoadInfoArgs, + const Maybe& aLoadInfoArgs, const uint32_t& aLoadFlags) { nsresult rv; diff --git a/netwerk/protocol/gio/GIOChannelParent.h b/netwerk/protocol/gio/GIOChannelParent.h index 32d3bd05550b..21d41f068711 100644 --- a/netwerk/protocol/gio/GIOChannelParent.h +++ b/netwerk/protocol/gio/GIOChannelParent.h @@ -45,7 +45,7 @@ class GIOChannelParent final : public PGIOChannelParent, bool DoAsyncOpen(const URIParams& aURI, const uint64_t& aStartPos, const nsCString& aEntityID, const Maybe& aUploadStream, - const LoadInfoArgs& aLoadInfoArgs, + const Maybe& aLoadInfoArgs, const uint32_t& aLoadFlags); // used to connect redirected-to channel in parent with just created diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index a9190d557242..298e05e54e54 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -5639,7 +5639,7 @@ void HttpBaseChannel::MaybeReportTimingData() { return; } - LoadInfoArgs loadInfoArgs; + Maybe loadInfoArgs; mozilla::ipc::LoadInfoToLoadInfoArgs(mLoadInfo, &loadInfoArgs); child->SendReportFrameTimingData(loadInfoArgs, entryName, initiatorType, std::move(performanceTimingData)); diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp index 7619ea5a7bca..c3ae6fef3add 100644 --- a/netwerk/protocol/http/HttpChannelParent.cpp +++ b/netwerk/protocol/http/HttpChannelParent.cpp @@ -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 LoadInfoArgs& aLoadInfoArgs, const uint32_t& aCacheKey, + const Maybe& aLoadInfoArgs, const uint32_t& aCacheKey, const uint64_t& aRequestContextID, const Maybe& aCorsPreflightArgs, const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt, diff --git a/netwerk/protocol/http/HttpChannelParent.h b/netwerk/protocol/http/HttpChannelParent.h index 1bd50f96e988..3dac9371270a 100644 --- a/netwerk/protocol/http/HttpChannelParent.h +++ b/netwerk/protocol/http/HttpChannelParent.h @@ -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 LoadInfoArgs& aLoadInfoArgs, + const uint32_t& tlsFlags, const Maybe& aLoadInfoArgs, const uint32_t& aCacheKey, const uint64_t& aRequestContextID, const Maybe& aCorsPreflightArgs, const uint32_t& aInitialRwin, const bool& aBlockAuthPrompt, diff --git a/netwerk/protocol/res/RemoteStreamGetter.cpp b/netwerk/protocol/res/RemoteStreamGetter.cpp index 8bad84ef5e15..e5c218b3c0bb 100644 --- a/netwerk/protocol/res/RemoteStreamGetter.cpp +++ b/netwerk/protocol/res/RemoteStreamGetter.cpp @@ -36,7 +36,7 @@ RequestOrReason RemoteStreamGetter::GetAsync(nsIStreamListener* aListener, nsCOMPtr cancelableRequest(this); RefPtr self = this; - LoadInfoArgs loadInfoArgs; + Maybe loadInfoArgs; nsresult rv = ipc::LoadInfoToLoadInfoArgs(mLoadInfo, &loadInfoArgs); if (NS_FAILED(rv)) { return Err(rv); diff --git a/netwerk/protocol/res/RemoteStreamGetter.h b/netwerk/protocol/res/RemoteStreamGetter.h index de2bd6b601ff..5a4dae43a4d2 100644 --- a/netwerk/protocol/res/RemoteStreamGetter.h +++ b/netwerk/protocol/res/RemoteStreamGetter.h @@ -26,7 +26,7 @@ using RemoteStreamPromise = mozilla::MozPromise; using Method = RefPtr< MozPromise, ipc::ResponseRejectReason, true>> ( - PNeckoChild::*)(nsIURI*, const LoadInfoArgs&); + PNeckoChild::*)(nsIURI*, const Maybe&); /** * Helper class used with SimpleChannel to asynchronously obtain an input diff --git a/netwerk/protocol/websocket/PWebSocket.ipdl b/netwerk/protocol/websocket/PWebSocket.ipdl index bb263049f017..3d0af96bb16e 100644 --- a/netwerk/protocol/websocket/PWebSocket.ipdl +++ b/netwerk/protocol/websocket/PWebSocket.ipdl @@ -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); diff --git a/netwerk/protocol/websocket/WebSocketChannelChild.cpp b/netwerk/protocol/websocket/WebSocketChannelChild.cpp index 52341c799ca9..a0cd273b5e16 100644 --- a/netwerk/protocol/websocket/WebSocketChannelChild.cpp +++ b/netwerk/protocol/websocket/WebSocketChannelChild.cpp @@ -494,7 +494,7 @@ WebSocketChannelChild::AsyncOpenNative( AddIPDLReference(); nsCOMPtr uri; - LoadInfoArgs loadInfoArgs; + Maybe loadInfoArgs; Maybe> transportProvider; if (!mIsServerSide) { diff --git a/netwerk/protocol/websocket/WebSocketChannelParent.cpp b/netwerk/protocol/websocket/WebSocketChannelParent.cpp index b690f3ac279d..6fadd777f5ad 100644 --- a/netwerk/protocol/websocket/WebSocketChannelParent.cpp +++ b/netwerk/protocol/websocket/WebSocketChannelParent.cpp @@ -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 LoadInfoArgs& aLoadInfoArgs, + const Maybe& aLoadInfoArgs, const Maybe& aTransportProvider, const nsCString& aNegotiatedExtensions) { LOG(("WebSocketChannelParent::RecvAsyncOpen() %p\n", this)); diff --git a/netwerk/protocol/websocket/WebSocketChannelParent.h b/netwerk/protocol/websocket/WebSocketChannelParent.h index 534a737dcbf6..febd3182adaa 100644 --- a/netwerk/protocol/websocket/WebSocketChannelParent.h +++ b/netwerk/protocol/websocket/WebSocketChannelParent.h @@ -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 LoadInfoArgs& aLoadInfoArgs, + const Maybe& aLoadInfoArgs, const Maybe& aTransportProvider, const nsCString& aNegotiatedExtensions); mozilla::ipc::IPCResult RecvClose(const uint16_t& code, diff --git a/uriloader/exthandler/ExternalHelperAppParent.cpp b/uriloader/exthandler/ExternalHelperAppParent.cpp index 96c7444abac7..3ebfcb7f3763 100644 --- a/uriloader/exthandler/ExternalHelperAppParent.cpp +++ b/uriloader/exthandler/ExternalHelperAppParent.cpp @@ -60,7 +60,7 @@ ExternalHelperAppParent::ExternalHelperAppParent( } bool ExternalHelperAppParent::Init( - const mozilla::net::LoadInfoArgs& aLoadInfoArgs, + const Maybe& aLoadInfoArgs, const nsACString& aMimeContentType, const bool& aForceSave, nsIURI* aReferrer, BrowsingContext* aContext, const bool& aShouldCloseWindow) { diff --git a/uriloader/exthandler/ExternalHelperAppParent.h b/uriloader/exthandler/ExternalHelperAppParent.h index 540889e648e6..fdd8a665abb8 100644 --- a/uriloader/exthandler/ExternalHelperAppParent.h +++ b/uriloader/exthandler/ExternalHelperAppParent.h @@ -85,7 +85,7 @@ class ExternalHelperAppParent const nsACString& aContentDispositionHeader, const uint32_t& aContentDispositionHint, const nsAString& aContentDispositionFilename); - bool Init(const mozilla::net::LoadInfoArgs& aLoadInfoArgs, + bool Init(const Maybe& aLoadInfoArgs, const nsACString& aMimeContentType, const bool& aForceSave, nsIURI* aReferrer, BrowsingContext* aContext, const bool& aShouldCloseWindow); diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index 1a4782616250..ee210396f0e7 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -676,7 +676,7 @@ nsresult nsExternalHelperAppService::DoContentContentProcessHelper( nsCOMPtr referrer; NS_GetReferrerFromChannel(channel, getter_AddRefs(referrer)); - mozilla::net::LoadInfoArgs loadInfoArgs; + Maybe loadInfoArgs; MOZ_ALWAYS_SUCCEEDS(LoadInfoToLoadInfoArgs(loadInfo, &loadInfoArgs)); nsCOMPtr props(do_QueryInterface(aRequest));