зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8d6ebc721c
Коммит
5f997c8d2b
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче