mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1027251 - Fix or whitelist dangerous public destructors in xpcom/ - r=ehsan
This commit is contained in:
parent
e480eacf01
commit
12f098cbf9
@ -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())) {
|
||||
|
@ -89,6 +89,7 @@ public:
|
||||
}
|
||||
|
||||
BackgroundHangManager();
|
||||
private:
|
||||
~BackgroundHangManager();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user