Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
gfx: handle the ResponseAction::ResponseComplete error case in font_c…
…ache_task
  • Loading branch information
tetsuharuohzeki committed Jan 5, 2016
1 parent e94a530 commit 574f934
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/gfx/font_cache_task.rs
Expand Up @@ -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;
}
Expand Down

0 comments on commit 574f934

Please sign in to comment.