Split slot index calculation into separate functions
The original GetSlotIndexForTabModelIndex served two purposes: getting the slot for an existing tab, and getting the insertion index for a new slot. This splits it into separate methods with common logic remaining in a shared method. The logic had a bug when requesting the first tab of a group while tabs just before it are animating closed. This bug is fixed. To help debug the associated crash, CHECKs are added. Bug: 1138748 Change-Id: I6e0d797bb70e9aa1da813dbf1fecf228290e55b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2515363 Commit-Queue: Collin Baker <collinbaker@chromium.org> Reviewed-by:Taylor Bergquist <tbergquist@chromium.org> Cr-Commit-Position: refs/heads/master@{#824672}
Showing
This diff is collapsed.
Please register or sign in to comment