Bug 1253247: Return an error when trying to Init an nsDeviceContextSpecProxy without a RemotePrintJob. r=jimm
authorBob Owen <bobowencode@gmail.com>
Sat, 05 Mar 2016 18:25:14 +0000
changeset 325123 a20f8c2cf8bb75075e198c499264bba973f5c37a
parent 325122 bcc5851a45987beceab0db18233b8a605d40bc67
child 325124 bb10b6a54c0df280e6aafffee324217f19b3b676
child 325182 bd154748b83a56ee103c21a324b5bd1c4cc28492
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1253247
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253247: Return an error when trying to Init an nsDeviceContextSpecProxy without a RemotePrintJob. r=jimm
widget/nsDeviceContextSpecProxy.cpp
--- a/widget/nsDeviceContextSpecProxy.cpp
+++ b/widget/nsDeviceContextSpecProxy.cpp
@@ -44,23 +44,23 @@ nsDeviceContextSpecProxy::Init(nsIWidget
     return NS_OK;
   }
 
   // nsIPrintSettings only has a weak reference to nsIPrintSession, so we hold
   // it to make sure it's available for the lifetime of the print.
   rv = mPrintSettings->GetPrintSession(getter_AddRefs(mPrintSession));
   if (NS_FAILED(rv) || !mPrintSession) {
     NS_WARNING("We can't print via the parent without an nsIPrintSession.");
-    return rv;
+    return NS_ERROR_FAILURE;
   }
 
   rv = mPrintSession->GetRemotePrintJob(getter_AddRefs(mRemotePrintJob));
   if (NS_FAILED(rv) || !mRemotePrintJob) {
     NS_WARNING("We can't print via the parent without a RemotePrintJobChild.");
-    return rv;
+    return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDeviceContextSpecProxy::GetSurfaceForPrinter(gfxASurface** aSurface)
 {