Bug 1061891 - Make it possible to check whether a nsMainThreadPtr<T> is null. r=bholley

This commit is contained in:
David Rajchenbach-Teller 2014-09-11 12:11:44 +02:00
parent ccbb9be8bc
commit 8d9b6b770a

View File

@ -154,6 +154,10 @@ public:
{
return mRawPtr == aOther.mRawPtr;
}
bool operator!() const
{
return !mRawPtr;
}
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsMainThreadPtrHolder<T>)
@ -225,7 +229,9 @@ public:
}
return *mPtr == *aOther.mPtr;
}
bool operator!() { return !mPtr; }
bool operator!() const {
return !mPtr || !*mPtr;
}
};
#endif