mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
Auto merge of #12770 - nox:intermittent-study, r=SimonSapin
Use expect calls to investigate #12540 and #12288 <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12770) <!-- Reviewable:end -->
This commit is contained in:
commit
c420a870c1
1 changed files with 12 additions and 6 deletions
|
@ -423,10 +423,13 @@ impl FontCacheThread {
|
||||||
|
|
||||||
pub fn find_font_template(&self, family: FontFamily, desc: FontTemplateDescriptor)
|
pub fn find_font_template(&self, family: FontFamily, desc: FontTemplateDescriptor)
|
||||||
-> Option<FontTemplateInfo> {
|
-> Option<FontTemplateInfo> {
|
||||||
let (response_chan, response_port) = ipc::channel().unwrap();
|
let (response_chan, response_port) =
|
||||||
self.chan.send(Command::GetFontTemplate(family, desc, response_chan)).unwrap();
|
ipc::channel().expect("failed to create IPC channel");
|
||||||
|
self.chan.send(Command::GetFontTemplate(family, desc, response_chan))
|
||||||
|
.expect("failed to send message to font cache thread");
|
||||||
|
|
||||||
let reply = response_port.recv().unwrap();
|
let reply = response_port.recv()
|
||||||
|
.expect("failed to receive response to font request");
|
||||||
|
|
||||||
match reply {
|
match reply {
|
||||||
Reply::GetFontTemplateReply(data) => {
|
Reply::GetFontTemplateReply(data) => {
|
||||||
|
@ -437,10 +440,13 @@ impl FontCacheThread {
|
||||||
|
|
||||||
pub fn last_resort_font_template(&self, desc: FontTemplateDescriptor)
|
pub fn last_resort_font_template(&self, desc: FontTemplateDescriptor)
|
||||||
-> FontTemplateInfo {
|
-> FontTemplateInfo {
|
||||||
let (response_chan, response_port) = ipc::channel().unwrap();
|
let (response_chan, response_port) =
|
||||||
self.chan.send(Command::GetLastResortFontTemplate(desc, response_chan)).unwrap();
|
ipc::channel().expect("failed to create IPC channel");
|
||||||
|
self.chan.send(Command::GetLastResortFontTemplate(desc, response_chan))
|
||||||
|
.expect("failed to send message to font cache thread");
|
||||||
|
|
||||||
let reply = response_port.recv().unwrap();
|
let reply = response_port.recv()
|
||||||
|
.expect("failed to receive response to font request");
|
||||||
|
|
||||||
match reply {
|
match reply {
|
||||||
Reply::GetFontTemplateReply(data) => {
|
Reply::GetFontTemplateReply(data) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue