Chromium Code Reviews
        
  DescriptionFix vector resize logic when encoding non-BMP chars to latin1 as ?s
Since non-BMP characters take two UChars, when encoding to latin1 with
replacement characters ('?') may result the output being shorter than
the input. The encoding logic assumed the replacement would always be
larger, and vectors don't like being shrunk. Correct the logic and
make it more readable, add tests.
BUG=661367
R=tkent@chromium.org
Committed: https://crrev.com/9d2d2e8409c21feca88979245ce75f9ac4a00f05
Cr-Commit-Position: refs/heads/master@{#429610}
   
  Patch Set 1 #Patch Set 2 : Add test with LChars #Patch Set 3 : minor optmization #Patch Set 4 : rebased #
 Dependent Patchsets: Messages
    Total messages: 20 (12 generated)
     
  
  
       | 
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||