Bug 1475701 - Save Page As doesn't begin MP3 download while tab is open, r=valentin
☠☠ backed out by 15b0846ed2fc ☠ ☠
authorMichal Novotny <michal.novotny@gmail.com>
Thu, 26 Jul 2018 14:54:00 +0300
changeset 483829 3ff805a9631e4248d0b720c25e9277a0fd7679d4
parent 483796 ad1674e9152da31151ab9f9f099f83ca4ff2d832
child 483830 f13608115d2dbfedf82f085fba42ccaff3ef5526
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1475701
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 1475701 - Save Page As doesn't begin MP3 download while tab is open, r=valentin We need to close the cache entry if opening output stream for writing/appending data failed, so the entry isn't blocked for other requests.
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -5416,16 +5416,17 @@ nsHttpChannel::InstallCacheListener(int6
         LOG(("  entry doomed, not writing it [channel=%p]", this));
         // Entry is already doomed.
         // This may happen when expiration time is set to past and the entry
         // has been removed by the background eviction logic.
         return NS_OK;
     }
     if (rv == NS_ERROR_FILE_TOO_BIG) {
         LOG(("  entry would exceed max allowed size, not writing it [channel=%p]", this));
+        CloseCacheEntry(false);
         return NS_OK;
     }
     if (NS_FAILED(rv)) return rv;
 
     if (mCacheOnlyMetadata) {
         LOG(("Not storing content, cacheOnlyMetadata set"));
         // We must open and then close the output stream of the cache entry.
         // This way we indicate the content has been written (despite with zero