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

This commit is contained in:
Seth Fowler 2015-08-18 10:19:28 -07:00
parent 39bdedbc03
commit aa26047103

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;
}