зеркало из https://github.com/mozilla/pjs.git
Bug 455353 - Backout of code added to imagelib in Bug 355555. r=dougt
This commit is contained in:
Родитель
2caaccb8b6
Коммит
a698949e31
|
@ -83,8 +83,8 @@ NS_IMPL_ISUPPORTS8(imgRequest, imgILoad,
|
||||||
|
|
||||||
imgRequest::imgRequest() :
|
imgRequest::imgRequest() :
|
||||||
mLoading(PR_FALSE), mProcessing(PR_FALSE), mHadLastPart(PR_FALSE),
|
mLoading(PR_FALSE), mProcessing(PR_FALSE), mHadLastPart(PR_FALSE),
|
||||||
mNetworkStatus(0), mImageStatus(imgIRequest::STATUS_NONE), mState(0),
|
mImageStatus(imgIRequest::STATUS_NONE), mState(0), mCacheId(0),
|
||||||
mCacheId(0), mValidator(nsnull), mIsMultiPartChannel(PR_FALSE),
|
mValidator(nsnull), mIsMultiPartChannel(PR_FALSE),
|
||||||
mImageSniffers("image-sniffing-services")
|
mImageSniffers("image-sniffing-services")
|
||||||
{
|
{
|
||||||
/* member initializers and constructor code */
|
/* 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
|
// save the last status that we saw so that the
|
||||||
// imgRequestProxy will have access to it.
|
// imgRequestProxy will have access to it.
|
||||||
if (mRequest) {
|
if (mRequest) {
|
||||||
mRequest->GetStatus(&mNetworkStatus);
|
|
||||||
mRequest = nsnull; // we no longer need the request
|
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 **/
|
/** nsIInterfaceRequestor methods **/
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
@ -110,10 +110,6 @@ public:
|
||||||
// being made...
|
// being made...
|
||||||
PRBool IsReusable(void *aCacheId) { return !mLoading || (aCacheId == mCacheId); }
|
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
|
// 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
|
// only when the channel has failed to open, and so calling Cancel() on it
|
||||||
// won't be sufficient.
|
// won't be sufficient.
|
||||||
|
@ -184,7 +180,6 @@ private:
|
||||||
PRPackedBool mLoading;
|
PRPackedBool mLoading;
|
||||||
PRPackedBool mProcessing;
|
PRPackedBool mProcessing;
|
||||||
PRPackedBool mHadLastPart;
|
PRPackedBool mHadLastPart;
|
||||||
PRUint32 mNetworkStatus;
|
|
||||||
PRUint32 mImageStatus;
|
PRUint32 mImageStatus;
|
||||||
PRUint32 mState;
|
PRUint32 mState;
|
||||||
nsCString mContentType;
|
nsCString mContentType;
|
||||||
|
|
|
@ -196,14 +196,7 @@ NS_IMETHODIMP imgRequestProxy::IsPending(PRBool *_retval)
|
||||||
/* readonly attribute nsresult status; */
|
/* readonly attribute nsresult status; */
|
||||||
NS_IMETHODIMP imgRequestProxy::GetStatus(nsresult *aStatus)
|
NS_IMETHODIMP imgRequestProxy::GetStatus(nsresult *aStatus)
|
||||||
{
|
{
|
||||||
// XXXbz this is wrong... Canceling with a status should make that
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
// status the status of the request, generally.
|
|
||||||
if (!mOwner)
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
*aStatus = mOwner->GetNetworkStatus();
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* void cancel (in nsresult status); */
|
/* void cancel (in nsresult status); */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче