DescriptionFixes possible crash in TableView
The sequence leading to the crash is:
. Enable sorting.
. Have more than one selected row.
. Remove one of the selected rows. The removed row must also contain
the anchor.
. Focus the table.
The crash happened because we tried to get the view index for -1.
In general the anchor shouldn't be -1 if there is at least one item in
the selection. The only place anchor could be -1 and there is a
selection is during removal. This patch fixes that.
BUG=480296
TEST=covered by test now.
R=sadrul@chromium.org
Committed: https://crrev.com/def5587881b9878e1b8bb6491db2fc977a7e76f3
Cr-Commit-Position: refs/heads/master@{#329853}
Patch Set 1 #
Messages
Total messages: 6 (1 generated)
|