Bug #193317 --> 100% CPU viewing news w/ a background image. Fix this by not implementing SetOriginalURI. This was

confusing image lib which reloads the image if the current url on the channel does not match the original URI on the channel. 

IMAP does not implement this method either.

r/sr=bienvenu
This commit is contained in:
scott%scott-macgregor.org 2003-09-17 18:01:50 +00:00
parent bf70be26b1
commit 6c6106530b
2 changed files with 20 additions and 2 deletions

View File

@ -756,7 +756,22 @@ nsNntpCacheStreamListener::OnDataAvailable(nsIRequest *request, nsISupports * aC
nsCOMPtr <nsIRequest> ourRequest = do_QueryInterface(mChannelToUse);
return mListener->OnDataAvailable(ourRequest, aCtxt, aInStream, aSourceOffset, aCount);
}
NS_IMETHODIMP nsNNTPProtocol::GetOriginalURI(nsIURI* *aURI)
{
// News does not seem to have the notion of an original URI (See Bug #193317)
// *aURI = m_originalUrl ? m_originalUrl : m_url;
*aURI = m_url;
NS_IF_ADDREF(*aURI);
return NS_OK;
}
NS_IMETHODIMP nsNNTPProtocol::SetOriginalURI(nsIURI* aURI)
{
// News does not seem to have the notion of an original URI (See Bug #193317)
return NS_OK; // ignore
}
nsresult nsNNTPProtocol::SetupPartExtractorListener(nsIStreamListener * aConsumer)
{
PRBool convertData;

View File

@ -183,7 +183,10 @@ public:
NS_IMETHOD Cancel(nsresult status); // handle stop button
NS_IMETHOD GetContentType(nsACString &aContentType);
NS_IMETHOD AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt);
NS_IMETHOD AsyncOpen(nsIStreamListener *listener, nsISupports *ctxt);
NS_IMETHOD GetOriginalURI(nsIURI* *aURI);
NS_IMETHOD SetOriginalURI(nsIURI* aURI);
nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer);
private: