Bug 1724107, be more precise when counting the number of allocator users, r=KrisWright a=RyanVM

This commit is contained in:
roytam1 2021-09-15 11:36:21 +08:00
commit 44959f50f8

View file

@ -170,6 +170,7 @@ public:
void operator delete(void* aPtr)
{
sAllocator->Free(aPtr);
sAllocatorUsers--;
DeleteAllocatorIfNeeded();
}
@ -193,7 +194,6 @@ private:
{
MOZ_ASSERT(!sCanDeleteAllocator || sAllocatorUsers > 0,
"This will result in us attempting to deallocate the nsTimerEvent allocator twice");
sAllocatorUsers--;
}
RefPtr<nsTimerImpl> mTimer;