check calls to SetupCairoFont for failure

RESOLVED FIXED in mozilla14

Status

()

Core
Graphics: Text
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 614862 [details] [diff] [review]
patch, bail out of whatever we're doing if SetupCairoFont fails

We have a number of places where we call gfxFont::SetupCairoFont(context) and then proceed on the assumption that the font has indeed been set up properly. We should check those calls for failure (the method returns a success/failure bool), and just bail out if something went wrong.
Attachment #614862 - Flags: review?(jdaggett)

Comment 1

5 years ago
Comment on attachment 614862 [details] [diff] [review]
patch, bail out of whatever we're doing if SetupCairoFont fails

This seems fine but I think the warning should take place everywhere
SetupCairoFont fails, for example in the several calls within various
ShapeWord methods.  I don't like the idea of failing quietly in some places.
(Assignee)

Comment 2

5 years ago
I didn't add those in all places because if ShapeWord returns false, its callers (e.g. gfxFont::GetShapedWord) already log a warning, so it seemed excessive amount to warn from within it as well.

Updated

5 years ago
Attachment #614862 - Flags: review?(jdaggett) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e5cd53eb0cf9
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/e5cd53eb0cf9
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.