Skip to content

Commit

Permalink
[CrashFix] Add invalid tab id check
Browse files Browse the repository at this point in the history
Add invalid tab id check.
-Believe this was getting triggered when undoing a tab closure on the
 a11y list switcher.

(cherry picked from commit 2e949b3)

Bug: 1433347
Change-Id: I47b1907474423cce8f52710a35d66ccc142e0184
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4581212
Auto-Submit: Neil Coronado <nemco@google.com>
Commit-Queue: Neil Coronado <nemco@google.com>
Reviewed-by: Theresa Sullivan <twellington@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1152158}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4599214
Cr-Commit-Position: refs/branch-heads/5790@{#467}
Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
  • Loading branch information
Neil Coronado authored and Chromium LUCI CQ committed Jun 7, 2023
1 parent 8de7797 commit 4b0982a
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -565,7 +565,9 @@ public void didSelectTab(Tab tab, int type, int lastId) {
// undo, identify the related TabIds and determine newIndex based on if any of
// the related ids are present in model.
newIndex = getIndexForTabWithRelatedTabs(tab);
model.updateTabListModelIdForGroup(tab, newIndex);
if (newIndex != Tab.INVALID_TAB_ID) {
model.updateTabListModelIdForGroup(tab, newIndex);
}
}

mLastSelectedTabListModelIndex = oldIndex;
Expand Down

0 comments on commit 4b0982a

Please sign in to comment.