mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 23:57:31 +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().
|
// Do not allow to initialize stream after calling Close().
|
||||||
mStreamEnded = true;
|
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()) {
|
if (mDescriptor->CacheEntry()) {
|
||||||
nsAutoCString uncompressedLenStr;
|
nsAutoCString uncompressedLenStr;
|
||||||
rv = mDescriptor->GetMetaDataElement("uncompressed-len",
|
rv = mDescriptor->GetMetaDataElement("uncompressed-len",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue