Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-05-22 15:26:11 +08:00
commit f8f3b3ee43
6 changed files with 38 additions and 22 deletions

View file

@ -860,6 +860,10 @@ gfxFont::gfxFont(gfxFontEntry *aFontEntry, const gfxFontStyle *aFontStyle,
++gFontCount;
#endif
mKerningSet = HasFeatureSet(HB_TAG('k','e','r','n'), mKerningEnabled);
// Ensure the gfxFontEntry's unitsPerEm and extents fields are initialized,
// so that GetFontExtents can use them without risk of races.
Unused << mFontEntry->UnitsPerEm();
}
gfxFont::~gfxFont()

View file

@ -520,8 +520,9 @@ ShareTableAndGetBlob(nsTArray<uint8_t>&& aTable,
mSharedBlobData, DeleteFontTableBlobData);
if (mBlob == hb_blob_get_empty() ) {
// The FontTableBlobData was destroyed during hb_blob_create().
// The (empty) blob is still be held in the hashtable with a strong
// The (empty) blob will still be held in the hashtable with a strong
// reference.
mSharedBlobData = nullptr;
return hb_blob_reference(mBlob);
}