Open Bug 1140929 Opened 10 years ago Updated 4 years ago

Have nsPrintJob not block on modal nested event loop for print settings

Categories

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

task

Tracking

()

ASSIGNED

People

(Reporter: mconley, Assigned: jwatt)

References

(Blocks 1 open bug)

Details

(Whiteboard: [print2020])

When the print engine asks for print settings from the user, it calls nsIPrintingPromptService::ShowPrintSettings. For OS X, Windows and Linux GTK, that method blocks, as it opens a modal dialog on each platform. I don't think we can necessarily avoid the fact that GTK, the Windows SDK, and probably Cocoa all require a nested event loop in order to get print settings, but we can refactor nsPrintEngine so that the calls to those blocking native functions occur when nothing else is on the stack. Then, when those blocking calls return, we can call some other function on the nsPrintEngine to continue print execution. That's way safer than spinning a nested event loop with a bunch of printing machinery on the stack. This would also mean that the content process would not need to spin a nested event loop at all when waiting for print settings in the multi-process case.
Assignee: nobody → jwatt
Blocks: 1557645
Severity: normal → N/A
Type: defect → task
Component: Printing → Printing: Setup
Depends on: 1587459
Priority: -- → P2
Product: Toolkit → Core
Hardware: x86 → All
Summary: Have nsPrintEngine not block on modal nested event loop for print settings → Have nsPrintJob not block on modal nested event loop for print settings
Version: 36 Branch → unspecified
Depends on: 1558588
Blocks: 1136280
Blocks: 1631440
Whiteboard: [print2020]
Depends on: 1641733
Depends on: 1641805
Status: NEW → ASSIGNED
Blocks: 1432651
No longer depends on: 1641805

If we only use the new print UI by the time we ship Fission, especially once bug 1653340 lands, this will not be needed. So setting it to not block the Fission meta.

No longer blocks: 1557645

Yes, I'll leave this open for now, but at this point this will most likely be "fixed" by removing the old code once we ship the new UI.

You need to log in before you can comment on or make changes to this bug.