commit | 6f0f67b38990f13a25fb174d1dbabe4905a84be9 | [log] [tgz] |
---|---|---|
author | Adithya Srinivasan <[email protected]> | Thu Dec 19 01:26:46 2019 |
committer | Commit Bot <[email protected]> | Thu Dec 19 01:26:46 2019 |
tree | b30bed4a33b1521751b4f13fae1349fa8de1bb0c | |
parent | 4a15c894e64e6428de62bc906b109117208fd3dd [diff] [blame] |
Portals: Fix accessibility crash Currently, after activation and adoption, both AX trees for the newly activated page and the portal have their parent_tree_id set to each other, which can lead to a stack overflow when trying to retrieve the root BrowserAccessibilityManager. This CL breaks this cycle by unsetting the parent_tree_id of the detached WebContents' AX tree. Bug: 1033999 Change-Id: Ibd0b6f4f9af28df2795574728800438a7ec5dd12 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972234 Reviewed-by: Lucas Gadani <[email protected]> Reviewed-by: Nasko Oskov <[email protected]> Commit-Queue: Adithya Srinivasan <[email protected]> Cr-Commit-Position: refs/heads/master@{#726194}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index acb1a5fa..4dd67e8 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1844,6 +1844,10 @@ node_.SetFocusedWebContents(this); CreateRenderWidgetHostViewForRenderManager(GetRenderViewHost()); RecursivelyRegisterFrameSinkIds(); + // TODO(adithyas): |browser_plugin_embedder_ax_tree_id| should either not be + // used for portals, or it should get a different name. + GetMainFrame()->set_browser_plugin_embedder_ax_tree_id(ui::AXTreeIDUnknown()); + GetMainFrame()->UpdateAXTreeData(); return web_contents; }