Bug 1273409 - add assert for mFontEntry. r?jrmuizel
MozReview-Commit-ID: 645INbJtJFq
--- 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 &&