Unverified Commit 885968e7 authored by Georg Koppen's avatar Georg Koppen
Browse files

Merge branch 'bug_40109' into tor-browser-78.2.0esr-10.0-1

parents b1f49b0a 965a049f
......@@ -52,6 +52,7 @@ MemoryBlockCache::MemoryBlockCache(int64_t aContentLength)
}
MemoryBlockCache::~MemoryBlockCache() {
MOZ_ASSERT(gCombinedSizes >= mBuffer.Length());
size_t sizes = static_cast<size_t>(gCombinedSizes -= mBuffer.Length());
LOG("~MemoryBlockCache() - destroying buffer of size %zu; combined sizes now "
"%zu",
......@@ -114,6 +115,10 @@ bool MemoryBlockCache::EnsureBufferCanContain(size_t aContentLength) {
// possibly bypass some future growths that would fit in this new capacity.
mBuffer.SetLength(capacity);
}
const size_t newSizes = gCombinedSizes += (extra + extraCapacity);
LOG("EnsureBufferCanContain(%zu) - buffer size %zu + requested %zu + bonus "
"%zu = %zu; combined sizes %zu",
aContentLength, initialLength, extra, extraCapacity, capacity, newSizes);
mHasGrown = true;
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment