DescriptionUse ExpandToParagraphBoundary in SpellChecker::FindFirstMisspelling
SpellChecker::FindFirstMisspelling searches for the next misspelled word
paragraph-by-paragraph. However, the paragraph boundary finding functions
that it uses are not safe: when trying to find the paragraph containing a
position, the return paragraph does not always contain the input position
due to visible canonicalization and/or other issues. As a result, invalid
ranges are passed to TextIterator, causing a crash.
This patch switches to ExpandToParagraphBoundary, which is a "safe" function
that guarantees to return a range that contains the input position, and fixes
the crash.
BUG=728801
TEST=SpellCheckerTest.AdvanceToNextMisspellingWrapSearchNoCrash
Review-Url: https://codereview.chromium.org/2919883002
Cr-Commit-Position: refs/heads/master@{#476553}
Committed: https://chromium.googlesource.com/chromium/src/+/595784482507ade80774fe371effc58987f8a30e
Patch Set 1 #
Dependent Patchsets: Messages
Total messages: 13 (9 generated)
|