Closed Bug 1643289 Opened 9 months ago Closed 9 months ago

nsTPriorityQueue should make better use of move semantics

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: sg, Assigned: sg)

Details

Attachments

(2 files)

nsTPriorityQueue is unnecessarily copyable (it is only copied in tests), and also unnecessarily copies its elements when they could be moved.

Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED

Also remove redundant check in Push method on result of infallible operation,
and change its return type to void.

Depends on D78248

Attachment #9154131 - Attachment description: Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. r-froydnj → Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them.
Attachment #9154131 - Attachment description: Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. → Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. r-froydnj
Attachment #9154131 - Attachment description: Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. r-froydnj → Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. r=froydnj
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9447ea8910aa
Make nsTPriorityQueue non-copyable and remove use of CopyableTArray. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/98c420f73380
Move elements where possible in nsTPriorityQueue instead of copying them. r=froydnj
Flags: needinfo?(sgiesecke)
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a3b3ffcc8be7
Make nsTPriorityQueue non-copyable and remove use of CopyableTArray. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/f8faae6114e0
Move elements where possible in nsTPriorityQueue instead of copying them. r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.