зеркало из https://github.com/mozilla/pjs.git
[ps] Need better error handling when lp not defined
bug=102276 r=Roland.Mainz@informatik.med.uni-giessen.de sr=bzbarsky
This commit is contained in:
Родитель
a208cf90f0
Коммит
37a3ac34c2
|
@ -373,12 +373,12 @@ NS_IMETHODIMP nsDeviceContextPS::EndDocument(void)
|
|||
NS_ENSURE_TRUE(mPSObj != nsnull, NS_ERROR_NULL_POINTER);
|
||||
|
||||
/* Finish the document and print it... */
|
||||
mPSObj->end_document();
|
||||
nsresult rv = mPSObj->end_document();
|
||||
|
||||
delete mPSObj;
|
||||
mPSObj = nsnull;
|
||||
|
||||
return NS_OK;
|
||||
return rv;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#include "prenv.h"
|
||||
|
||||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef VMS
|
||||
#include <stdlib.h>
|
||||
|
@ -2120,6 +2121,9 @@ nsPostScriptObj::end_document()
|
|||
|
||||
pclose(pipe);
|
||||
PR_LOG(nsPostScriptObjLM, PR_LOG_DEBUG, ("piping done, copied %ld bytes.\n", job_size));
|
||||
if (errno != 0) {
|
||||
return NS_ERROR_GFX_PRINTER_CMD_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче