Chromium Code Reviews
DescriptionAdd StringView constructor that takes a ref to save a branch in CSSTokenizerInputStream::rangeAt.
CSSTokenizerInputStream never has a null m_string so the null check in StringView's
constructor is just waste. It also makes the code bigger if we were to inline the
function since we need both the null (clear()) and the non-null (set()) code from
StringView.
Lets introduce a StringView constructor set that takes a StringImpl& and then
use it in CSSTokenizerInputStream::rangeAt() allowing us to skip the branch.
I then also made the function inline.
BUG=615174, 605792
Committed: https://crrev.com/9d4b30269e660985f657126b21e7ace229ec2e07
Cr-Commit-Position: refs/heads/master@{#406375}
Patch Set 1 #Patch Set 2 : typo. #
Messages
Total messages: 18 (12 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||