Back out 39bcc4b7efc8+e268996cb988 (bug 912299) for Android build bustage

This commit is contained in:
Phil Ringnalda 2013-09-05 21:40:01 -07:00
parent d86dcbb470
commit 8bdf85c0db
2 changed files with 6 additions and 6 deletions

View File

@ -68,18 +68,18 @@ class RefCounted
public:
// Compatibility with nsRefPtr.
void AddRef() const {
void AddRef() {
MOZ_ASSERT(refCnt >= 0);
++refCnt;
}
void Release() const {
void Release() {
MOZ_ASSERT(refCnt > 0);
if (0 == --refCnt) {
#ifdef DEBUG
refCnt = detail::DEAD;
#endif
delete static_cast<const T*>(this);
delete static_cast<T*>(this);
}
}
@ -93,7 +93,7 @@ class RefCounted
}
private:
mutable typename Conditional<Atomicity == AtomicRefCount, Atomic<int>, int>::Type refCnt;
typename Conditional<Atomicity == AtomicRefCount, Atomic<int>, int>::Type refCnt;
};
}

View File

@ -70,7 +70,7 @@ class LibHandle;
namespace mozilla {
namespace detail {
template <> inline void RefCounted<LibHandle, AtomicRefCount>::Release() const;
template <> inline void RefCounted<LibHandle, AtomicRefCount>::Release();
template <> inline RefCounted<LibHandle, AtomicRefCount>::~RefCounted()
{
@ -215,7 +215,7 @@ private:
namespace mozilla {
namespace detail {
template <> inline void RefCounted<LibHandle, AtomicRefCount>::Release() const {
template <> inline void RefCounted<LibHandle, AtomicRefCount>::Release() {
#ifdef DEBUG
if (refCnt > 0x7fff0000)
MOZ_ASSERT(refCnt > 0x7fffdead);