Bug 1426087 - Decrement nsDocumentViewer::mDestroyRefCount in a separate function. r=jwatt, a=RyanVM

--HG--
extra : source : 86d41b5efe074f6988085082df9ef537eee0813a
extra : intermediate-source : ea406489f93a0a8fa05ff568acdff07ce6b118c4
This commit is contained in:
Bob Owen 2018-01-12 10:17:36 +00:00 committed by Roy Tam
commit 81337d2cfd
3 changed files with 10 additions and 9 deletions

View file

@ -14,14 +14,8 @@ NS_IMPL_ISUPPORTS_INHERITED(nsPagePrintTimer, mozilla::Runnable, nsITimerCallbac
nsPagePrintTimer::~nsPagePrintTimer()
{
// "Destroy" the document viewer; this normally doesn't actually
// destroy it because of the IncrementDestroyRefCount call below
// XXX This is messy; the document viewer should use a single approach
// to keep itself alive during printing
nsCOMPtr<nsIContentViewer> cv(do_QueryInterface(mDocViewerPrint));
if (cv) {
cv->Destroy();
}
// This matches the IncrementDestroyRefCount call in the constructor.
mDocViewerPrint->DecrementDestroyRefCount();
}
nsresult