fixing bug 78109 r=jband sr=brendan

This commit is contained in:
pavlov%netscape.com 2001-05-01 02:53:27 +00:00
Родитель ece59e8e09
Коммит d12799a8f2
2 изменённых файлов: 10 добавлений и 6 удалений

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

@ -429,6 +429,9 @@ NS_IMETHODIMP imgRequest::OnStartContainer(imgIRequest *request, nsISupports *cx
{
LOG_SCOPE(gImgLog, "imgRequest::OnStartContainer");
NS_ASSERTION(image, "imgRequest::OnStartContainer called with a null image!");
if (!image) return NS_ERROR_UNEXPECTED;
mState |= onStartContainer;
mStatus |= imgIRequest::STATUS_SIZE_AVAILABLE;
@ -629,7 +632,8 @@ NS_IMETHODIMP imgRequest::OnStopRequest(nsIRequest *aRequest, nsISupports *ctxt,
mChannel = nsnull; // we no longer need the channel
}
if (NS_FAILED(status)) {
// If mImage is still null, we didn't properly load the image.
if (NS_FAILED(status) || !mImage) {
this->Cancel(status); // sets status, stops animations, removes from cache
} else {
mStatus |= imgIRequest::STATUS_LOAD_COMPLETE;

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

@ -56,11 +56,11 @@ class imgRequestProxy;
}
enum {
onStartDecode = 0x01,
onStartContainer = 0x02,
onStopContainer = 0x04,
onStopDecode = 0x08,
onStopRequest = 0x16
onStartDecode = PR_BIT(0),
onStartContainer = PR_BIT(1),
onStopContainer = PR_BIT(2),
onStopDecode = PR_BIT(3),
onStopRequest = PR_BIT(4)
};
class imgRequest : public imgIRequest,