Bug 1307220. Assert font file exists if using default font with skia. r=lsalzman
authorMason Chang <mchang@mozilla.com>
Mon, 10 Oct 2016 16:43:39 -0700
changeset 317478 2af033c15b03b9a16605fb900f1c958797b2dfed
parent 317477 62cf4a7d6007e3f0b1da0f0590c81a17791ec898
child 317479 65c02bf0a79284e7074214484c1f0559c6906491
push id82670
push usermchang@mozilla.com
push dateWed, 12 Oct 2016 01:01:29 +0000
treeherdermozilla-inbound@2af033c15b03 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1307220
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 1307220. Assert font file exists if using default font with skia. r=lsalzman
gfx/thebes/gfxDWriteFonts.cpp
--- a/gfx/thebes/gfxDWriteFonts.cpp
+++ b/gfx/thebes/gfxDWriteFonts.cpp
@@ -105,17 +105,17 @@ gfxDWriteFont::gfxDWriteFont(gfxFontEntr
 
     mFont = fe->GetFont();
     if (!mFont) {
         gfxPlatformFontList* fontList = gfxPlatformFontList::PlatformFontList();
         gfxDWriteFontFamily* defaultFontFamily =
             static_cast<gfxDWriteFontFamily*>(fontList->GetDefaultFont(aFontStyle));
 
         mFont = defaultFontFamily->GetDefaultFont();
-        NS_WARNING("Using default font");
+        MOZ_ASSERT(mFont);
     }
 
     HRESULT hr = mFont->GetFontFamily(getter_AddRefs(mFontFamily));
     if (FAILED(hr)) {
         MOZ_ASSERT(false);
     }
 
     ComputeMetrics(anAAOption);