зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1699343: Adjust nsPrinterListWin::SystemDefaultPrinterName to make it infallible, like its CUPS-backed eqivalent. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109172
This commit is contained in:
Родитель
5e567c27f5
Коммит
236fbd8307
|
@ -590,10 +590,11 @@ RefPtr<nsIPrinter> nsPrinterListWin::CreatePrinter(PrinterInfo aInfo) const {
|
|||
}
|
||||
|
||||
nsresult nsPrinterListWin::SystemDefaultPrinterName(nsAString& aName) const {
|
||||
if (GetDefaultPrinterName(aName)) {
|
||||
return NS_OK;
|
||||
if (!GetDefaultPrinterName(aName)) {
|
||||
NS_WARNING("Uh oh, GetDefaultPrinterName failed");
|
||||
// Indicate failure by leaving aName untouched, i.e. the empty string.
|
||||
}
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
Загрузка…
Ссылка в новой задаче