-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
fix: crash in window.print() #19690
fix: crash in window.print() #19690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this, thanks! it can only be a basic api test but better to avoid situations where code path is accidentally removed.
55c8cf2
to
d341b18
Compare
@deepak1556 the test itself passes but the native printer dialog pops when The |
Can you test with silent code path for |
d341b18
to
919137d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM since we can't UI test this without introducing testing apis in printing code.
Release Notes Persisted
|
I have automatically backported this PR to "7-0-x", please check out #19728 |
Description of Change
Closes #19687.
window.print()
also callsInitPrintSettings
and would not receive the settings received when we callwebContents.print()
so we need to sendPrintHostMsg_GetDefaultPrintSettings
over IPC in that case.cc @jkleinsc @deepak1556
Checklist
npm test
passesRelease Notes
Notes: Fixed a crash in
window.print()
.