Renderer Process Crashes in Print Preview Popup Due to Null Return in GetFrame() During Execution. #41835
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a web page has a button that triggers a print preview popup, and when the popup appears,
clicking the refresh button causes the Renderer process to crash.
If loading_for_print_ is true, GetFrame()->Client()->DispatchDidFinishLoadForPrinting() that after the execution is completed, there is a possibility of GetFrame() returning null.
So after this, it is necessary to determine whether it is empty.
If it is empty, false should be returned.
Bug: 1478487
Change-Id: Ieac77cba80f7c0115dfaea1c0dc3731a5b30dd2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4835376
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194228}