diff --git a/xpcom/base/AlreadyAddRefed.h b/xpcom/base/AlreadyAddRefed.h index 21ec5a99dfa3..9fe7f69f8f62 100644 --- a/xpcom/base/AlreadyAddRefed.h +++ b/xpcom/base/AlreadyAddRefed.h @@ -137,7 +137,7 @@ struct already_AddRefed } private: - T* mRawPtr; + T* MOZ_STRONG_REF mRawPtr; }; #endif // AlreadyAddRefed_h diff --git a/xpcom/base/StaticPtr.h b/xpcom/base/StaticPtr.h index 7880117e5ebe..906c8d4e99b5 100644 --- a/xpcom/base/StaticPtr.h +++ b/xpcom/base/StaticPtr.h @@ -141,7 +141,7 @@ private: } } - T* mRawPtr; + T* MOZ_STRONG_REF mRawPtr; }; namespace StaticPtr_internal { diff --git a/xpcom/base/nsAutoPtr.h b/xpcom/base/nsAutoPtr.h index d5710ac82c12..9f864ce8505d 100644 --- a/xpcom/base/nsAutoPtr.h +++ b/xpcom/base/nsAutoPtr.h @@ -60,11 +60,11 @@ private: } private: - T* mPtr; + T* MOZ_WEAK_REF mPtr; }; private: - T* mRawPtr; + T* MOZ_STRONG_REF mRawPtr; public: typedef T element_type; @@ -431,7 +431,7 @@ private: } private: - T* mRawPtr; + T* MOZ_STRONG_REF mRawPtr; public: typedef T element_type; @@ -778,7 +778,7 @@ public: return status; } private: - T* mRawPtr; + T* MOZ_WEAK_REF mRawPtr; }; template @@ -801,7 +801,7 @@ public: return status; } private: - T* mRawPtr; + T* MOZ_WEAK_REF mRawPtr; nsresult* mErrorPtr; }; diff --git a/xpcom/base/nsRefPtr.h b/xpcom/base/nsRefPtr.h index 4f00fb8f38ea..4582e402f7ff 100644 --- a/xpcom/base/nsRefPtr.h +++ b/xpcom/base/nsRefPtr.h @@ -48,7 +48,7 @@ private: } private: - T* mRawPtr; + T* MOZ_STRONG_REF mRawPtr; public: typedef T element_type; diff --git a/xpcom/build/nsXREAppData.h b/xpcom/build/nsXREAppData.h index 2e1ec4f11072..8df8fb11ccf2 100644 --- a/xpcom/build/nsXREAppData.h +++ b/xpcom/build/nsXREAppData.h @@ -7,6 +7,7 @@ #define nsXREAppData_h #include +#include "mozilla/Attributes.h" class nsIFile; @@ -30,7 +31,7 @@ struct nsXREAppData * The directory of the application to be run. May be null if the * xulrunner and the app are installed into the same directory. */ - nsIFile* directory; + nsIFile* MOZ_WEAK_REF directory; /** * The name of the application vendor. This must be ASCII, and is normally @@ -92,7 +93,7 @@ struct nsXREAppData * The location of the XRE. XRE_main may not be able to figure this out * programatically. */ - nsIFile* xreDirectory; + nsIFile* MOZ_WEAK_REF xreDirectory; /** * The minimum/maximum compatible XRE version. diff --git a/xpcom/glue/nsCOMPtr.h b/xpcom/glue/nsCOMPtr.h index 48e37bd407b2..ba67fe6fff36 100644 --- a/xpcom/glue/nsCOMPtr.h +++ b/xpcom/glue/nsCOMPtr.h @@ -167,7 +167,7 @@ public: nsresult NS_FASTCALL operator()(const nsIID& aIID, void**) const; private: - nsISupports* mRawPtr; + nsISupports* MOZ_STRONG_REF mRawPtr; }; class nsQueryInterfaceWithError @@ -182,7 +182,7 @@ public: nsresult NS_FASTCALL operator()(const nsIID& aIID, void**) const; private: - nsISupports* mRawPtr; + nsISupports* MOZ_STRONG_REF mRawPtr; nsresult* mErrorPtr; }; @@ -319,7 +319,7 @@ public: begin_assignment(); protected: - NS_MAY_ALIAS_PTR(nsISupports) mRawPtr; + NS_MAY_ALIAS_PTR(nsISupports) MOZ_STRONG_REF mRawPtr; void assign_assuming_AddRef(nsISupports* aNewPtr) { @@ -378,7 +378,7 @@ private: } private: - T* mRawPtr; + T* MOZ_STRONG_REF mRawPtr; #endif public: diff --git a/xpcom/glue/nsComponentManagerUtils.h b/xpcom/glue/nsComponentManagerUtils.h index cb097e9bcdf8..6c1725611ec6 100644 --- a/xpcom/glue/nsComponentManagerUtils.h +++ b/xpcom/glue/nsComponentManagerUtils.h @@ -41,7 +41,7 @@ public: private: const nsCID& mCID; - nsISupports* mOuter; + nsISupports* MOZ_WEAK_REF mOuter; nsresult* mErrorPtr; }; @@ -60,7 +60,7 @@ public: private: const char* mContractID; - nsISupports* mOuter; + nsISupports* MOZ_WEAK_REF mOuter; nsresult* mErrorPtr; }; @@ -78,8 +78,8 @@ public: virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const; private: - nsIFactory* mFactory; - nsISupports* mOuter; + nsIFactory* MOZ_WEAK_REF mFactory; + nsISupports* MOZ_WEAK_REF mOuter; nsresult* mErrorPtr; }; diff --git a/xpcom/glue/nsHashKeys.h b/xpcom/glue/nsHashKeys.h index 99ca6d5fd08c..1e1dca662141 100644 --- a/xpcom/glue/nsHashKeys.h +++ b/xpcom/glue/nsHashKeys.h @@ -385,7 +385,7 @@ public: enum { ALLOW_MEMMOVE = true }; protected: - T* mKey; + T* MOZ_WEAK_REF mKey; }; /** diff --git a/xpcom/glue/nsIInterfaceRequestorUtils.h b/xpcom/glue/nsIInterfaceRequestorUtils.h index e4bafc2c2968..33bd2c7e528b 100644 --- a/xpcom/glue/nsIInterfaceRequestorUtils.h +++ b/xpcom/glue/nsIInterfaceRequestorUtils.h @@ -34,7 +34,7 @@ public: virtual nsresult NS_FASTCALL operator()(const nsIID&, void**) const; private: - nsISupports* mSource; + nsISupports* MOZ_WEAK_REF mSource; nsresult* mErrorPtr; }; diff --git a/xpcom/glue/nsProxyRelease.cpp b/xpcom/glue/nsProxyRelease.cpp index 593c6dc81b32..bcbdb35b5843 100644 --- a/xpcom/glue/nsProxyRelease.cpp +++ b/xpcom/glue/nsProxyRelease.cpp @@ -20,7 +20,7 @@ public: } private: - nsISupports* mDoomed; + nsISupports* MOZ_STRONG_REF mDoomed; }; nsresult diff --git a/xpcom/glue/nsWeakReference.cpp b/xpcom/glue/nsWeakReference.cpp index 480b8eebd746..06874005211e 100644 --- a/xpcom/glue/nsWeakReference.cpp +++ b/xpcom/glue/nsWeakReference.cpp @@ -45,7 +45,7 @@ private: mReferent = 0; } - nsSupportsWeakReference* mReferent; + nsSupportsWeakReference* MOZ_WEAK_REF mReferent; }; nsresult diff --git a/xpcom/glue/nsWeakReference.h b/xpcom/glue/nsWeakReference.h index 3519a2cb5e3e..93e5b9a86f5c 100644 --- a/xpcom/glue/nsWeakReference.h +++ b/xpcom/glue/nsWeakReference.h @@ -31,7 +31,7 @@ private: // Called (only) by an |nsWeakReference| from _its_ dtor. void NoticeProxyDestruction() { mProxy = 0; } - nsWeakReference* mProxy; + nsWeakReference* MOZ_WEAK_REF mProxy; protected: