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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user