mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
use remote-event task source in EventSource
This commit is contained in:
parent
f66c9b6160
commit
baef63becd
7 changed files with 81 additions and 8 deletions
|
@ -46,6 +46,7 @@ use task::TaskCanceller;
|
|||
use task_source::file_reading::FileReadingTaskSource;
|
||||
use task_source::networking::NetworkingTaskSource;
|
||||
use task_source::performance_timeline::PerformanceTimelineTaskSource;
|
||||
use task_source::remote_event::RemoteEventTaskSource;
|
||||
use time::precise_time_ns;
|
||||
use timers::{IsInterval, TimerCallback};
|
||||
|
||||
|
@ -385,6 +386,10 @@ impl WorkerGlobalScope {
|
|||
PerformanceTimelineTaskSource(self.script_chan(), self.pipeline_id())
|
||||
}
|
||||
|
||||
pub fn remote_event_task_source(&self) -> RemoteEventTaskSource {
|
||||
RemoteEventTaskSource(self.script_chan(), self.pipeline_id())
|
||||
}
|
||||
|
||||
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