From e71a6003b6a758052ecc67d97a30a81c1dda56fb Mon Sep 17 00:00:00 2001 From: Netzenbot Date: Wed, 1 Apr 2026 10:10:25 -0400 Subject: [PATCH] Fix AppInfoDialogBrowserTest.InvokeUi_default failure (#35115) Brave's tab_data.cc override was incorrectly marking all UNLOADED tabs as having discard status, including tabs that had never loaded (e.g. during browser initialization). This triggered TabIcon to attempt showing the IPH_DiscardRing promo before the browser's user education interface was initialized, causing a LOG(ERROR) and test failure on Windows ASAN builds. The fix adds a WasDiscarded() check so only tabs that were actually discarded get the discard status indicator, not tabs that simply haven't loaded yet. Resolves https://github.com/brave/brave-browser/issues/54037 --- chromium_src/chrome/browser/ui/tabs/tab_data.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chromium_src/chrome/browser/ui/tabs/tab_data.cc b/chromium_src/chrome/browser/ui/tabs/tab_data.cc index 3cc1c2ff433..131c1ee067e 100644 --- a/chromium_src/chrome/browser/ui/tabs/tab_data.cc +++ b/chromium_src/chrome/browser/ui/tabs/tab_data.cc @@ -101,8 +101,10 @@ TabData TabData::FromTabInterface(tabs::TabInterface* tab) { } } - // Show which tabs are unloaded. - if (!data.should_show_discard_status) { + // Show which tabs are unloaded due to being discarded. Only mark tabs that + // were actually discarded (WasDiscarded), not tabs that simply haven't loaded + // yet (e.g. during browser initialization). + if (!data.should_show_discard_status && contents->WasDiscarded()) { const auto loading_state = resource_coordinator::TabLoadTracker::Get()->GetLoadingState(contents); if (loading_state ==