mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Properly implement TaskSource for NetworkingTaskSource
This commit is contained in:
parent
d99d26cf1f
commit
72cb856e31
15 changed files with 89 additions and 69 deletions
|
@ -41,6 +41,7 @@ use std::sync::Arc;
|
|||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::mpsc::Receiver;
|
||||
use task_source::file_reading::FileReadingTaskSource;
|
||||
use task_source::networking::NetworkingTaskSource;
|
||||
use timers::{IsInterval, TimerCallback};
|
||||
use url::Url;
|
||||
|
||||
|
@ -361,6 +362,10 @@ impl WorkerGlobalScope {
|
|||
FileReadingTaskSource(self.script_chan())
|
||||
}
|
||||
|
||||
pub fn networking_task_source(&self) -> NetworkingTaskSource {
|
||||
NetworkingTaskSource(self.script_chan())
|
||||
}
|
||||
|
||||
pub fn new_script_pair(&self) -> (Box<ScriptChan + Send>, Box<ScriptPort + Send>) {
|
||||
let dedicated = self.downcast::<DedicatedWorkerGlobalScope>();
|
||||
if let Some(dedicated) = dedicated {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue