Bug 1650801 - Panic instead of failing gracefully if FreeType failed to initialize. r=gw

Bug 1650662 makes us RELEASE_ASSERT on FreeType initialization earlier
so I think it's unlikely that we ever hit this case in the future.

Differential Revision: https://phabricator.services.mozilla.com/D82390
This commit is contained in:
Jeff Muizelaar 2020-07-06 20:27:38 +00:00
Родитель 510aab7dd9
Коммит ca9bed50d3
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -336,7 +336,9 @@ impl FontContext {
} else {
// TODO(gw): Provide detailed error values.
Err(ResourceCacheError::new(
format!("Failed to initialize FreeType - {}", result)
// Once this panic has been here for a while with no issues we should get rid of
// ResourceCacheError as this was the only place that could fail previously.
panic!("Failed to initialize FreeType - {}", result)
))
}
}