mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1114979 - Annotate some strong and weak references in MFBT; r=froydnj
--HG-- extra : rebase_source : 63d9ca59f8f6be06efd087600c8fd5c5f52e5cd1
This commit is contained in:
parent
7042d1e185
commit
cef42d50e5
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user