mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
Propagating the load errors from network loader
This commit is contained in:
parent
8d988f20c1
commit
5e6f32a59b
15 changed files with 208 additions and 152 deletions
|
@ -10,7 +10,7 @@ use net_traits::image_cache_thread::ImageResponder;
|
|||
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheCommand, ImageCacheThread, ImageState};
|
||||
use net_traits::image_cache_thread::{ImageCacheResult, ImageOrMetadataAvailable, ImageResponse, UsePlaceholder};
|
||||
use net_traits::{AsyncResponseTarget, ControlMsg, LoadConsumer, LoadData, ResourceThread};
|
||||
use net_traits::{ResponseAction, LoadContext};
|
||||
use net_traits::{ResponseAction, LoadContext, NetworkError};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
|
@ -44,7 +44,7 @@ struct PendingLoad {
|
|||
metadata: Option<ImageMetadata>,
|
||||
|
||||
// Once loading is complete, the result of the operation.
|
||||
result: Option<Result<(), String>>,
|
||||
result: Option<Result<(), NetworkError>>,
|
||||
listeners: Vec<ImageListener>,
|
||||
|
||||
// The url being loaded. Do not forget that this may be several Mb
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue