mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Fix cache v1 compression crash in nsCompressOutputStreamWrapper::Close() (8c917ef3)
This commit is contained in:
+6
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user