Bug 1466251 part 1 - Make sure we reject FontFace.loaded if font loading times out. r=heycam

This commit is contained in:
Jonathan Watt 2018-05-15 16:18:40 +01:00
Родитель fc527d7807
Коммит 572c8e4059
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -894,8 +894,12 @@ gfxUserFontEntry::FontDataDownloadComplete(const uint8_t* aFontData,
free((void*)aFontData);
}
// error occurred, load next src if load not yet timed out
if (mFontDataLoadingState != LOADING_TIMED_OUT) {
// Error occurred. Make sure the FontFace's promise is rejected if the
// load timed out, or else load the next src.
if (mFontDataLoadingState == LOADING_TIMED_OUT) {
mFontDataLoadingState = LOADING_FAILED;
SetLoadState(STATUS_FAILED);
} else {
LoadNextSrc();
}