Bug 1291071 (Part 1) - Move an assertion from RasterImage::FinalizeDecoder() to IDecodingTask::NotifyDecodeComplete(). r=edwin

This commit is contained in:
Seth Fowler
2016-08-02 14:26:03 -07:00
parent cb009c3612
commit 0b15273908
2 changed files with 3 additions and 2 deletions

View File

@@ -60,6 +60,9 @@ IDecodingTask::NotifyProgress(NotNull<RasterImage*> aImage,
IDecodingTask::NotifyDecodeComplete(NotNull<RasterImage*> aImage,
NotNull<Decoder*> aDecoder)
{
MOZ_ASSERT(aDecoder->HasError() || !aDecoder->InFrame(),
"Decode complete in the middle of a frame?");
// Synchronously notify if we can.
if (NS_IsMainThread() &&
!(aDecoder->GetDecoderFlags() & DecoderFlags::ASYNC_NOTIFY)) {