Work around a crash by stubbing out some pointers that are weak links that are not to be used during shutdown

This commit is contained in:
kipp%netscape.com 1999-10-07 00:31:21 +00:00
Родитель 99ae91f493
Коммит 81fc79eab8
2 изменённых файлов: 22 добавлений и 4 удалений

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

@ -506,19 +506,28 @@ PresShell::~PresShell()
mIsDestroying = PR_TRUE; mIsDestroying = PR_TRUE;
// Clobber weak leaks in case of re-entrancy during tear down
mHistoryState = nsnull;
NS_IF_RELEASE(mCurrentEventContent); NS_IF_RELEASE(mCurrentEventContent);
if (mViewManager) { if (mViewManager) {
// Disable paints during tear down of the frame tree // Disable paints during tear down of the frame tree
mViewManager->DisableRefresh(); mViewManager->DisableRefresh();
mViewManager = nsnull;
} }
// Destroy the frame manager before destroying the frame hierarchy. That way // Destroy the frame manager before destroying the frame hierarchy. That way
// we won't waste time removing content->frame mappings for frames being // we won't waste time removing content->frame mappings for frames being
// destroyed // destroyed
NS_IF_RELEASE(mFrameManager); NS_IF_RELEASE(mFrameManager);
if (mRootFrame) if (mRootFrame) {
mRootFrame->Destroy(*mPresContext); mRootFrame->Destroy(*mPresContext);
if (mDocument) }
if (mDocument) {
mDocument->DeleteShell(this); mDocument->DeleteShell(this);
}
mRefCnt = 0; mRefCnt = 0;
} }

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

@ -506,19 +506,28 @@ PresShell::~PresShell()
mIsDestroying = PR_TRUE; mIsDestroying = PR_TRUE;
// Clobber weak leaks in case of re-entrancy during tear down
mHistoryState = nsnull;
NS_IF_RELEASE(mCurrentEventContent); NS_IF_RELEASE(mCurrentEventContent);
if (mViewManager) { if (mViewManager) {
// Disable paints during tear down of the frame tree // Disable paints during tear down of the frame tree
mViewManager->DisableRefresh(); mViewManager->DisableRefresh();
mViewManager = nsnull;
} }
// Destroy the frame manager before destroying the frame hierarchy. That way // Destroy the frame manager before destroying the frame hierarchy. That way
// we won't waste time removing content->frame mappings for frames being // we won't waste time removing content->frame mappings for frames being
// destroyed // destroyed
NS_IF_RELEASE(mFrameManager); NS_IF_RELEASE(mFrameManager);
if (mRootFrame) if (mRootFrame) {
mRootFrame->Destroy(*mPresContext); mRootFrame->Destroy(*mPresContext);
if (mDocument) }
if (mDocument) {
mDocument->DeleteShell(this); mDocument->DeleteShell(this);
}
mRefCnt = 0; mRefCnt = 0;
} }