mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1724107
, be more precise when counting the number of allocator users, r=KrisWright
The patch is based on code inspection. One could move sAllocatorUsers also to Free(), but shouldn't matter in practise. Differential Revision: https://phabricator.services.mozilla.com/D121868
This commit is contained in:
parent
74a8d8dd6b
commit
42e939719a
@ -149,6 +149,7 @@ class nsTimerEvent final : public CancelableRunnable {
|
||||
}
|
||||
void operator delete(void* aPtr) {
|
||||
sAllocator->Free(aPtr);
|
||||
sAllocatorUsers--;
|
||||
DeleteAllocatorIfNeeded();
|
||||
}
|
||||
|
||||
@ -163,7 +164,6 @@ class nsTimerEvent final : public CancelableRunnable {
|
||||
MOZ_ASSERT(!sCanDeleteAllocator || sAllocatorUsers > 0,
|
||||
"This will result in us attempting to deallocate the "
|
||||
"nsTimerEvent allocator twice");
|
||||
sAllocatorUsers--;
|
||||
}
|
||||
|
||||
TimeStamp mInitTime;
|
||||
|
Loading…
Reference in New Issue
Block a user