diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-02-09 08:53:46 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-09 08:53:46 +0100 |
commit | 8cecf8d5208f3945b35f879bba3015bb1a11bec6 (patch) | |
tree | 0926f5c21f9d10cf929e4c35e7d7e8e8c084dbf5 /gfx | |
parent | 8cd777888a40e987ad536ab68421068f5c06d83b (diff) | |
parent | 92104eb6828ba026550e1f4a3c6890c5b8254d36 (diff) | |
download | UXP-8cecf8d5208f3945b35f879bba3015bb1a11bec6.tar UXP-8cecf8d5208f3945b35f879bba3015bb1a11bec6.tar.gz UXP-8cecf8d5208f3945b35f879bba3015bb1a11bec6.tar.lz UXP-8cecf8d5208f3945b35f879bba3015bb1a11bec6.tar.xz UXP-8cecf8d5208f3945b35f879bba3015bb1a11bec6.zip |
Merge branch 'ported-upstream'
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; |