mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 00:11:44 +00:00
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:
parent
5e567c27f5
commit
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user