Add a range check when restoring tabs in TabListMediator
When user switches between light and dark mode, incognito tabs are dumped and then restored. This exposes a missed range check in TabListMediator. When restoring an incognito tab group, the tab is added to TabModel but corresponding PropertyModel is not yet added to TabListModel, which leads to a temporary async. This async is also exposed in other cases where we try to sync TabListModel with TabModel through restoring, e.g. exiting multi-window mode. This CL fixes this issue. Bug: 1034385, 1034921 Change-Id: I3e712070cb3455a38d43cb7dae74adc68ebf65e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1970735 Commit-Queue: Yue Zhang <yuezhanggg@chromium.org> Reviewed-by:Wei-Yin Chen (陳威尹) <wychen@chromium.org> Cr-Commit-Position: refs/heads/master@{#731567}
Showing
Please register or sign in to comment