mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 19:10:36 +00:00
Bug 1061891 - Make it possible to check whether a nsMainThreadPtr<T> is null. r=bholley
This commit is contained in:
parent
ccbb9be8bc
commit
8d9b6b770a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user