Bug 1199434 - [e10s] Print preview doesn't show alert if printer was't found.
So the way things currently are, if the print engine detects an error
in any number of places, it'll call nsPrintEngine::ShowPrintErrorDialog
passing in an nsresult, which gets converted into a string and then a
dialog is opened showing that string.
In the content process, we can't open dialogs.
This printing stuff still needs to work in the other XUL apps though,
like Thunderbird and SeaMonkey, where they don't need to worry about
multiple processes.
So what do we do about these error dialogs?
Assuming we want to keep them, they'll need to be opened in the parent process.
Is it possible to make it so that printUtils is responsible for showing the error dialogs?
One idea is to have nsPrintEngine send a message to the global message
manager, and then the parent (or the in-process parent) picks it up in
printUtils.js to display the error.
I think I'll go that route if I can.
Ok, I have a patch up, and it seems to work… I'd like to test it with
each error message type, if I can… also, I should do a try build to make
sure it actually solves the problem originally reported.
Alrighty - patch written. Pretty happy with it. I think it makes a lot
more sense to have PrintUtils be responsible for alerting about errors
in printing, etc.