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
|
@ -39,6 +39,7 @@ use std::rc::Rc;
|
|||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::mpsc::Receiver;
|
||||
use task_source::file_reading::FileReadingTaskSource;
|
||||
use timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle, OneshotTimers, TimerCallback};
|
||||
use url::Url;
|
||||
|
||||
|
@ -460,6 +461,10 @@ impl WorkerGlobalScope {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn file_reading_task_source(&self) -> FileReadingTaskSource {
|
||||
FileReadingTaskSource(self.script_chan())
|
||||
}
|
||||
|
||||
pub fn pipeline(&self) -> PipelineId {
|
||||
let dedicated = self.downcast::<DedicatedWorkerGlobalScope>();
|
||||
let service_worker = self.downcast::<ServiceWorkerGlobalScope>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue