Bug 1554208 - patch 1 - Add missing checks for shared charmap. r=jwatt

This isn't really specific to the FT2 fontlist, it's a general fixup that I noticed while
working on this. (The missing checks aren't crucial, but mean that we might re-read a cmap
when we shouldn't need to.)

Differential Revision: https://phabricator.services.mozilla.com/D36106

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jonathan Kew 2019-07-12 15:32:05 +00:00
Родитель 29f92afa77
Коммит 21b4c1cf5a
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -166,9 +166,10 @@ bool gfxFontEntry::TestCharacterMap(uint32_t aCh) {
nsresult gfxFontEntry::InitializeUVSMap() {
// mUVSOffset will not be initialized
// until cmap is initialized.
if (!mCharacterMap) {
if (!mCharacterMap && !mShmemCharacterMap) {
ReadCMAP();
NS_ASSERTION(mCharacterMap, "failed to initialize character map");
NS_ASSERTION(mCharacterMap || mShmemCharacterMap,
"failed to initialize character map");
}
if (!mUVSOffset) {