Skip to content

merge_pr_46200

Compare
Choose a tag to compare
@github-actions github-actions released this 10 May 14:55

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}