Bug 818626 - Release nsPresContext after its PresShell when destroying an nsPrintObject. r=roc
authorCameron McCormack <cam@mcc.id.au>
Tue, 18 Dec 2012 15:32:34 +1100
changeset 125480 0ef2edc84da0e4ab9eed4c4cb83ba5d7b2ace3ba
parent 125479 c243e7f3512daf8862c318cd3dabafe5279dfd68
child 125481 dd277d439d313b477f4809c20783668478c3ecd7
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs818626
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 818626 - Release nsPresContext after its PresShell when destroying an nsPrintObject. r=roc
layout/printing/nsPrintObject.cpp
--- a/layout/printing/nsPrintObject.cpp
+++ b/layout/printing/nsPrintObject.cpp
@@ -95,18 +95,18 @@ nsPrintObject::Init(nsIDocShell* aDocShe
   return NS_OK;
 }
 
 //------------------------------------------------------------------
 // Resets PO by destroying the presentation
 void 
 nsPrintObject::DestroyPresentation()
 {
-  mPresContext = nullptr;
   if (mPresShell) {
     mPresShell->EndObservingDocument();
     nsAutoScriptBlocker scriptBlocker;
     mPresShell->Destroy();
   }
+  mPresContext = nullptr;
   mPresShell   = nullptr;
   mViewManager = nullptr;
 }