From 3f5833ce5da488870e2de77b3f7f3e3d9733960c Mon Sep 17 00:00:00 2001 From: Gellert Hegyi <93.morph@gmail.com> Date: Thu, 19 Sep 2019 11:47:12 +0200 Subject: [PATCH] fixes widget host fetching from render view host (#20239) --- shell/browser/api/atom_api_web_contents.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/browser/api/atom_api_web_contents.cc b/shell/browser/api/atom_api_web_contents.cc index 50b51b35e75..98425aaa6cf 100644 --- a/shell/browser/api/atom_api_web_contents.cc +++ b/shell/browser/api/atom_api_web_contents.cc @@ -844,9 +844,8 @@ void WebContents::BeforeUnloadFired(bool proceed, } void WebContents::RenderViewCreated(content::RenderViewHost* render_view_host) { - auto* const impl = content::RenderWidgetHostImpl::FromID( - render_view_host->GetProcess()->GetID(), - render_view_host->GetRoutingID()); + auto* impl = static_cast( + render_view_host->GetWidget()); if (impl) impl->disable_hidden_ = !background_throttling_; }