diff options
author | Olli Pettay <Olli.Pettay@helsinki.fi> | 2021-09-09 14:01:28 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-01 14:28:04 +0200 |
commit | 2a9d0cc5af3552a378778cb2aaf5317b5f8ddd14 (patch) | |
tree | a1e605516612072a3526c524e02e6e4f0b830783 /xpcom/threads | |
parent | 1fa4cfb004ec5f37d453ded91b1c846132b00ed6 (diff) | |
download | uxp-2a9d0cc5af3552a378778cb2aaf5317b5f8ddd14.tar.gz |
[XPCOM] be more precise when counting the number of allocator users
This patch is based on code inspection.
One could also move sAllocatorUsers to Free(), but it shouldn't matter
in practice.
Diffstat (limited to 'xpcom/threads')
-rw-r--r-- | xpcom/threads/TimerThread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index d92c2ef90b..db7c924623 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -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; |