mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 749678 - 5/5 - fix dangling TLS pointer - r=jrmuizel
This commit is contained in:
parent
b17930ac59
commit
5edd04f2ba
@ -540,7 +540,13 @@ class GLContextTLSStorage
|
|||||||
GLContext *mCurrentGLContext;
|
GLContext *mCurrentGLContext;
|
||||||
|
|
||||||
NS_INLINE_DECL_REFCOUNTING(Storage)
|
NS_INLINE_DECL_REFCOUNTING(Storage)
|
||||||
|
|
||||||
Storage() : mCurrentGLContext(nsnull) {}
|
Storage() : mCurrentGLContext(nsnull) {}
|
||||||
|
|
||||||
|
~Storage() {
|
||||||
|
// avoid keeping a dangling TLS pointer to the Storage object being destroyed
|
||||||
|
tls::set<Storage>(sTLSKey, nsnull);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
nsRefPtr<Storage> mStorage;
|
nsRefPtr<Storage> mStorage;
|
||||||
|
Loading…
Reference in New Issue
Block a user