Split nsIContentViewer::destroy into close and destroy so we can trigger teardown both at the beginning and at the end of paint suppression. Move the PresShell's teardown from its destructor into new Destroy method so it happens at the end of paint suppression. Also clean up nsDocumentViewer.cpp a bit. b=80203,89626 r=hyatt sr=waterson

git-svn-id: svn://10.0.0.236/trunk@100081 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%fas.harvard.edu
2001-08-01 03:15:50 +00:00
parent c17fab6782
commit 2acd95d9aa
12 changed files with 593 additions and 569 deletions

View File

@@ -2451,6 +2451,7 @@ nsDocShell::Destroy()
docShellParentAsNode->RemoveChild(this);
if (mContentViewer) {
mContentViewer->Close();
mContentViewer->Destroy();
mContentViewer = nsnull;
}
@@ -4106,7 +4107,7 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
}
}
mContentViewer->Destroy();
mContentViewer->Close();
aNewViewer->SetPreviousViewer(mContentViewer);
mContentViewer = nsnull;
}