Bug 1273409 - add assert for mFontEntry. r=jrmuizel
authorAndi-Bogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Tue, 17 May 2016 12:05:23 +0300
changeset 339543 f4dff50367baf735c7fbeebbe889899d89e4138b
parent 339542 82092aed0171cf6f9073d224c8b766b7bce41c4f
child 339544 023976c4567da8f8d4957a73dde9b8f91ea3350f
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1273409
milestone49.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 1273409 - add assert for mFontEntry. r=jrmuizel MozReview-Commit-ID: 645INbJtJFq
gfx/thebes/gfxUserFontSet.cpp
--- a/gfx/thebes/gfxUserFontSet.cpp
+++ b/gfx/thebes/gfxUserFontSet.cpp
@@ -1300,25 +1300,24 @@ gfxUserFontSet::UserFontCache::Shutdown(
 
 MOZ_DEFINE_MALLOC_SIZE_OF(UserFontsMallocSizeOf)
 
 nsresult
 gfxUserFontSet::UserFontCache::Entry::ReportMemory(nsIMemoryReporterCallback* aCb,
                                                    nsISupports* aClosure,
                                                    bool aAnonymize)
 {
+    MOZ_ASSERT(mFontEntry);
     nsAutoCString path("explicit/gfx/user-fonts/font(");
 
     if (aAnonymize) {
         path.AppendPrintf("<anonymized-%p>", this);
     } else {
-        if (mFontEntry) { // this should always be present
-            NS_ConvertUTF16toUTF8 familyName(mFontEntry->mFamilyName);
-            path.AppendPrintf("family=%s", familyName.get());
-        }
+        NS_ConvertUTF16toUTF8 familyName(mFontEntry->mFamilyName);
+        path.AppendPrintf("family=%s", familyName.get());
         if (mURI) {
             nsCString spec;
             mURI->GetSpec(spec);
             spec.ReplaceChar('/', '\\');
             // Some fonts are loaded using horrendously-long data: URIs;
             // truncate those before reporting them.
             bool isData;
             if (NS_SUCCEEDED(mURI->SchemeIs("data", &isData)) && isData &&