Bug 1470355 - Firefox is unresponsive when visiting https://www.youtube.com/premium, r=valentin

This patch avoids returning NS_BASE_STREAM_WOULD_BLOCK from CacheFileInputStream::ReadSegments when it was called with aCount=0.
This commit is contained in:
Michal Novotny 2018-07-02 00:26:00 +03:00
Родитель 6140855547
Коммит dd9505228b
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -152,6 +152,10 @@ CacheFileInputStream::ReadSegments(nsWriteSegmentFun aWriter, void *aClosure,
return NS_OK;
}
if (aCount == 0) {
return NS_OK;
}
EnsureCorrectChunk(false);
while (true) {