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
parent 79fce42130
commit 05cc1cb432

View File

@ -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;