diff options
author | Zhen Zhang <izgzhen@gmail.com> | 2016-05-18 00:07:42 +0800 |
---|---|---|
committer | Zhen Zhang <izgzhen@gmail.com> | 2016-05-20 08:00:16 +0800 |
commit | a51db4cfa857d7567ce1078830f5c00ea7bd9f59 (patch) | |
tree | 9a604ff41983c9bded331f4ec80f94c9f6b1cd45 /components/script/document_loader.rs | |
parent | 051a749e0d0ff298a3cbce8c6284386dc0d67f24 (diff) | |
download | servo-a51db4cfa857d7567ce1078830f5c00ea7bd9f59.tar.gz servo-a51db4cfa857d7567ce1078830f5c00ea7bd9f59.zip |
Implement trait-based ResourceThreads and clean up related naming issues
Changes include:
- Introduce an IpcSend trait to abstract over a collection of IpcSenders
- Implement ResourceThreads collection to abstract the resource-related
sub threads across the component
- Rename original ResourceThread and ControlMsg into an unifed CoreResource__
to accommodate above changes and avoid confusions
Diffstat (limited to 'components/script/document_loader.rs')
-rw-r--r-- | components/script/document_loader.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/document_loader.rs b/components/script/document_loader.rs index cd1f806294e..7282e23c322 100644 --- a/components/script/document_loader.rs +++ b/components/script/document_loader.rs @@ -9,7 +9,7 @@ use dom::bindings::js::JS; use dom::document::Document; use msg::constellation_msg::PipelineId; use net_traits::AsyncResponseTarget; -use net_traits::{PendingAsyncLoad, ResourceThread, LoadContext}; +use net_traits::{PendingAsyncLoad, CoreResourceThread, LoadContext}; use std::sync::Arc; use std::thread; use url::Url; @@ -93,10 +93,10 @@ impl Drop for LoadBlocker { #[derive(JSTraceable, HeapSizeOf)] pub struct DocumentLoader { - /// We use an `Arc<ResourceThread>` here in order to avoid file descriptor exhaustion when there + /// We use an `Arc<CoreResourceThread>` here in order to avoid file descriptor exhaustion when there /// are lots of iframes. #[ignore_heap_size_of = "channels are hard"] - pub resource_thread: Arc<ResourceThread>, + pub resource_thread: Arc<CoreResourceThread>, pipeline: Option<PipelineId>, blocking_loads: Vec<LoadType>, events_inhibited: bool, @@ -107,9 +107,9 @@ impl DocumentLoader { DocumentLoader::new_with_thread(existing.resource_thread.clone(), None, None) } - /// We use an `Arc<ResourceThread>` here in order to avoid file descriptor exhaustion when there + /// We use an `Arc<CoreResourceThread>` here in order to avoid file descriptor exhaustion when there /// are lots of iframes. - pub fn new_with_thread(resource_thread: Arc<ResourceThread>, + pub fn new_with_thread(resource_thread: Arc<CoreResourceThread>, pipeline: Option<PipelineId>, initial_load: Option<Url>) -> DocumentLoader { |