mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 06:37:30 +09:00
Add more NS_BUILD_REFCNT_LOGGING in AtomicRefCountedWithFinalize.
This commit is contained in:
parent
1c690025d9
commit
47d488b84d
1 changed files with 8 additions and 2 deletions
|
|
@ -101,8 +101,12 @@ public:
|
||||||
private:
|
private:
|
||||||
void AddRef() {
|
void AddRef() {
|
||||||
MOZ_ASSERT(mRefCount >= 0, "AddRef() during/after Finalize()/dtor.");
|
MOZ_ASSERT(mRefCount >= 0, "AddRef() during/after Finalize()/dtor.");
|
||||||
mRefCount++;
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
NS_LOG_ADDREF(this, mRefCount, mName, sizeof(*this));
|
int currCount = ++mRefCount;
|
||||||
|
NS_LOG_ADDREF(this, currCount, mName, sizeof(*this));
|
||||||
|
#else
|
||||||
|
++mRefCount;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Release() {
|
void Release() {
|
||||||
|
|
@ -118,7 +122,9 @@ private:
|
||||||
++mRefCount;
|
++mRefCount;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||||
NS_LOG_RELEASE(this, currCount, mName);
|
NS_LOG_RELEASE(this, currCount, mName);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (0 == currCount) {
|
if (0 == currCount) {
|
||||||
mRefCount = detail::DEAD;
|
mRefCount = detail::DEAD;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue