Chromium Code Reviews
Description[Extensions] Reduce string copy in renderer/ UserScript.
Before passing StringPiece script (JS/CSS) content to blink (to create
WebString or WebScriptSource), we sometimes unnecessarily created
std::string. This CL removes the intermediate state.
Greasemonkey scripts still require the intermediate std::string to
pad it with header and tail though. Use reserve and
StringPiece.appendToString() in that case to at least do that
efficiently.
BUG=622464
Test=No visible change.
Committed: https://crrev.com/49cc0b3a4e425a884a0b12639951f84b4f84f693
Cr-Commit-Position: refs/heads/master@{#412946}
Patch Set 1 #
Total comments: 8
Patch Set 2 : fix typo #Patch Set 3 : address comments #
Messages
Total messages: 16 (10 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||