зеркало из https://github.com/mozilla/gecko-dev.git
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. --HG-- extra : commitid : 6N6PJq4K50q extra : rebase_source : 733c9fac76747bc2a0b177d7b1688e4b673b0e4d extra : amend_source : 3acf505a51930a5ab951028edeadb12352d024cb
This commit is contained in:
Родитель
16c5043427
Коммит
1bf92545fc
|
@ -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()]
|
||||
|
|
Загрузка…
Ссылка в новой задаче