Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print: Make the firefox printing code able to fail and be re-invoked. #12315

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Sep 2, 2020

This fixes a set of issues described in Mozilla bug 16624261.

In particular, once the print callback fails once (because the printing
operation has been canceled in Gecko / replaced by a newer one, for example) it
can't be re-invoked.

This patch fixes it by properly cancelling the render task if it throws, or if
the print callback is called again while ongoing.

Copy link
Contributor

@brendandahl brendandahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ with comment

web/firefox_print_service.js Show resolved Hide resolved
This fixes a set of issues described in Mozilla bug 1662426[1].

In particular, once the print callback fails once (because the printing
operation has been canceled in Gecko / replaced by a newer one, for example) it
can't be re-invoked.

This patch fixes it by properly cancelling the render task if it throws, or if
the print callback is called again while ongoing.

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1662426
@emilio
Copy link
Contributor Author

emilio commented Sep 2, 2020

I added a comment, let me know if you want me to tweak it :)

@emilio emilio force-pushed the more-resilient-print-callback branch from b92fad4 to f4f4ec3 Compare September 2, 2020 20:56
@brendandahl brendandahl merged commit 84da13b into mozilla:master Sep 2, 2020
@emilio emilio deleted the more-resilient-print-callback branch September 2, 2020 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants