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 -->
This commit is contained in:
bors-servo 2016-09-19 09:14:55 -05:00 committed by GitHub
commit a82d5106bd
4 changed files with 29 additions and 25 deletions

View file

@ -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);
}
}
}