зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1697836 - Improve error handling when failing to window.print(). r=emalysz
Ensure we report the error to the web console, and that the print browser gets removed, as that is what will exit the modal state in the page that's printing. Differential Revision: https://phabricator.services.mozilla.com/D109714
This commit is contained in:
Родитель
a6b034109b
Коммит
188f91724f
|
@ -338,7 +338,12 @@ var PrintUtils = {
|
|||
printInitiationTime,
|
||||
printSelectionOnly,
|
||||
printFrameOnly
|
||||
).catch(() => {});
|
||||
).catch(e => {
|
||||
Cu.reportError(e);
|
||||
if (browser) {
|
||||
browser.remove();
|
||||
}
|
||||
});
|
||||
return browser;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче