Closed Bug 1768554 Opened 2 years ago Closed 2 years ago

Fix thread-safety for callers of gfxFontFamily::GetFontList

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Bug 1756474 added a RWLock to gfxFontFamily, protecting the list of faces, etc. However, the GetFontList method allows callers direct access to the face list, so its callers need to hold the lock for as long as they're using that reference, not just in the actual GetFontList call that returns it.

Callers that use the family's list of fonts need to hold a read lock for as
long as they're accessing the list.

Alternatively, the work can be moved into a gfxFontFamily method that locks
internally.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4d8ceae40f14 Fix thread-safety of gfxFontFamily::GetFontList callers. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: