mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Fix cache v1 compression crash in nsCompressOutputStreamWrapper::Close()
This commit is contained in:
parent
21ea79484b
commit
8c917ef35e
1 changed files with 6 additions and 0 deletions
6
netwerk/cache/nsCacheEntryDescriptor.cpp
vendored
6
netwerk/cache/nsCacheEntryDescriptor.cpp
vendored
|
|
@ -1399,6 +1399,12 @@ nsCompressOutputStreamWrapper::Close()
|
|||
// Do not allow to initialize stream after calling Close().
|
||||
mStreamEnded = true;
|
||||
|
||||
// In some rare cases, flushing the zlib stream can take too long
|
||||
// and we lose our cache entry in the meantime. Do another check
|
||||
// and bail if so.
|
||||
if (!mDescriptor)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
if (mDescriptor->CacheEntry()) {
|
||||
nsAutoCString uncompressedLenStr;
|
||||
rv = mDescriptor->GetMetaDataElement("uncompressed-len",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue