Fix DCHECK conditions for GetSubstringBounds(...)
This CL is fixing the DCHECK for GetSubstringBounds(...) which was detected to fail sometime on albatros build. 1) Use IsBoundedBy(...) instead of Contains(...) The first problem was cause by the range [end,end) which is not considered to be part of the range (a.k.a Contains(....) will return false). IsBoundedBy accepts the empty ending range to be part of the range. 2) Some eliding behaviors may break the mapping between text indexes and display text indexes. The new check implementation is ensuring that eliding is not causing any invalid offsets. We are expecting clusterfuzz to hit these DCHECKs until it's fixed. R=gab@chromium.org, msw@chromium.org Bug: 1146674, 1085014 Change-Id: I219ef476009fc85edb7b836d5143022f51ecb8e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521252Reviewed-by:Michael Wasserman <msw@chromium.org> Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Cr-Commit-Position: refs/heads/master@{#826022}
Showing
Please register or sign in to comment