Commit 30261f9d authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Check RF is alive In PrintRenderFrameHelper::PreviewPageRendered().

Do not take an accessibility snapshot if the RenderFrame is gone.

Bug: 1133983
Change-Id: I612cc72936a1dcedc5180c24eae067e47237b09b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2442375Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812851}
parent e29b319f
......@@ -2467,6 +2467,10 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
"page_number", page_number);
#if BUILDFLAG(ENABLE_TAGGED_PDF)
// Make sure the RenderFrame is alive before taking the snapshot.
if (render_frame_gone_)
snapshotter_.reset();
// For tagged PDF exporting, send a snapshot of the accessibility tree
// along with page 0. The accessibility tree contains the content for
// all of the pages of the main frame.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment