Bug 818626 - Release nsPresContext after its PresShell when destroying an nsPrintObject. r=roc

--HG--
extra : rebase_source : d5d21e5b1c06700d69ebe9ce63cb5a9a40b18dbe
This commit is contained in:
Cameron McCormack 2012-12-18 15:32:34 +11:00
parent 412140da91
commit 966bdd29d8

View File

@ -100,12 +100,12 @@ nsPrintObject::Init(nsIDocShell* aDocShell, nsIDOMDocument* aDoc,
void
nsPrintObject::DestroyPresentation()
{
mPresContext = nullptr;
if (mPresShell) {
mPresShell->EndObservingDocument();
nsAutoScriptBlocker scriptBlocker;
mPresShell->Destroy();
}
mPresContext = nullptr;
mPresShell = nullptr;
mViewManager = nullptr;
}