author | Jonathan Kew <jfkthame@gmail.com> |
Thu, 02 Feb 2012 11:24:22 +0000 | |
changeset 86051 | 5e56264ba8aee888e094411a4bff91c7a61fb55b |
parent 86050 | b4508f505db35b1e71372667f058a6c8b0924b06 |
child 86052 | fb8fb19f6161045cb122df98a9114525fd0191a7 |
push id | 5637 |
push user | jkew@mozilla.com |
push date | Thu, 02 Feb 2012 11:24:50 +0000 |
treeherder | mozilla-inbound@5e56264ba8ae [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jdaggett |
bugs | 721315 |
milestone | 13.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -507,17 +507,28 @@ public: mOtherFamilyNamesInitialized(false), mHasOtherFamilyNames(false), mFaceNamesInitialized(false), mHasStyles(false), mIsSimpleFamily(false), 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; } virtual void LocalizedName(nsAString& aLocalizedName); virtual bool HasOtherFamilyNames(); nsTArray<nsRefPtr<gfxFontEntry> >& GetFontList() { return mAvailableFonts; }