gecko-dev/uriloader
Henri Sivonen 3a8d018880 Bug 1487398 - Remove useless use of SetCapacity(). r=froydnj,nwgh
Remove various calls to SetCapacity() that fall into various misuse categories:

 1) Mistakenly believing that the caller should advice the string about zero
    terminator.
 2) Cases where a single append does the right computation on its own.
 3) Calling SetCapacity() with a constant when the string is self-allocated
    and could be an nsAuto[C]StringN and the string doesn't get passed on
    in a way that could benefit from a heap-allocated buffer.
 4) Calling SetCapacity() before assigning a shared buffer to the string.
 5) Calling SetCapacity() before calling a function that will either calls
    SetLength() anyway or calls Adopt().

MozReview-Commit-ID: IKjfl5gLmcD

Differential Revision: https://phabricator.services.mozilla.com/D4672

--HG--
extra : moz-landing-system : lando
2018-09-25 15:36:31 +00:00
..
base Bug 1489257 - Backed out 3 changesets (bug 1441059, bug 1478171) for causing bug 1489257. r=me 2018-09-13 12:27:23 -05:00
exthandler Bug 1487398 - Remove useless use of SetCapacity(). r=froydnj,nwgh 2018-09-25 15:36:31 +00:00
prefetch Bug 1488401 - Remove the remnants of the DiskSpaceWatcher r=asuth,janv,smaug 2018-09-13 06:40:51 +00:00
moz.build