From f9acfc22520d984296237659ab300bbb48599835 Mon Sep 17 00:00:00 2001 From: CezaryKulakowski <50166166+CezaryKulakowski@users.noreply.github.com> Date: Thu, 26 Mar 2020 20:54:11 +0100 Subject: [PATCH] fix: don't try to hide host which has set flag disable_hidden_ (#22832) Lack of this change will lead to freeze after call to hide/show on window which has set flag disable_hidden_. To reproduce the problem it's necessary to create some number of windows (how many it depends on number of windows being cached by Chromium's FrameEvictionManager). --- patches/chromium/disable_hidden.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index ff93578efc4b..731aab56c412 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -33,3 +33,17 @@ index 26cf559d4a39307524432947627369c440a76929..b638b04444f36c5cac534e99891858f7 void set_hung_renderer_delay(const base::TimeDelta& delay) { hung_renderer_delay_ = delay; } + +diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc +index 3e2190700aee..0ccdaa8d037c 100644 +--- a/content/browser/renderer_host/render_widget_host_view_aura.cc ++++ b/content/browser/renderer_host/render_widget_host_view_aura.cc +@@ -692,7 +692,7 @@ void RenderWidgetHostViewAura::HideImpl() { + DCHECK(visibility_ == Visibility::HIDDEN || + visibility_ == Visibility::OCCLUDED); + +- if (!host()->is_hidden()) { ++ if (!host()->is_hidden() && !host()->disable_hidden_) { + host()->WasHidden(); + aura::WindowTreeHost* host = window_->GetHost(); + if (delegated_frame_host_) {