Bug 1306715 - Ignore the font whitelist if we're not using a gfxPlatformFontList backend (i.e. using the old Linux/fontconfig backend). r=jrmuizel
authorJonathan Kew <jkew@mozilla.com>
Thu, 06 Oct 2016 21:00:24 +0100
changeset 316845 04fcddb8b0e2bb3ee05f353e01667103e8ebbbe2
parent 316844 6ad9a7fc0a20d8b1669eb68f7edc84ea67ebbd77
child 316846 ffb38910dcae79a05680bdb917ef93e69d6d3a8a
push id32932
push userphilringnalda@gmail.com
push dateFri, 07 Oct 2016 03:24:25 +0000
treeherderautoland@7affb66131bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1306715
milestone52.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
Bug 1306715 - Ignore the font whitelist if we're not using a gfxPlatformFontList backend (i.e. using the old Linux/fontconfig backend). r=jrmuizel
gfx/thebes/gfxUserFontSet.cpp
--- a/gfx/thebes/gfxUserFontSet.cpp
+++ b/gfx/thebes/gfxUserFontSet.cpp
@@ -418,18 +418,18 @@ gfxUserFontEntry::LoadNextSrc()
     // or a download begins successfully
     while (mSrcIndex < numSrc) {
         gfxFontFaceSrc& currSrc = mSrcList[mSrcIndex];
 
         // src local ==> lookup and load immediately
 
         if (currSrc.mSourceType == gfxFontFaceSrc::eSourceType_Local) {
             // Don't look up local fonts if the font whitelist is being used.
-            gfxFontEntry* fe = gfxPlatformFontList::PlatformFontList()->
-                                 IsFontFamilyWhitelistActive() ?
+            gfxPlatformFontList* pfl = gfxPlatformFontList::PlatformFontList();
+            gfxFontEntry* fe = pfl && pfl->IsFontFamilyWhitelistActive() ?
                 nullptr :
                 gfxPlatform::GetPlatform()->LookupLocalFont(currSrc.mLocalName,
                                                             mWeight,
                                                             mStretch,
                                                             mStyle);
             nsTArray<gfxUserFontSet*> fontSets;
             GetUserFontSets(fontSets);
             for (gfxUserFontSet* fontSet : fontSets) {