Bug 873455 - Add assertions for imgFrame::Init failure. r=joe

This commit is contained in:
Seth Fowler 2013-05-21 17:36:09 +08:00
parent ab5dc6d749
commit 3d47306317

View File

@ -1257,6 +1257,8 @@ RasterImage::InternalAddFrame(uint32_t framenum,
nsAutoPtr<imgFrame> frame(new imgFrame());
nsresult rv = frame->Init(aX, aY, aWidth, aHeight, aFormat, aPaletteDepth);
MOZ_ASSERT(mSize.width > 0 && mSize.height > 0, "Shouldn't call InternalAddFrame with zero size");
MOZ_ASSERT(NS_SUCCEEDED(rv), "imgFrame::Init should succeed");
NS_ENSURE_SUCCESS(rv, rv);
// We know we are in a decoder. Therefore, we must unlock the previous frame