Closed
Bug 1077371
Opened 11 years ago
Closed 11 years ago
remove null-checks on the result of gfxFontGroup::GetFirstValidFont
Categories
(Core :: Graphics: Text, defect)
Core
Graphics: Text
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: jfkthame, Assigned: jfkthame)
Details
Attachments
(1 file)
|
3.63 KB,
patch
|
jtd
:
review+
|
Details | Diff | Splinter Review |
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 | ||
Comment 1•11 years ago
|
||
Attachment #8499564 -
Flags: review?(jdaggett)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Updated•11 years ago
|
Attachment #8499564 -
Flags: review?(jdaggett) → review+
| Assignee | ||
Comment 2•11 years ago
|
||
Target Milestone: --- → mozilla35
Comment 3•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•