Skip to content

Commit

Permalink
Bug 1087442 - Attach LoadInfo inside each individual ProtocolHandler …
Browse files Browse the repository at this point in the history
…- uriloader/ changes (r=smaug,sicking)
  • Loading branch information
Christoph Kerschbaumer committed Dec 12, 2014
1 parent b27cc28 commit e82614d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions uriloader/exthandler/nsExternalProtocolHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class nsExtProtocolChannel : public nsIChannel

nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
nsCOMPtr<nsILoadGroup> mLoadGroup;
nsCOMPtr<nsILoadInfo> mLoadInfo;
};

NS_IMPL_ADDREF(nsExtProtocolChannel)
Expand Down Expand Up @@ -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;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e82614d

Please sign in to comment.