Bug 1223002 - Always call ReleaseGrFace to balance GetGrFace, even if the face is null. r=jdaggett

This commit is contained in:
Jonathan Kew 2015-11-20 06:09:59 +00:00
Родитель bfeb9f1127
Коммит 8bec41298a
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -871,8 +871,8 @@ gfxFontEntry::HasGraphiteSpaceContextuals()
const gr_faceinfo* faceInfo = gr_face_info(face, 0);
mHasGraphiteSpaceContextuals =
faceInfo->space_contextuals != gr_faceinfo::gr_space_none;
ReleaseGrFace(face);
}
ReleaseGrFace(face); // always balance GetGrFace, even if face is null
mGraphiteSpaceContextualsInitialized = true;
}
return mHasGraphiteSpaceContextuals;
@ -1051,7 +1051,7 @@ gfxFontEntry::SupportsGraphiteFeature(uint32_t aFeatureTag)
}
gr_face* face = GetGrFace();
result = gr_face_find_fref(face, aFeatureTag) != nullptr;
result = face ? gr_face_find_fref(face, aFeatureTag) != nullptr : false;
ReleaseGrFace(face);
mSupportedFeatures->Put(scriptFeature, result);