Last Comment Bug 745261 - check calls to SetupCairoFont for failure
: check calls to SetupCairoFont for failure
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics: Text (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-13 11:14 PDT by Jonathan Kew (:jfkthame)
Modified: 2012-04-18 05:11 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch, bail out of whatever we're doing if SetupCairoFont fails (5.03 KB, patch)
2012-04-13 11:14 PDT, Jonathan Kew (:jfkthame)
jd.bugzilla: review+
Details | Diff | Splinter Review

Description Jonathan Kew (:jfkthame) 2012-04-13 11:14:53 PDT
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.
Comment 1 John Daggett (:jtd) 2012-04-13 23:27:08 PDT
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.
Comment 2 Jonathan Kew (:jfkthame) 2012-04-14 01:40:50 PDT
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.
Comment 4 Marco Bonardo [::mak] (Away 6-20 Aug) 2012-04-18 05:11:34 PDT
https://hg.mozilla.org/mozilla-central/rev/e5cd53eb0cf9

Note You need to log in before you can comment on or make changes to this bug.