Bug 1694844 - In nsPrinterListCUPS::SystemDefaultPrinterName return NS_OK even without working CUPS. r=emilio

The other nsPrinterListCUPS methods already handle !InitOkay() without returning an error or rejecting
the promise.

Differential Revision: https://phabricator.services.mozilla.com/D107210
This commit is contained in:
Tom Schuster 2021-03-04 16:03:30 +00:00
Родитель 8d6ebc721c
Коммит 5f997c8d2b
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -875,7 +875,7 @@ var PrintEventHandler = {
let printers;
if (Cu.isInAutomation) {
printers = await Promise.resolve(window._mockPrinters || []);
printers = window._mockPrinters || [];
} else {
try {
printers = await printerList.printers;

Просмотреть файл

@ -180,7 +180,7 @@ nsresult nsPrinterListCUPS::SystemDefaultPrinterName(nsAString& aName) const {
aName.Truncate();
if (!CupsShim().InitOkay()) {
return NS_ERROR_FAILURE;
return NS_OK;
}
// Passing in nullptr for the name will return the default, if any.