diff --git a/shell/browser/api/atom_api_web_contents.cc b/shell/browser/api/atom_api_web_contents.cc index 50b51b35e754..98425aaa6cf2 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_; }