 Chromium Code Reviews
 Chromium Code Reviews Issue 
            101513002:
    Add new helper VTTParser::collectDigitsToInt  (Closed)
    
  
    Issue 
            101513002:
    Add new helper VTTParser::collectDigitsToInt  (Closed) 
  | DescriptionAdd new helper VTTParser::collectDigitsToInt
Since most uses of VTTParser::collectDigits is followed by a call to
String::toInt on the resulting string, add this new helper with the
aim of later removing the temporary string construction.
Handle overflow in the string-to-int conversion by means of saturation.
(The latter is the intended change of semantics.)
Replace uses of collectDigits with collectDigitsToInt where applicable.
After doing this, there remain no callers to collectDigits outside of
VTTParser, so make the function static.
Also move VTTParser::skipWhiteSpace "textually" to group it with the other
'scanning' functions, and make it static since it does not depend on any
VTTParser state.
BUG=305317
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=163098
   Patch Set 1 #Patch Set 2 : Rebased #
      Total comments: 2
      
     
 Messages
    Total messages: 7 (0 generated)
     | ||||||||||||||||||||||||||||||||||||||||||||||