зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1130607 - Cancel our imgRequest if we get an unexpected duplicate imgRequest event. r=tn
This commit is contained in:
Родитель
e439c7bb7b
Коммит
806bf8517e
|
@ -647,9 +647,12 @@ NS_IMETHODIMP imgRequest::OnStartRequest(nsIRequest *aRequest, nsISupports *ctxt
|
|||
MOZ_ASSERT(!mIsMultiPartChannel, "Something went wrong");
|
||||
}
|
||||
|
||||
// If we're not multipart, we shouldn't have an image yet
|
||||
MOZ_ASSERT(mIsMultiPartChannel || !mImage,
|
||||
"Already have an image for non-multipart request");
|
||||
// If we're not multipart, we shouldn't have an image yet.
|
||||
if (mImage && !mIsMultiPartChannel) {
|
||||
MOZ_ASSERT_UNREACHABLE("Already have an image for a non-multipart request");
|
||||
Cancel(NS_IMAGELIB_ERROR_FAILURE);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* If mRequest is null here, then we need to set it so that we'll be able to
|
||||
|
|
Загрузка…
Ссылка в новой задаче