Bug 433132, Running mochitest for bug 396024 still leaks r+sr=roc

This commit is contained in:
Olli Pettay 2008-09-26 12:51:42 +03:00
Родитель acebbead37
Коммит 925283111e
3 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -1313,10 +1313,8 @@ DocumentViewerImpl::Close(nsISHEntry *aSHEntry)
// A Close was called while we were printing
// so don't clear the ScriptGlobalObject
// or clear the mDocument below
// Also, do an extra addref to keep the viewer from going away.
if (mPrintEngine && !mClosingWhilePrinting) {
mClosingWhilePrinting = PR_TRUE;
NS_ADDREF_THIS();
} else
#endif
{
@ -4074,7 +4072,6 @@ DocumentViewerImpl::OnDonePrinting()
mDocument = nsnull;
}
mClosingWhilePrinting = PR_FALSE;
NS_RELEASE_THIS();
}
if (mPresContext)
mPresContext->RestoreImageAnimationMode();

Просмотреть файл

@ -229,7 +229,6 @@ nsPrintEngine::nsPrintEngine() :
mIsDoingPrinting(PR_FALSE),
mIsDoingPrintPreview(PR_FALSE),
mProgressDialogIsShown(PR_FALSE),
mDocViewerPrint(nsnull),
mContainer(nsnull),
mDeviceContext(nsnull),
mPrt(nsnull),
@ -269,7 +268,7 @@ void nsPrintEngine::Destroy()
}
#endif
mDocViewerPrint = nsnull;
}
//-------------------------------------------------------
@ -299,7 +298,7 @@ nsresult nsPrintEngine::Initialize(nsIDocumentViewerPrint* aDocViewerPrint,
NS_ENSURE_ARG_POINTER(aDevContext);
NS_ENSURE_ARG_POINTER(aParentWidget);
mDocViewerPrint = aDocViewerPrint; // weak reference
mDocViewerPrint = aDocViewerPrint;
mContainer = aContainer; // weak reference
mDocument = aDocument;
mDeviceContext = aDevContext; // weak reference

Просмотреть файл

@ -280,7 +280,7 @@ protected:
PRPackedBool mIsDoingPrintPreview; // per DocumentViewer
PRPackedBool mProgressDialogIsShown;
nsIDocumentViewerPrint* mDocViewerPrint; // [WEAK] it owns me!
nsCOMPtr<nsIDocumentViewerPrint> mDocViewerPrint;
nsISupports* mContainer; // [WEAK] it owns me!
nsIDeviceContext* mDeviceContext; // not ref counted