Bug 1505966 - Bail out of using DWrite fonts if we failed to get the system collection. r=lsalzman
authorJonathan Kew <jkew@mozilla.com>
Fri, 09 Nov 2018 09:11:14 +0000
changeset 504726 bc98d56f87c1d5de58391b03614d1b9eadbea9fc
parent 504725 3c160322e8464ee5b2c970e4d83a3eff877508dd
child 504727 9f3a4b1398fea1c7b3e191391451ea50ece6d225
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1505966
milestone65.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 1505966 - Bail out of using DWrite fonts if we failed to get the system collection. r=lsalzman
gfx/thebes/gfxDWriteFontList.cpp
--- a/gfx/thebes/gfxDWriteFontList.cpp
+++ b/gfx/thebes/gfxDWriteFontList.cpp
@@ -1067,17 +1067,17 @@ gfxDWriteFontList::InitFontListForPlatfo
         return NS_ERROR_FAILURE;
     }
 
     QueryPerformanceCounter(&t2); // base-class/interop initialization
 
     mSystemFonts = Factory::GetDWriteSystemFonts(true);
     NS_ASSERTION(mSystemFonts != nullptr, "GetSystemFontCollection failed!");
 
-    if (FAILED(hr)) {
+    if (!mSystemFonts) {
         Telemetry::Accumulate(Telemetry::DWRITEFONT_INIT_PROBLEM,
                               uint32_t(errSystemFontCollection));
         return NS_ERROR_FAILURE;
     }
 
     QueryPerformanceCounter(&t3); // system font collection
 
     GetFontsFromCollection(mSystemFonts);