Bug 1187401 (Part 3) - For consistency, call DoError if SetMetadata sees a negative size. r=tn

--HG--
extra : rebase_source : 6a3c51769874b4f2b8e3b9354ff6ce0071d7a6c5
This commit is contained in:
Seth Fowler 2015-08-18 10:19:28 -07:00
parent be0cccfa8a
commit 9684bbff0a

View File

@ -955,6 +955,8 @@ RasterImage::SetMetadata(const ImageMetadata& aMetadata,
if (aMetadata.HasSize()) {
IntSize size = aMetadata.GetSize();
if (size.width < 0 || size.height < 0) {
NS_WARNING("Image has negative intrinsic size");
DoError();
return;
}