Closed Bug 1841586 Opened 2 years ago Closed 2 years ago

The resulting order of mFilters after nsProtocolProxyService::InsertFilterLink can be unstable

Categories

(Core :: Networking, defect)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: jstutte, Assigned: jstutte)

References

Details

Attachments

(1 file)

It seems that at least test_cert_info.js depends (also) on the insertion order into mFilters to succeed.

In fact, bug 1152332 switched from a linked list (with stable behavior) to nsTArray<>::Sort which is based on NS_QuickSort and thus not stable in general (but apparently sufficiently stable for that specific test that has been added later).

In the attempt to switch nsTArray<>::Sort to std::sort, the test begins to fail. Using nsTArray<>::StableSort seems to fix it again.

Summary: The resulting order of mFilters after nsProtocolProxyService::InsertFilterLink can be indterministic → The resulting order of mFilters after nsProtocolProxyService::InsertFilterLink can be unstable
See Also: → 1841591
Blocks: 1839051
Assignee: nobody → jstutte
Status: NEW → ASSIGNED
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/458df295b234 Use InsertElementSorted instead of nsTArray::Sort in nsProtocolProxyService::InsertFilterLink. r=necko-reviewers,kershaw
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: