mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
bug 721315 - avoid potential dangling mFamily pointers in font entries. r=jdaggett
This commit is contained in:
parent
852d8048cb
commit
ff28e61222
@ -512,7 +512,18 @@ public:
|
||||
mIsBadUnderlineFamily(false)
|
||||
{ }
|
||||
|
||||
virtual ~gfxFontFamily() { }
|
||||
virtual ~gfxFontFamily() {
|
||||
// clear Family pointers in our faces; the font entries might stay
|
||||
// alive due to cached font objects, but they can no longer refer
|
||||
// to their families.
|
||||
PRUint32 i = mAvailableFonts.Length();
|
||||
while (i) {
|
||||
gfxFontEntry *fe = mAvailableFonts[--i];
|
||||
if (fe) {
|
||||
fe->SetFamily(nsnull);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const nsString& Name() { return mName; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user