mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
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
This commit is contained in:
parent
051a749e0d
commit
a51db4cfa8
22 changed files with 213 additions and 179 deletions
|
@ -15,6 +15,7 @@ use dom::event::{Event, EventBubbles, EventCancelable};
|
|||
use dom::storageevent::StorageEvent;
|
||||
use dom::urlhelper::UrlHelper;
|
||||
use ipc_channel::ipc;
|
||||
use net_traits::IpcSend;
|
||||
use net_traits::storage_thread::{StorageThread, StorageThreadMsg, StorageType};
|
||||
use script_thread::{MainThreadRunnable, ScriptThread};
|
||||
use task_source::dom_manipulation::DOMManipulationTask;
|
||||
|
@ -48,7 +49,7 @@ impl Storage {
|
|||
fn get_storage_thread(&self) -> StorageThread {
|
||||
let global_root = self.global();
|
||||
let global_ref = global_root.r();
|
||||
global_ref.as_window().storage_thread()
|
||||
global_ref.as_window().resource_threads().sender()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue