Bug 1333660 - Assertion failure: mHasActivePage (We can't guarantee a valid DrawTarget) r=jwatt

MozReview-Commit-ID: 3ELQPCfjJ2f

--HG--
extra : rebase_source : eb61e3da03549a5ceea58291fab6b93a08531a64
This commit is contained in:
Farmer Tseng 2017-01-25 16:14:21 +08:00
parent f6710ec790
commit 30418b94db

View File

@ -91,6 +91,7 @@ PrintTargetWindows::EndPrinting()
nsresult
PrintTargetWindows::AbortPrinting()
{
PrintTarget::AbortPrinting();
int result = ::AbortDoc(mDC);
return (result <= 0) ? NS_ERROR_FAILURE : NS_OK;
}
@ -98,6 +99,7 @@ PrintTargetWindows::AbortPrinting()
nsresult
PrintTargetWindows::BeginPage()
{
PrintTarget::BeginPage();
int result = ::StartPage(mDC);
return (result <= 0) ? NS_ERROR_FAILURE : NS_OK;
}
@ -106,6 +108,7 @@ nsresult
PrintTargetWindows::EndPage()
{
cairo_surface_show_page(mCairoSurface);
PrintTarget::EndPage();
int result = ::EndPage(mDC);
return (result <= 0) ? NS_ERROR_FAILURE : NS_OK;
}