Skip to content

126.0.6468.2

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.

(cherry picked from commit 2b14e077564342c0e6705a41c181756ba33da623)

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-Original-Commit-Position: refs/heads/main@{#1299205}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5532111
Owners-Override: Prudhvikumar Bommana <pbommana@google.com>
Reviewed-by: Prudhvikumar Bommana <pbommana@google.com>
Commit-Queue: Prudhvikumar Bommana <pbommana@google.com>
Cr-Commit-Position: refs/branch-heads/6468@{#4}
Cr-Branched-From: 9a70062b5f57a442f726c98ab55c2aa6217eec8d-refs/heads/main@{#1298436}
Assets 2