Skip to content
Snippets Groups Projects
Verified Commit 75b2d612 authored by Rob Wu's avatar Rob Wu Committed by Pier Angelo Vendrame
Browse files

Bug 1802385 - Use NS_GetFinalChannelURI in FetchDriver r=rpl,valentin

Depends on D164656

Differential Revision: https://phabricator.services.mozilla.com/D166108
parent aeff7f51
Branches
Tags
1 merge request!636Bug 41757: Rebased Tor Browser alpha to 102.11.0esr
......@@ -1178,14 +1178,6 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest) {
response->InitChannelInfo(channel);
nsCOMPtr<nsIURI> channelURI;
rv = channel->GetURI(getter_AddRefs(channelURI));
if (NS_WARN_IF(NS_FAILED(rv))) {
FailWithNetworkError(rv);
// Cancel request.
return rv;
}
nsCOMPtr<nsILoadInfo> loadInfo = channel->LoadInfo();
// Propagate any tainting from the channel back to our response here. This
// step is not reflected in the spec because the spec is written such that
......@@ -1501,7 +1493,7 @@ FetchDriver::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
// Response.redirected to true if an internal redirect occurs. These
// should be transparent to script.
nsCOMPtr<nsIURI> uri;
MOZ_ALWAYS_SUCCEEDS(aNewChannel->GetURI(getter_AddRefs(uri)));
MOZ_ALWAYS_SUCCEEDS(NS_GetFinalChannelURI(aNewChannel, getter_AddRefs(uri)));
nsCOMPtr<nsIURI> uriClone;
nsresult rv = NS_GetURIWithoutRef(uri, getter_AddRefs(uriClone));
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment