From ca9bed50d3659d2eafce7a4bb31b69702d9b448e Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Mon, 6 Jul 2020 20:27:38 +0000 Subject: [PATCH] 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 --- gfx/wr/webrender/src/platform/unix/font.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/wr/webrender/src/platform/unix/font.rs b/gfx/wr/webrender/src/platform/unix/font.rs index 52c0d114101c..1debfe488cd2 100644 --- a/gfx/wr/webrender/src/platform/unix/font.rs +++ b/gfx/wr/webrender/src/platform/unix/font.rs @@ -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) )) } }