be less aggresive in shutdown cleanup to avoid shutdown crashes. See bug 37058 for an example stack.

This commit is contained in:
jband%netscape.com 2000-04-25 07:26:02 +00:00
Родитель 18ababdefc
Коммит 4ca5f185a3
1 изменённых файлов: 11 добавлений и 7 удалений

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

@ -176,13 +176,6 @@ nsXPConnect::nsXPConnect()
nsXPConnect::~nsXPConnect()
{
// Calling this Cleanup *before* doing the ShutDown stuff below is
// fairly aggressive. There is some danger that we could get into trouble
// With reentrancy into the xpconnect runtime as we are in the process of
// kiling it. But, this seems to be working. This call could be moved lower
// in this dtor (or commented out!) if problems develop.
xpcPerThreadData::CleanupAllThreads();
NS_IF_RELEASE(mArbitraryScriptable);
NS_IF_RELEASE(mInterfaceInfoManager);
NS_IF_RELEASE(mContextStack);
@ -190,6 +183,17 @@ nsXPConnect::~nsXPConnect()
nsXPCWrappedNativeScope::SystemIsBeingShutDown();
// Unfortunately calling CleanupAllThreads before the stuff above
// (esp. SystemIsBeingShutDown) causes too many bad things to happen
// as the Release calls propagate. See the comment in this function in
// revision 1.35 of this file.
//
// I filed a bug on xpcom regarding the bad things that happen
// if people try to create components during shutdown.
// http://bugzilla.mozilla.org/show_bug.cgi?id=37058
//
xpcPerThreadData::CleanupAllThreads();
if(mThrower)
delete mThrower;
if(mRuntime)