Fix crash when deleting a tab group and moving a tab at the same time.
If the only tab in a group is added to another group in a way that causes that tab to move (e.g. there is an intervening ungrouped tab) then we will crash. This is caused by TabStripModel setting the new group on WebContentsData and then sending the kMoved notification before the kGroupChanged notification. TabStripLayoutHelper::MoveTab expects the group of the tab being moved is not empty according to the model. This patch fixes the bug by sending kGroupChanged immediately after setting the group on WebContentsData, so TabStrip will delete the old group immediately. Bug: 983961 Change-Id: Ib214a1b7a82f5958e48310477ba9c63d832e3095 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1753059 Commit-Queue: Bret Sepulveda <bsep@chromium.org> Reviewed-by:Peter Boström <pbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#686670}
Showing
Please register or sign in to comment