Closed
Bug 1641827
Opened 4 years ago
Closed 4 years ago
nsTArray::RemoveLastElement and TruncateLength are unnecessarily complex
Categories
(Core :: XPCOM, task)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla79
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
Details
Attachments
(1 file)
The implementation of nsTArray::RemoveLastElement
doesn't exploit the static knowledge that only an element at the end of the range is used (and the only necessary safety check is if it is non-empty), but rather uses the generic RemoveElementsAt
method. This can be optimized.
Assignee | ||
Updated•4 years ago
|
Summary: nsTArray::RemoveLastElement is unnecessarily complex → nsTArray::RemoveLastElement and TruncateLength are unnecessarily complex
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
The attached patch now uses TruncateLength
to implement RemoveLastElement
, which suffers from the same issue, and is now changed.
Updated•4 years ago
|
Attachment #9153332 -
Attachment description: Bug 1641827 - Simplify implementations of RemoveLastElement and TruncateLength. r=#xpcom-reviewers → Bug 1641827 - Simplify implementations of RemoveLastElement, PopLastElement and TruncateLength. r=#xpcom-reviewers
Updated•4 years ago
|
Attachment #9153332 -
Attachment description: Bug 1641827 - Simplify implementations of RemoveLastElement, PopLastElement and TruncateLength. r=#xpcom-reviewers → Bug 1641827 - Simplify implementations of RemoveLastElement and TruncateLength. r=#xpcom-reviewers
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5c382a535be2 Simplify implementations of RemoveLastElement and TruncateLength. r=froydnj
Comment 4•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox79:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in
before you can comment on or make changes to this bug.
Description
•