Bug 455353 - Backout of code added to imagelib in Bug 355555. r=dougt

This commit is contained in:
Jim Mathies 2009-01-30 13:13:52 -06:00
Родитель cee1336381
Коммит 0b95d763be
3 изменённых файлов: 3 добавлений и 28 удалений

Просмотреть файл

@ -83,8 +83,8 @@ NS_IMPL_ISUPPORTS8(imgRequest, imgILoad,
imgRequest::imgRequest() :
mLoading(PR_FALSE), mProcessing(PR_FALSE), mHadLastPart(PR_FALSE),
mNetworkStatus(0), mImageStatus(imgIRequest::STATUS_NONE), mState(0),
mCacheId(0), mValidator(nsnull), mIsMultiPartChannel(PR_FALSE),
mImageStatus(imgIRequest::STATUS_NONE), mState(0), mCacheId(0),
mValidator(nsnull), mIsMultiPartChannel(PR_FALSE),
mImageSniffers("image-sniffing-services")
{
/* member initializers and constructor code */
@ -781,7 +781,6 @@ NS_IMETHODIMP imgRequest::OnStopRequest(nsIRequest *aRequest, nsISupports *ctxt,
// save the last status that we saw so that the
// imgRequestProxy will have access to it.
if (mRequest) {
mRequest->GetStatus(&mNetworkStatus);
mRequest = nsnull; // we no longer need the request
}
@ -992,18 +991,6 @@ imgRequest::SniffMimeType(const char *buf, PRUint32 len)
}
}
nsresult
imgRequest::GetNetworkStatus()
{
nsresult status;
if (mRequest)
mRequest->GetStatus(&status);
else
status = mNetworkStatus;
return status;
}
/** nsIInterfaceRequestor methods **/
NS_IMETHODIMP

Просмотреть файл

@ -110,10 +110,6 @@ public:
// being made...
PRBool IsReusable(void *aCacheId) { return !mLoading || (aCacheId == mCacheId); }
// get the current or last network status from our
// internal nsIChannel.
nsresult GetNetworkStatus();
// Cancel, but also ensure that all work done in Init() is undone. Call this
// only when the channel has failed to open, and so calling Cancel() on it
// won't be sufficient.
@ -184,7 +180,6 @@ private:
PRPackedBool mLoading;
PRPackedBool mProcessing;
PRPackedBool mHadLastPart;
PRUint32 mNetworkStatus;
PRUint32 mImageStatus;
PRUint32 mState;
nsCString mContentType;

Просмотреть файл

@ -196,14 +196,7 @@ NS_IMETHODIMP imgRequestProxy::IsPending(PRBool *_retval)
/* readonly attribute nsresult status; */
NS_IMETHODIMP imgRequestProxy::GetStatus(nsresult *aStatus)
{
// XXXbz this is wrong... Canceling with a status should make that
// status the status of the request, generally.
if (!mOwner)
return NS_ERROR_FAILURE;
*aStatus = mOwner->GetNetworkStatus();
return NS_OK;
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void cancel (in nsresult status); */