25 #ifndef __SB_WEAKREFERENCE_H__
26 #define __SB_WEAKREFERENCE_H__
28 #include <nsIWeakReference.h>
29 #include <nsIWeakReferenceUtils.h>
31 #include <nsAutoLock.h>
37 #undef IMETHOD_VISIBILITY
38 #define IMETHOD_VISIBILITY NS_COM_GLUE
45 , mProxyLock(nsnull) {
46 mProxyLock = nsAutoLock::NewLock(
"sbSupportsWeakReference::mProxyLock");
47 NS_WARN_IF_FALSE(mProxyLock,
"Failed to create lock.");
50 NS_DECL_NSISUPPORTSWEAKREFERENCE
58 void NoticeProxyDestruction() {
59 NS_ENSURE_TRUE(mProxyLock, );
60 nsAutoLock lock(mProxyLock);
70 void ClearWeakReferences();
72 NS_ENSURE_TRUE(mProxyLock, PR_FALSE);
73 nsAutoLock lock(mProxyLock);
78 #undef IMETHOD_VISIBILITY
79 #define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN
86 nsAutoLock::DestroyLock(mProxyLock);
90 #endif // __SB_WEAKREFERENCE_H__
~sbSupportsWeakReference()
sbSupportsWeakReference()
PRBool HasWeakReferences() const
void ClearWeakReferences()