aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/font_cache_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-09-19 09:14:55 -0500
committerGitHub <noreply@github.com>2016-09-19 09:14:55 -0500
commita82d5106bd15d243c8552bf58472e3e9889d1ce2 (patch)
tree78fda822441867da6810e6b3e5fa8245e16fc580 /components/gfx/font_cache_thread.rs
parent55e459ca991ea982ecbaacd901bfcb01bffa6be2 (diff)
parentfb943ab54bfe8d1a58de965502a95497e3c621f0 (diff)
downloadservo-a82d5106bd15d243c8552bf58472e3e9889d1ce2.tar.gz
servo-a82d5106bd15d243c8552bf58472e3e9889d1ce2.zip
Auto merge of #12076 - jdm:font-load, r=pcwalton
Make font template data load fallible Remove a TODO around dealing with a failed file operation. Can we write an automated test for this? I don't really know what font template data is, but this failure seems to be fontconfig-specific... --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12037 - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12076) <!-- Reviewable:end -->
Diffstat (limited to 'components/gfx/font_cache_thread.rs')
-rw-r--r--components/gfx/font_cache_thread.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 055216a948d..26fcd6b98b7 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -96,8 +96,9 @@ impl FontTemplates {
}
}
- let template = FontTemplate::new(identifier, maybe_data);
- self.templates.push(template);
+ if let Ok(template) = FontTemplate::new(identifier, maybe_data) {
+ self.templates.push(template);
+ }
}
}