Bug 1290293 - Part 2f. Assert there is no frame on the finish decoding error path. r=tnikkel

This commit is contained in:
Andrew Osmond 2017-02-10 08:33:11 -05:00
parent e7ce25346c
commit 42d8ee76ab
2 changed files with 8 additions and 1 deletions

View File

@ -380,7 +380,12 @@ Decoder::AllocateFrameInternal(uint32_t aFrameNum,
nsresult Decoder::InitInternal() { return NS_OK; }
nsresult Decoder::BeforeFinishInternal() { return NS_OK; }
nsresult Decoder::FinishInternal() { return NS_OK; }
nsresult Decoder::FinishWithErrorInternal() { return NS_OK; }
nsresult Decoder::FinishWithErrorInternal()
{
MOZ_ASSERT(!mInFrame);
return NS_OK;
}
/*
* Progress Notifications

View File

@ -79,6 +79,8 @@ nsICODecoder::FinishInternal()
nsresult
nsICODecoder::FinishWithErrorInternal()
{
// No need to assert !mInFrame here because this condition is enforced by
// mContainedDecoder.
return GetFinalStateFromContainedDecoder();
}