The old code assumes that it's OK to use nsAString::BeginWriting() to write
past the string's logical length if the string has enough capacity. This is
bogus, because the string doesn't know of data written past its logical
length.
The BulkWrite API has been created precisely for this purpose and allows
orderly capacity-aware low-level writes to the string.
MozReview-Commit-ID: BYQHl8Z9Fbd
Differential Revision: https://phabricator.services.mozilla.com/D3886
--HG--
extra : moz-landing-system : lando
The old code assumes that it's OK to use nsAString::BeginWriting() to write
past the string's logical length if the string has enough capacity. This is
bogus, because the string doesn't know of data written past its logical
length.
The BulkWrite API has been created precisely for this purpose and allows
orderly capacity-aware low-level writes to the string.
MozReview-Commit-ID: BYQHl8Z9Fbd
Differential Revision: https://phabricator.services.mozilla.com/D3886
--HG--
extra : moz-landing-system : lando