mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement file reading task source
And remove superfluous FileReaderEvent enum
This commit is contained in:
parent
2aef518ce6
commit
aa5f34fcd9
6 changed files with 96 additions and 62 deletions
|
@ -26,6 +26,7 @@ use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
|
|||
use script_thread::{MainThreadScriptChan, ScriptThread, RunnableWrapper};
|
||||
use script_traits::{MsDuration, ScriptMsg as ConstellationMsg, TimerEventRequest};
|
||||
use task_source::dom_manipulation::DOMManipulationTaskSource;
|
||||
use task_source::file_reading::FileReadingTaskSource;
|
||||
use timers::{OneshotTimerCallback, OneshotTimerHandle};
|
||||
use url::Url;
|
||||
|
||||
|
@ -219,10 +220,10 @@ impl<'a> GlobalRef<'a> {
|
|||
|
||||
/// `ScriptChan` used to send messages to the event loop of this global's
|
||||
/// thread.
|
||||
pub fn file_reading_task_source(&self) -> Box<ScriptChan + Send> {
|
||||
pub fn file_reading_task_source(&self) -> FileReadingTaskSource {
|
||||
match *self {
|
||||
GlobalRef::Window(ref window) => window.file_reading_task_source(),
|
||||
GlobalRef::Worker(ref worker) => worker.script_chan(),
|
||||
GlobalRef::Worker(ref worker) => worker.file_reading_task_source(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue