Bug 1789489 - Update the assertion again in nsObjectLoadingContent::SubdocumentImageLoadComplete r=smaug

We should only assert mType == eType_Document when the loading was in a
good state.

Differential Revision: https://phabricator.services.mozilla.com/D156626
This commit is contained in:
Sean Feng 2022-09-10 01:23:37 +00:00
Родитель ecc5d1c1c1
Коммит 88c9045010
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -2410,7 +2410,9 @@ void nsObjectLoadingContent::SubdocumentImageLoadComplete(nsresult aResult) {
return;
}
MOZ_DIAGNOSTIC_ASSERT_IF(mChannelLoaded, mType == eType_Document);
// (mChannelLoaded && mChannel) indicates this is a good state, not any sort
// of failures.
MOZ_DIAGNOSTIC_ASSERT_IF(mChannelLoaded && mChannel, mType == eType_Document);
NotifyStateChanged(oldType, oldState, true, true);
}