Bug 1931736. Add missing braces around if/loop statements in layout/printing/. r=layout-reviewers,emilio

Depends on D229251

Differential Revision: https://phabricator.services.mozilla.com/D229252
This commit is contained in:
Jonathan Watt 2024-11-17 05:04:00 +00:00
parent dc02e365e8
commit e6bca3e56f

View File

@ -410,8 +410,9 @@ nsresult nsPrintJob::DoCommonPrint(bool aIsPrintPreview,
}
// XXX This isn't really correct...
if (!mPrintObject->mDocument || !mPrintObject->mDocument->GetRootElement())
if (!mPrintObject->mDocument || !mPrintObject->mDocument->GetRootElement()) {
return NS_ERROR_GFX_PRINTER_STARTDOC;
}
mPrintSettings->GetShrinkToFit(&mShrinkToFit);
@ -2061,7 +2062,9 @@ class nsPrintCompletionEvent : public Runnable {
}
NS_IMETHOD Run() override {
if (mDocViewerPrint) mDocViewerPrint->OnDonePrinting();
if (mDocViewerPrint) {
mDocViewerPrint->OnDonePrinting();
}
return NS_OK;
}