Closed Bug 1657363 Opened 4 years ago Closed 4 years ago

Convert nsIPrinterList.printers to a Promise so getting the printers doesn't block

Categories

(Core :: Printing: Setup, task, P1)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jwatt, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Whiteboard: [print2020_v81])

Attachments

(3 files)

No description provided.
Depends on: 1657874

I intentionally removed the "move the default printer to the front" in
windows because that's not a guarantee that we provide in CUPS, but lmk
if you want it back.

I have zero idea about why the GlobalPrinters code was so ridiculously
complex.

Depends on D86396

Two things change:

  • The main API change (.printers being async), with a bit of uglyness
    because XPCOM (which makes us call QueryInterface by hand).

  • lastUsedPrinterName no longer iterates the name of printers
    internally to guarantee it's valid, so we need to do that in the
    front-end.

Depends on D86397

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d169b0364036 Make initializing the CUPS shim safe from multiple threads. r=jwatt
Keywords: leave-open
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/e5eb146b8ba1 Fix Linux / OSX builds without the remaining patches.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/110aeee7685a Make nsIPrinterList.printers return a promise. r=jwatt https://hg.mozilla.org/integration/autoland/rev/f20f7b416063 Front-end tweaks. r=jwatt
Regressions: 1658220
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/66f136997990 Workaround static analysis that doesn't understand that array<void*, N> is memmovable.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
No longer regressions: 1658084
Target Milestone: --- → 81 Branch
Regressions: 1658084
Regressions: 1668621
Regressions: 1674929
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: