diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2017-11-20 09:35:27 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-08 21:22:59 +0100 |
commit | d40a98322bfd9f6a907884d58346f58bfa922779 (patch) | |
tree | 166cce35a9d5d7da8acd24a14924c5bac693a314 /gfx | |
parent | 50f6ced9fc76b71b4685d8363d9615204ad6c897 (diff) | |
download | UXP-d40a98322bfd9f6a907884d58346f58bfa922779.tar UXP-d40a98322bfd9f6a907884d58346f58bfa922779.tar.gz UXP-d40a98322bfd9f6a907884d58346f58bfa922779.tar.lz UXP-d40a98322bfd9f6a907884d58346f58bfa922779.tar.xz UXP-d40a98322bfd9f6a907884d58346f58bfa922779.zip |
Add more NS_BUILD_REFCNT_LOGGING in AtomicRefCountedWithFinalize.
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/layers/AtomicRefCountedWithFinalize.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gfx/layers/AtomicRefCountedWithFinalize.h b/gfx/layers/AtomicRefCountedWithFinalize.h index 7bd8f0203..1dd35e626 100644 --- a/gfx/layers/AtomicRefCountedWithFinalize.h +++ b/gfx/layers/AtomicRefCountedWithFinalize.h @@ -101,8 +101,12 @@ public: private: void AddRef() { MOZ_ASSERT(mRefCount >= 0, "AddRef() during/after Finalize()/dtor."); - mRefCount++; - NS_LOG_ADDREF(this, mRefCount, mName, sizeof(*this)); +#ifdef NS_BUILD_REFCNT_LOGGING + int currCount = ++mRefCount; + NS_LOG_ADDREF(this, currCount, mName, sizeof(*this)); +#else + ++mRefCount; +#endif } void Release() { @@ -118,7 +122,9 @@ private: ++mRefCount; return; } +#ifdef NS_BUILD_REFCNT_LOGGING NS_LOG_RELEASE(this, currCount, mName); +#endif if (0 == currCount) { mRefCount = detail::DEAD; |