зеркало из https://github.com/mozilla/gecko-dev.git
3a8d018880
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 |
||
---|---|---|
.. | ||
base | ||
build | ||
cache | ||
cache2 | ||
cookie | ||
dns | ||
ipc | ||
locales | ||
mime | ||
protocol | ||
sctp | ||
socket | ||
srtp | ||
streamconv | ||
system | ||
test | ||
wifi | ||
moz.build | ||
necko-config.h.in |