mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
gfx: handle the ResponseAction::ResponseComplete error case in font_cache_task
This commit is contained in:
parent
e94a530597
commit
574f934314
1 changed files with 2 additions and 3 deletions
|
@ -185,14 +185,13 @@ impl FontCache {
|
||||||
metadata.content_type);
|
metadata.content_type);
|
||||||
*response_valid.lock().unwrap() = is_response_valid;
|
*response_valid.lock().unwrap() = is_response_valid;
|
||||||
}
|
}
|
||||||
ResponseAction::ResponseComplete(Err(_)) => {}
|
|
||||||
ResponseAction::DataAvailable(new_bytes) => {
|
ResponseAction::DataAvailable(new_bytes) => {
|
||||||
if *response_valid.lock().unwrap() {
|
if *response_valid.lock().unwrap() {
|
||||||
bytes.lock().unwrap().extend(new_bytes.into_iter())
|
bytes.lock().unwrap().extend(new_bytes.into_iter())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ResponseAction::ResponseComplete(Ok(_)) => {
|
ResponseAction::ResponseComplete(response) => {
|
||||||
if !*response_valid.lock().unwrap() {
|
if response.is_err() || !*response_valid.lock().unwrap() {
|
||||||
drop(result.send(()));
|
drop(result.send(()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue