Closed Bug 1487606 Opened 2 years ago Closed 2 years ago
Literal after Set Capacity() undoes the effect of Set Capacity()
46 bytes, text/x-phabricator-request
|Details | Review|
When mLength == 0, AppendLiteral() ends up calling AssignLiteral(). This is bad if SetCapacity() was called before AppendLiteral() and the caller in good faith assumed that SetCapacity() before a sequence of appends is OK. AppendLiteral() should not call AssignLiteral() if mLength == 0 and the string already has a shared buffer.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Comment on attachment 9005583 [details] Bug 1487606 - Make AppendLiteral() not undo the effect of SetCapacity(). Nathan Froyd [:froydnj] has approved the revision.
Attachment #9005583 - Flags: review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/bf6f5ec86920 Make AppendLiteral() not undo the effect of SetCapacity(). r=froydnj
You need to log in before you can comment on or make changes to this bug.