fix a side effect of the fix to bug 32485. It turns out it is better to leak some native objects while shutting down then to fire off Release calls on those wrapped native objects and watch the browser crash

This commit is contained in:
jband%netscape.com 2000-03-31 10:31:00 +00:00
Родитель 9680451c22
Коммит 7f5854b8f2
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -412,7 +412,14 @@ nsXPCWrappedNative::Find(REFNSIID aIID)
void
nsXPCWrappedNative::SystemIsBeingShutDown()
{
NS_IF_RELEASE(mObj);
// XXX It turns out that it is better to leak here then to do any Release's
// and have them propagate into all sorts of mischief as the system is being
// shutdown. This was learned the hard way :(
// mObj == nsnull is used to indicate that the wrapper is no longer valid
// and that calls from JS should fail without trying to use any of the
// xpconnect mechanisms. 'IsValid' is implemented by checking this pointer.
mObj = nsnull;
}
/***************************************************************************/