mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1717595 - Ensure we check the fontgroup's validity before using it to build a textrun or otherwise access its cached font instances. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D118733
This commit is contained in:
parent
e1bb171944
commit
a0abb0f180
@ -2248,6 +2248,9 @@ gfxFont* gfxFontGroup::GetDefaultFont() {
|
||||
|
||||
gfxFont* gfxFontGroup::GetFirstValidFont(uint32_t aCh,
|
||||
StyleGenericFontFamily* aGeneric) {
|
||||
// Ensure cached font instances are valid.
|
||||
CheckForUpdatedPlatformList();
|
||||
|
||||
uint32_t count = mFonts.Length();
|
||||
bool loading = false;
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
|
@ -516,6 +516,9 @@ void MathMLTextRunFactory::RebuildTextRun(
|
||||
uint8_t mathVar = NS_MATHML_MATHVARIANT_NONE;
|
||||
bool doMathvariantStyling = true;
|
||||
|
||||
// Ensure it will be safe to call FindFontForChar in the loop below.
|
||||
fontGroup->CheckForUpdatedPlatformList();
|
||||
|
||||
for (uint32_t i = 0; i < length; ++i) {
|
||||
int extraChars = 0;
|
||||
mathVar = styles[i]->mMathVariant;
|
||||
|
Loading…
Reference in New Issue
Block a user