Closed Bug 1678149 Opened 3 years ago Closed 3 years ago

Stop using std::Queue in TaskQueue

Categories

(Core :: XPCOM, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: KrisWright, Assigned: KrisWright)

Details

Attachments

(1 file, 1 obsolete file)

Right now we are using a std::queue, here: https://searchfox.org/mozilla-central/rev/7b40f0b246ad0b54975b1525811f2ad599b95f33/xpcom/threads/TaskQueue.h#149

This isn't optimal, and per bug 1674299 we should be taking advantage of nsDeque's better behavior and memory reporting in our TaskQueues.

Attached file Bug 1678149 - Use nsDeque in TaskQueue (obsolete) —

Swaps the std::queue holding mTasks for nsDeque and changes the relevant calls.

Assignee: nobody → kwright
Status: NEW → ASSIGNED
Attachment #9192195 - Attachment is obsolete: true

I decided to revisit this and we will probably be using mozilla::Queue instead.

Summary: TaskQueue should use nsDeque instead of std::queue → Stop using std::Queue in TaskQueue

It looks like we can do a mostly direct swap from std::Queue to mozilla::Queue without needing to expose any new API, so that's what I've done here.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: