mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1181630 - Do not fail out if there are no registered printers when printing with e10s on OS X. r=mstange.
We were being overly cautious, and returning NS_ERROR_FAILURE if the printer name passed up from the content process didn't map to an existing system printer. The problem with that is that sometimes there are no registered printers. In that case, we just need to not set the printer in the NSPrintInfo. So in the event that we cannot find a printer with the name that the child sent up, we just leave the printer and printer name fields on the NSPrintInfo blank.
This commit is contained in:
parent
c7df0e679c
commit
28ba8b19bc
@ -146,11 +146,10 @@ nsPrintOptionsX::DeserializeToPrintSettings(const PrintData& data,
|
||||
NSString* printerName = nsCocoaUtils::ToNSString(data.printerName());
|
||||
if (printerName) {
|
||||
NSPrinter* printer = [NSPrinter printerWithName: printerName];
|
||||
if (NS_WARN_IF(!printer)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
if (printer) {
|
||||
[newPrintInfoDict setObject: printer forKey: NSPrintPrinter];
|
||||
[newPrintInfoDict setObject: printerName forKey: NSPrintPrinterName];
|
||||
}
|
||||
[newPrintInfoDict setObject: printer forKey: NSPrintPrinter];
|
||||
[newPrintInfoDict setObject: printerName forKey: NSPrintPrinterName];
|
||||
}
|
||||
|
||||
[newPrintInfoDict setObject: [NSNumber numberWithInt: data.numCopies()]
|
||||
|
Loading…
Reference in New Issue
Block a user