зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1304632 - Part 2: Remove unnecessary nsStyleImage::mImage null checking. r=bholley
nsStyleImage::mImage is always set to a non-null object when its mType is eStyleImageType_Image, so let's just assert that and stop null checking in that case. MozReview-Commit-ID: 2ect4coV0LV --HG-- extra : rebase_source : 768b0c5989bc3e32d4d8ab803d85885f223bcb43
This commit is contained in:
Родитель
d29aafd0ca
Коммит
6bcc95b10d
|
@ -2195,7 +2195,7 @@ nsStyleImage::ComputeActualCropRect(nsIntRect& aActualCropRect,
|
|||
nsresult
|
||||
nsStyleImage::StartDecoding() const
|
||||
{
|
||||
if ((mType == eStyleImageType_Image) && mImage) {
|
||||
if (mType == eStyleImageType_Image) {
|
||||
return mImage->StartDecoding();
|
||||
}
|
||||
return NS_OK;
|
||||
|
|
|
@ -365,6 +365,7 @@ struct nsStyleImage
|
|||
}
|
||||
imgRequestProxy* GetImageData() const {
|
||||
MOZ_ASSERT(mType == eStyleImageType_Image, "Data is not an image!");
|
||||
MOZ_ASSERT(mImage);
|
||||
MOZ_ASSERT(mImageTracked,
|
||||
"Should be tracking any image we're going to use!");
|
||||
return mImage;
|
||||
|
|
Загрузка…
Ссылка в новой задаче