зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1458003 - speculative fix: make a local copy of the face list in CheckForLegacyFamilyNames, in case mAvailableFonts is mutated during this function. r=lsalzman
This commit is contained in:
Родитель
734a1bb77d
Коммит
e6b971d44f
|
@ -2003,7 +2003,10 @@ gfxFontFamily::CheckForLegacyFamilyNames(gfxPlatformFontList* aFontList)
|
|||
mCheckedForLegacyFamilyNames = true;
|
||||
bool added = false;
|
||||
const uint32_t kNAME = TRUETYPE_TAG('n','a','m','e');
|
||||
for (auto& fe : mAvailableFonts) {
|
||||
// Make a local copy of the array of font faces, in case of changes
|
||||
// during the iteration.
|
||||
AutoTArray<RefPtr<gfxFontEntry>,8> faces(mAvailableFonts);
|
||||
for (auto& fe : faces) {
|
||||
if (!fe) {
|
||||
continue;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче