зеркало из https://github.com/mozilla/pjs.git
fixing bug 78109 r=jband sr=brendan
This commit is contained in:
Родитель
ece59e8e09
Коммит
d12799a8f2
|
@ -429,6 +429,9 @@ NS_IMETHODIMP imgRequest::OnStartContainer(imgIRequest *request, nsISupports *cx
|
||||||
{
|
{
|
||||||
LOG_SCOPE(gImgLog, "imgRequest::OnStartContainer");
|
LOG_SCOPE(gImgLog, "imgRequest::OnStartContainer");
|
||||||
|
|
||||||
|
NS_ASSERTION(image, "imgRequest::OnStartContainer called with a null image!");
|
||||||
|
if (!image) return NS_ERROR_UNEXPECTED;
|
||||||
|
|
||||||
mState |= onStartContainer;
|
mState |= onStartContainer;
|
||||||
|
|
||||||
mStatus |= imgIRequest::STATUS_SIZE_AVAILABLE;
|
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
|
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
|
this->Cancel(status); // sets status, stops animations, removes from cache
|
||||||
} else {
|
} else {
|
||||||
mStatus |= imgIRequest::STATUS_LOAD_COMPLETE;
|
mStatus |= imgIRequest::STATUS_LOAD_COMPLETE;
|
||||||
|
|
|
@ -56,11 +56,11 @@ class imgRequestProxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
onStartDecode = 0x01,
|
onStartDecode = PR_BIT(0),
|
||||||
onStartContainer = 0x02,
|
onStartContainer = PR_BIT(1),
|
||||||
onStopContainer = 0x04,
|
onStopContainer = PR_BIT(2),
|
||||||
onStopDecode = 0x08,
|
onStopDecode = PR_BIT(3),
|
||||||
onStopRequest = 0x16
|
onStopRequest = PR_BIT(4)
|
||||||
};
|
};
|
||||||
|
|
||||||
class imgRequest : public imgIRequest,
|
class imgRequest : public imgIRequest,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче