Bug 917757 - Don't trigger Heap<T> post barriers in XPConnect shutdown r=bholley

This commit is contained in:
Jon Coppeard 2013-09-20 10:22:58 +01:00
parent 3476cf6e3d
commit f1d686be98

View File

@ -610,7 +610,11 @@ nsXPCWrappedJS::SystemIsBeingShutDown()
// NOTE: that mClass is retained so that GetInterfaceInfo can continue to
// work (and avoid crashing some platforms).
mJSObj = nullptr;
// Use of unsafeGet() is to avoid triggering post barriers in shutdown, as
// this will access the chunk containing mJSObj, which may have been freed
// at this point.
*mJSObj.unsafeGet() = nullptr;
// Notify other wrappers in the chain.
if (mNext)