Commit 0d75c782 authored by Chun-Min Chang's avatar Chun-Min Chang Committed by Matthew Finkel
Browse files

Bug 1650281 - P2: Make sure `gCombinedSizes` won't be underflowed r=gerald

In any case, `gCombinedSizes` should be larger than or equal to the
buffer within `MemoryClockCache`.

Differential Revision: https://phabricator.services.mozilla.com/D84274
parent 270e2ce9
......@@ -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",
......
Markdown is supported
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