Closed Bug 1645685 Opened 4 years ago Closed 4 years ago

gfxPlatformFontList::GetOrCreateFontEntry should not re-try calling CreateFontEntry after caching a nullptr (failure) result

Categories

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

79 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

This isn't a crash bug, just a minor inefficiency noticed while reading code... if the CreateFontEntry call in gfxPlatformFontList::GetOrCreateFontEntry fails (returns nullptr), e.g. because of in-flight changes to the available font list, we store the null result in the mFontEntries hashtable; but on a subsequent call, we don't distinguish this from a missing entry, so we'll re-try the (doomed) CreateFontEntry call. We should just return the cached null result instead.

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3c14239c007 Don't re-try font entry creation in gfxPlatformFontList::GetOrCreateFontEntry if we already cached a null result. r=jwatt
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: