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.
This commit is contained in:
Michal Novotny 2018-07-26 14:54:00 +03:00
parent 25b5f10ae3
commit 38f29ba537

View File

@ -5421,6 +5421,7 @@ nsHttpChannel::InstallCacheListener(int64_t offset)
} }
if (rv == NS_ERROR_FILE_TOO_BIG) { if (rv == NS_ERROR_FILE_TOO_BIG) {
LOG((" entry would exceed max allowed size, not writing it [channel=%p]", this)); LOG((" entry would exceed max allowed size, not writing it [channel=%p]", this));
CloseCacheEntry(false);
return NS_OK; return NS_OK;
} }
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;