Bug 1114979 - Annotate some strong and weak references in MFBT; r=froydnj

--HG--
extra : rebase_source : 63d9ca59f8f6be06efd087600c8fd5c5f52e5cd1
This commit is contained in:
Ehsan Akhgari 2014-12-23 17:26:28 -05:00
parent 545f145200
commit a6e15b91de
2 changed files with 4 additions and 3 deletions

View File

@ -285,7 +285,7 @@ private:
mPtr = aVal;
}
T* mPtr;
T* MOZ_STRONG_REF mPtr;
static MOZ_ALWAYS_INLINE T* ref(T* aVal)
{
@ -336,7 +336,7 @@ public:
private:
TemporaryRef(T* aVal, const DontRef&) : mPtr(aVal) {}
mutable T* mPtr;
mutable T* MOZ_STRONG_REF mPtr;
TemporaryRef() MOZ_DELETE;
void operator=(const TemporaryRef&) MOZ_DELETE;

View File

@ -69,6 +69,7 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/NullPtr.h"
#include "mozilla/RefPtr.h"
#include "mozilla/TypeTraits.h"
@ -122,7 +123,7 @@ private:
void detach() { mPtr = nullptr; }
T* mPtr;
T* MOZ_WEAK_REF mPtr;
};
} // namespace detail