Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash during counters attachment
Counters stack can be empty when we do LeaveElement, instead of DCHECK, check it in if and just leave function. DCHECK was hit when there is some li without ol/ul element at first that create ListOrdinal, but after it in the tree there is another li that is not sibling or descendant of previous li and doesn't have ListOrdinal. In this case second li would remove first one during RemoveStaleCounters, and later would try to remove itself during RemoveCounterIfAncestorExists, assuming that it created the counter itself. Fixed: 339592908, 339641168 Change-Id: I09caa992256bba4e4844b3d0943f6d6c7047f6a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526739 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1299205}
- Loading branch information