Skip to content
Permalink
Browse files

gfx: handle the ResponseAction::ResponseComplete error case in font_c…

…ache_task
  • Loading branch information
tetsuharuohzeki committed Jan 5, 2016
1 parent e94a530 commit 574f93431417011c93402f58a500cdc840297d67
Showing with 2 additions and 3 deletions.
  1. +2 −3 components/gfx/font_cache_task.rs
@@ -185,14 +185,13 @@ impl FontCache {
metadata.content_type);
*response_valid.lock().unwrap() = is_response_valid;
}
ResponseAction::ResponseComplete(Err(_)) => {}
ResponseAction::DataAvailable(new_bytes) => {
if *response_valid.lock().unwrap() {
bytes.lock().unwrap().extend(new_bytes.into_iter())
}
}
ResponseAction::ResponseComplete(Ok(_)) => {
if !*response_valid.lock().unwrap() {
ResponseAction::ResponseComplete(response) => {
if response.is_err() || !*response_valid.lock().unwrap() {
drop(result.send(()));
return;
}

0 comments on commit 574f934

Please sign in to comment.
You can’t perform that action at this time.