Bug 489830 - Make MediaListener's mNextListener assertion a non-fatal error to avoid crashing in the face of a listener that breaks nsIRequest's contract. r+sr=roc

--HG--
extra : rebase_source : d88fd679bbb532193782f75a8e0cbdff43e602f2
This commit is contained in:
Matthew Gregan 2009-05-05 18:13:26 +12:00
Родитель fc4fba5d29
Коммит 30d18e814f
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -245,7 +245,10 @@ NS_IMETHODIMP nsHTMLMediaElement::MediaLoadListener::OnDataAvailable(nsIRequest*
nsIInputStream* aStream, PRUint32 aOffset, nsIInputStream* aStream, PRUint32 aOffset,
PRUint32 aCount) PRUint32 aCount)
{ {
NS_ABORT_IF_FALSE(mNextListener, "Must have a listener"); if (!mNextListener) {
NS_ERROR("Must have a chained listener; OnStartRequest should have canceled this request");
return NS_BINDING_ABORTED;
}
return mNextListener->OnDataAvailable(aRequest, aContext, aStream, aOffset, aCount); return mNextListener->OnDataAvailable(aRequest, aContext, aStream, aOffset, aCount);
} }