commit | 53e6ce13421870c3c5af21ab14986aeba04f3e4d | [log] [tgz] |
---|---|---|
author | Dave Tapuska <[email protected]> | Fri Aug 06 16:08:24 2021 |
committer | Chromium LUCI CQ <[email protected]> | Fri Aug 06 16:08:24 2021 |
tree | 4b33591e81acb93cf0c7814b110829c0f956dbfb | |
parent | ff598a1edb6a02fb20df43e44963b5eb3a4ff775 [diff] [blame] |
Remove RenderWidgetHostDelegate::ReplicatePageFocus. Don't go through WebContents to replicate the page focus. This can be done directly from the RenderWidgetHostImpl accessing the FrameTree directly. BUG=1237111 Change-Id: I790f508971918b3ffcc8a590326253b28f34acfe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3075661 Commit-Queue: Dave Tapuska <[email protected]> Reviewed-by: Alexander Timin <[email protected]> Cr-Commit-Position: refs/heads/master@{#909321}
diff --git a/content/browser/renderer_host/frame_tree.cc b/content/browser/renderer_host/frame_tree.cc index 4a75ba4..e9ba9287 100644 --- a/content/browser/renderer_host/frame_tree.cc +++ b/content/browser/renderer_host/frame_tree.cc
@@ -574,6 +574,11 @@ } void FrameTree::ReplicatePageFocus(bool is_focused) { + // Focus loss may occur while this FrameTree is being destroyed. Don't + // send the message in this case, as the main frame's RenderFrameHost and + // other state has already been cleared. + if (is_being_destroyed_) + return; std::set<SiteInstance*> frame_tree_site_instances = CollectSiteInstances(this);