Bug 1087442 - Attach LoadInfo inside each individual ProtocolHandler - uriloader/ changes (r=smaug,sicking)

This commit is contained in:
Christoph Kerschbaumer 2014-12-11 20:47:11 -08:00
parent 03d8c2da80
commit ea269ab771

View File

@ -57,6 +57,7 @@ private:
nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsILoadInfo> mLoadInfo;
};
NS_IMPL_ADDREF(nsExtProtocolChannel)
@ -264,14 +265,16 @@ NS_IMETHODIMP nsExtProtocolChannel::SetOwner(nsISupports * aPrincipal)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsExtProtocolChannel::GetLoadInfo(nsILoadInfo * *aLoadInfo)
NS_IMETHODIMP nsExtProtocolChannel::GetLoadInfo(nsILoadInfo **aLoadInfo)
{
return NS_ERROR_NOT_IMPLEMENTED;
NS_IF_ADDREF(*aLoadInfo = mLoadInfo);
return NS_OK;
}
NS_IMETHODIMP nsExtProtocolChannel::SetLoadInfo(nsILoadInfo * aLoadInfo)
NS_IMETHODIMP nsExtProtocolChannel::SetLoadInfo(nsILoadInfo *aLoadInfo)
{
return NS_ERROR_NOT_IMPLEMENTED;
mLoadInfo = aLoadInfo;
return NS_OK;
}
////////////////////////////////////////////////////////////////////////////////
@ -413,6 +416,9 @@ nsExternalProtocolHandler::NewChannel2(nsIURI* aURI,
((nsExtProtocolChannel*) channel.get())->SetURI(aURI);
channel->SetOriginalURI(aURI);
// set the loadInfo on the new channel
((nsExtProtocolChannel*) channel.get())->SetLoadInfo(aLoadInfo);
if (_retval)
{
*_retval = channel;