remove null-checks on the result of gfxFontGroup::GetFirstValidFont

RESOLVED FIXED in mozilla35

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla35
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Many callers of gfxFontGroup::GetFirstValidFont() just use the returned pointer directly (e.g. dereferencing it to call methods on the gfxFont).

This is safe because GetFirstValidFont() will always return a valid font -- unless we end up at the NS_RUNTIMEABORT in gfxFontGroup::GetDefaultFont().

Hence, we should clean up the remaining callsites that use GetFirstValidFont() and then check the result for nullptr (and do an early return, or whatever) before trying to use it.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8499564 - Flags: review?(jdaggett) → review+
https://hg.mozilla.org/mozilla-central/rev/af19f500d78b
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.