DirectWrite shared-font-list code may leak font table references
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(1 file)
If we fail to read font names using GetDirectWriteFaceName in the dwrite backend for the shared font list, we'll fall back to loading the 'name' table with TryGetFontTable and manually extracting names from it.
However, in a couple of places we then fail to release the font table reference, which could result in a leak. (It's possible this is unimportant in practice, if dwrite memory-maps the font file and hands us a constant reference to the mapped data, but we shouldn't assume this.)
Another (theoretical) bug is that in DirectWriteFontInfo::LoadFontFamilyData, we don't check the exists
value returned by TryGetFontTable. This probably can't hurt us in practice, unless directwrite is on the verge of crashing due to resource exhaustion or something, as a font with no 'cmap' will never have been loaded at all, but for correctness we should include the check.
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
bugherder |
Description
•