[printing] Fix build bustage with --disable-printing.

master
Fedor 2020-06-10 21:12:19 +03:00
parent 2f4f7d8270
commit 94b5dd401f
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@ PrintTargetWindows::PrintTargetWindows(cairo_surface_t* aCairoSurface,
/* static */ already_AddRefed<PrintTargetWindows>
PrintTargetWindows::CreateOrNull(HDC aDC)
{
#ifdef NS_PRINTING
// Figure out the cairo surface size - Windows we need to use the printable
// area of the page. Note: we only scale the printing using the LOGPIXELSY,
// so we use that when calculating the surface width as well as the height.
@ -51,6 +52,9 @@ PrintTargetWindows::CreateOrNull(HDC aDC)
new PrintTargetWindows(surface, size, aDC);
return target.forget();
#else
return nullptr;
#endif
}
nsresult

View File

@ -544,10 +544,12 @@ nsDocumentViewer::~nsDocumentViewer()
mDocument->Destroy();
}
#ifdef NS_PRINTING
if (mPrintEngine) {
mPrintEngine->Destroy();
mPrintEngine = nullptr;
}
#endif
MOZ_RELEASE_ASSERT(mDestroyRefCount == 0);
NS_ASSERTION(!mPresShell && !mPresContext,