Bug 823236 - Assert that the image is valid before inserting into the image pool. r=nical

This commit is contained in:
Benoit Girard 2013-02-01 19:02:42 -05:00
parent d399d635b2
commit 3ce730b206

View File

@ -250,6 +250,11 @@ bool ImageContainerChild::AddSharedImageToPool(SharedImage* img)
return false;
}
if (img->type() == SharedImage::TYCbCrImage) {
const YCbCrImage& yuv = img->get_YCbCrImage();
ShmemYCbCrImage shmImg(yuv.data(),yuv.offset());
if (!shmImg.IsValid()) {
NS_RUNTIMEABORT("Invalid Surf");
}
mSharedImagePool.AppendElement(img);
return true;
}