Closed Bug 1818998 Opened 2 years ago Closed 2 years ago

Rework socket arrays to eliminate manual array management

Categories

(Core :: Networking, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

The socket arrays in nsSocketTransportService are manually managed, which increases the chances of mistakes and makes the code fragile and hard to modify or reason about. This is some of the oldest code in gecko.

Switching them to nsTArrays would be a win.

One thing to avoid performance issues is easy ways to find out if a SocketContext* is a member of an array, or to find the index of so it can be removed in O(1). Implementing a SockIndex() function can solve this.

Assignee: nobody → rjesup
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Attachment #9319936 - Attachment description: WIP: Bug 1818998: Convert nsSocketTransportService polling arrays to nsTArrays r=valentin → Bug 1818998: Convert nsSocketTransportService polling arrays to nsTArrays r=valentin
See Also: → 176919
Pushed by rjesup@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a66f82632b9 Convert nsSocketTransportService polling arrays to nsTArrays r=valentin,necko-reviewers,kershaw
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Backed out for causing leakcheck/assertion failures

Backout link

Push with failures - wpt
Push with failures - Wr

Failure log - wpt
Failure log - Wr

Bug 1822739 seems to be the same underlying issue.

Status: RESOLVED → REOPENED
Flags: needinfo?(rjesup)
Resolution: FIXED → ---
Target Milestone: 113 Branch → ---
Pushed by rjesup@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc84799cb093 Convert nsSocketTransportService polling arrays to nsTArrays r=valentin,necko-reviewers,kershaw

Backed out for causing xpcshell failures in dom/base/test/unit_ipc/*

Pushed by rjesup@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0bb02bf1e60 Convert nsSocketTransportService polling arrays to nsTArrays r=valentin,necko-reviewers,kershaw
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Flags: needinfo?(rjesup)
Regressions: 1824152
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: