Bug 1427109 - Initialize mPrintViaSkPDF as false to guarantee PrintTargetEMF is used only if 'print.print_via_pdf_encoder == skia-pdf'. draft
authorcku <cku@mozilla.com>
Tue, 09 Jan 2018 16:44:36 +0800
changeset 719352 d6ff2bbe54e15d84043e434c3bad84048c74ecfe
parent 718290 e4de69553e3faf8136eb9bb7f2f741e1b7e6f866
child 745773 cf9b7a48b5e24f569d825d9180c75ecca5a5630d
push id95233
push userbmo:cku@mozilla.com
push dateFri, 12 Jan 2018 01:56:57 +0000
bugs1427109
milestone59.0a1
Bug 1427109 - Initialize mPrintViaSkPDF as false to guarantee PrintTargetEMF is used only if 'print.print_via_pdf_encoder == skia-pdf'. MozReview-Commit-ID: 950x2vDfF17
widget/windows/nsDeviceContextSpecWin.cpp
--- a/widget/windows/nsDeviceContextSpecWin.cpp
+++ b/widget/windows/nsDeviceContextSpecWin.cpp
@@ -91,18 +91,21 @@ struct AutoFreeGlobalPrinters
 {
   ~AutoFreeGlobalPrinters() {
     GlobalPrinters::GetInstance()->FreeGlobalPrinters();
   }
 };
 
 //----------------------------------------------------------------------------------
 nsDeviceContextSpecWin::nsDeviceContextSpecWin()
+  : mDevMode(nullptr)
+#ifdef MOZ_ENABLE_SKIA_PDF
+  , mPrintViaSkPDF(false)
+#endif
 {
-  mDevMode       = nullptr;
 }
 
 
 //----------------------------------------------------------------------------------
 
 NS_IMPL_ISUPPORTS(nsDeviceContextSpecWin, nsIDeviceContextSpec)
 
 nsDeviceContextSpecWin::~nsDeviceContextSpecWin()