add check

This commit is contained in:
George Xu
2024-06-25 13:51:40 -07:00
parent 4e38a1353f
commit f19534f549

View File

@@ -10,14 +10,15 @@ This is due to a bug in `disable_hidden.patch`- a detailed writeup can be found
https://github.com/electron/electron/issues/42378
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 2db3239303d59677384cfb6eeb5cdd101c7d6d5c..75d278e4c440c584ddf18581ae1843c2d0e1f944 100644
index 2db3239303d59677384cfb6eeb5cdd101c7d6d5c..0e7269e419017637a1ff9011cc91098d02402aa6 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -570,7 +570,7 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
@@ -570,7 +570,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
// which updates `visibility_`, unless the host is hidden. Make sure no update
// is needed.
- if (host_->is_hidden() || visibility_ == Visibility::VISIBLE)
+ CHECK(host_->is_hidden() || host()->disable_hidden_);
+ if (host_->is_hidden() || host()->disable_hidden_ || visibility_ == Visibility::VISIBLE)
OnShowWithPageVisibility(page_visibility);
}