Bug 723498. Make sure to always set our out param in nsMultiplexInputStream::IsNonBlocking when returning success. r=bsmedberg

This commit is contained in:
Boris Zbarsky 2012-02-07 15:28:06 -05:00
Родитель 5a3a6a1a91
Коммит 13e98ce965
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -331,6 +331,14 @@ NS_IMETHODIMP
nsMultiplexInputStream::IsNonBlocking(bool *aNonBlocking)
{
PRUint32 len = mStreams.Count();
if (len == 0) {
// Claim to be non-blocking, since we won't block the caller.
// On the other hand we'll never return NS_BASE_STREAM_WOULD_BLOCK,
// so maybe we should claim to be blocking? It probably doesn't
// matter in practice.
*aNonBlocking = true;
return NS_OK;
}
for (PRUint32 i = 0; i < len; ++i) {
nsresult rv = mStreams[i]->IsNonBlocking(aNonBlocking);
NS_ENSURE_SUCCESS(rv, rv);