fixes widget host fetching from render view host (#20239)

This commit is contained in:
Gellert Hegyi 2019-09-19 11:47:12 +02:00 committed by Cheng Zhao
parent ffe2182883
commit 3f5833ce5d

View file

@ -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<content::RenderWidgetHostImpl*>(
render_view_host->GetWidget());
if (impl)
impl->disable_hidden_ = !background_throttling_;
}