Bug 886730 - Move a szip.cpp MOZ_ASSERT to a safer place. r=nfroyd

This commit is contained in:
Mike Hommey 2013-06-27 09:35:49 +09:00
parent 1ec2b29538
commit d6a0cc46cf

View File

@ -441,13 +441,13 @@ int SzipCompress::do_compress(Buffer &origBuf, Buffer &outBuf,
}
header->lastChunkSize = avail;
MOZ_ASSERT(header->totalSize == offset);
MOZ_ASSERT(header->nChunks == nChunks);
if (!outBuf.Resize(offset)) {
LOG("Error truncating output: %s", strerror(errno));
return 1;
}
MOZ_ASSERT(header->nChunks == nChunks);
return 0;
}