Bug 1470355 - Firefox is unresponsive when visiting https://www.youtube.com/premium, r=valentin
authorMichal Novotny <michal.novotny>
Mon, 02 Jul 2018 00:26:00 +0300
changeset 424683 715cc1bda8a220f2cdee803215c6fc9df635d703
parent 424682 d5e2a4d678f05bd9409d7f943687c2a27a8a6218
child 424684 1ef50d759e7dc801a46eb8350cfeca82850a05bd
push id34221
push usertoros@mozilla.com
push dateMon, 02 Jul 2018 21:54:19 +0000
treeherdermozilla-central@7d20e7fae103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1470355
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.
netwerk/cache2/CacheFileInputStream.cpp
--- a/netwerk/cache2/CacheFileInputStream.cpp
+++ b/netwerk/cache2/CacheFileInputStream.cpp
@@ -147,16 +147,20 @@ CacheFileInputStream::ReadSegments(nsWri
 
     if (NS_FAILED(mStatus)) {
       return mStatus;
     }
 
     return NS_OK;
   }
 
+  if (aCount == 0) {
+    return NS_OK;
+  }
+
   EnsureCorrectChunk(false);
 
   while (true) {
     if (NS_FAILED(mStatus))
       return mStatus;
 
     if (!mChunk) {
       if (mListeningForChunk == -1) {