• vogelheim's avatar
    Fix DCHECK on SetBookmark. · 21e6831e
    vogelheim authored
    The DCHECK was a lie. The idea was that - when a bookmark is set -
    the scanner must clearly be at a character boundary and hence the
    bookmark does not need to save a 'partial' UTF-8 code point. The
    first part is true - the Scanner is always at a character boundary -
    but the 'partial' UTF-8 code point is at the end of a block, not at
    the current character position of the Scanner.
    Hence, the 'partial' character needs to be saved as well.
    
    jkummerow: Thanks for noticing.
    
    BUG=chromium:470930
    R=jochen@chromium.org, jkummerow@chromium.org
    LOG=N
    
    Review URL: https://codereview.chromium.org/1154773004
    
    Cr-Commit-Position: refs/heads/master@{#28661}
    21e6831e
scanner-character-streams.h 5.41 KB