Closed
Bug 1487606
Opened 6 years ago
Closed 6 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•6 years ago
|
||
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=59e6d610f65984b21000c0d5a67bbdebe461ab6b
Assignee | ||
Comment 2•6 years ago
|
||
MozReview-Commit-ID: I2QSXbQhOUH
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Comment 3•6 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•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bf6f5ec86920
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•3 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•