Closed
Bug 1487606
Opened 7 years ago
Closed 7 years ago
AppendLiteral after SetCapacity() undoes the effect of SetCapacity()
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla63
| Tracking | Status | |
|---|---|---|
| firefox63 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
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 | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
MozReview-Commit-ID: I2QSXbQhOUH
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Comment 3•7 years ago
|
||
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 hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf6f5ec86920
Make AppendLiteral() not undo the effect of SetCapacity(). r=froydnj
Comment 5•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•5 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•