зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1645482 - Don't leak dwrite font table references after reading font names. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D79534
This commit is contained in:
Родитель
d92816473f
Коммит
4a4f4331c2
|
@ -1113,6 +1113,7 @@ void gfxDWriteFontList::GetFacesInitDataForFamily(
|
|||
exists) {
|
||||
gfxFontUtils::ReadCanonicalName(
|
||||
data, size, gfxFontUtils::NAME_ID_POSTSCRIPT, name);
|
||||
dwFontFace->ReleaseFontTable(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1185,6 +1186,7 @@ bool gfxDWriteFontList::ReadFaceNames(fontlist::Family* aFamily,
|
|||
result = SUCCEEDED(ps) && !aPSName.IsEmpty();
|
||||
}
|
||||
}
|
||||
dwFontFace->ReleaseFontTable(context);
|
||||
return result;
|
||||
}
|
||||
return true;
|
||||
|
@ -2092,7 +2094,7 @@ void DirectWriteFontInfo::LoadFontFamilyData(const nsACString& aFamilyName) {
|
|||
hr = dwFontFace->TryGetFontTable(kCMAP, (const void**)&cmapData,
|
||||
&cmapSize, &ctx, &exists);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
if (SUCCEEDED(hr) && exists) {
|
||||
bool cmapLoaded = false;
|
||||
RefPtr<gfxCharacterMap> charmap = new gfxCharacterMap();
|
||||
uint32_t offset;
|
||||
|
|
Загрузка…
Ссылка в новой задаче