Bug 1027251 - Fix or whitelist dangerous public destructors in xpcom/ - r=ehsan

This commit is contained in:
Benoit Jacob 2014-06-18 22:29:00 -04:00
parent e480eacf01
commit 12f098cbf9
2 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,7 @@ public:
NS_IF_ADDREF(mRawPtr = ptr);
}
private:
// We can be released on any thread.
~nsMainThreadPtrHolder() {
if (NS_IsMainThread()) {
@ -133,6 +134,7 @@ public:
}
}
public:
T* get() {
// Nobody should be touching the raw pointer off-main-thread.
if (mStrict && MOZ_UNLIKELY(!NS_IsMainThread())) {

View File

@ -89,6 +89,7 @@ public:
}
BackgroundHangManager();
private:
~BackgroundHangManager();
};