Bug 1139646 - Ensure gfxHarfBuzzShaper only loads the vmtx table once, to avoid leaking it. r=smontagu

This commit is contained in:
Jonathan Kew 2015-03-12 10:03:09 +00:00
Родитель 79fce42130
Коммит 05cc1cb432
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -1247,6 +1247,13 @@ gfxHarfBuzzShaper::LoadHmtxTable()
bool
gfxHarfBuzzShaper::InitializeVertical()
{
// We only try this once. If we don't have a mHmtxTable after that,
// this font can't handle vertical shaping, so return false.
if (mVerticalInitialized) {
return mHmtxTable != nullptr;
}
mVerticalInitialized = true;
if (!mHmtxTable) {
if (!LoadHmtxTable()) {
return false;