Disable rendering during presentation tear down

This commit is contained in:
kipp%netscape.com 1999-04-30 00:08:17 +00:00
parent 4b46397958
commit 0227e28077
2 changed files with 18 additions and 2 deletions

View File

@ -536,18 +536,26 @@ PresShell::QueryInterface(const nsIID& aIID, void** aInstancePtr)
PresShell::~PresShell()
{
mRefCnt = 99;/* XXX hack! get around re-entrancy bugs */
mIsDestroying = PR_TRUE;
if (mViewManager) {
// Disable paints during tear down of the frame tree
mViewManager->DisableRefresh();
}
if (nsnull != mRootFrame) {
mRootFrame->DeleteFrame(*mPresContext);
}
NS_IF_RELEASE(mViewManager);
//Release mPresContext after mViewManager
//Note: Release mPresContext after mViewManager
// XXX why?
NS_IF_RELEASE(mPresContext);
NS_IF_RELEASE(mStyleSet);
if (nsnull != mDocument) {
mDocument->DeleteShell(this);
NS_RELEASE(mDocument);
}
mRefCnt = 0;
delete mPlaceholderMap;
}

View File

@ -536,18 +536,26 @@ PresShell::QueryInterface(const nsIID& aIID, void** aInstancePtr)
PresShell::~PresShell()
{
mRefCnt = 99;/* XXX hack! get around re-entrancy bugs */
mIsDestroying = PR_TRUE;
if (mViewManager) {
// Disable paints during tear down of the frame tree
mViewManager->DisableRefresh();
}
if (nsnull != mRootFrame) {
mRootFrame->DeleteFrame(*mPresContext);
}
NS_IF_RELEASE(mViewManager);
//Release mPresContext after mViewManager
//Note: Release mPresContext after mViewManager
// XXX why?
NS_IF_RELEASE(mPresContext);
NS_IF_RELEASE(mStyleSet);
if (nsnull != mDocument) {
mDocument->DeleteShell(this);
NS_RELEASE(mDocument);
}
mRefCnt = 0;
delete mPlaceholderMap;
}