diff options
author | Gregory Terzian <gterzian@users.noreply.github.com> | 2019-11-17 14:37:45 +0800 |
---|---|---|
committer | Gregory Terzian <gterzian@users.noreply.github.com> | 2019-11-19 14:32:21 +0800 |
commit | 50a7111eb65155fc7a0bdb1646c4a2e0ebdd8f90 (patch) | |
tree | 503c793b58480822a9e74e064ec4876f3e74e9fe /components/script/task_manager.rs | |
parent | d553158e95cd5988eeb3e32310c11971c0450449 (diff) | |
download | servo-50a7111eb65155fc7a0bdb1646c4a2e0ebdd8f90.tar.gz servo-50a7111eb65155fc7a0bdb1646c4a2e0ebdd8f90.zip |
impl timer-task-source, dedicated time-out mechanism for service-worker
Diffstat (limited to 'components/script/task_manager.rs')
-rw-r--r-- | components/script/task_manager.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/components/script/task_manager.rs b/components/script/task_manager.rs index a8908ea00a2..063b5700484 100644 --- a/components/script/task_manager.rs +++ b/components/script/task_manager.rs @@ -12,6 +12,7 @@ use crate::task_source::networking::NetworkingTaskSource; use crate::task_source::performance_timeline::PerformanceTimelineTaskSource; use crate::task_source::port_message::PortMessageQueue; use crate::task_source::remote_event::RemoteEventTaskSource; +use crate::task_source::timer::TimerTaskSource; use crate::task_source::user_interaction::UserInteractionTaskSource; use crate::task_source::websocket::WebsocketTaskSource; use crate::task_source::TaskSourceName; @@ -54,6 +55,8 @@ pub struct TaskManager { #[ignore_malloc_size_of = "task sources are hard"] remote_event_task_source: RemoteEventTaskSource, #[ignore_malloc_size_of = "task sources are hard"] + timer_task_source: TimerTaskSource, + #[ignore_malloc_size_of = "task sources are hard"] websocket_task_source: WebsocketTaskSource, } @@ -68,6 +71,7 @@ impl TaskManager { port_message_queue: PortMessageQueue, user_interaction_task_source: UserInteractionTaskSource, remote_event_task_source: RemoteEventTaskSource, + timer_task_source: TimerTaskSource, websocket_task_source: WebsocketTaskSource, ) -> Self { TaskManager { @@ -80,6 +84,7 @@ impl TaskManager { port_message_queue, user_interaction_task_source, remote_event_task_source, + timer_task_source, websocket_task_source, task_cancellers: Default::default(), } @@ -159,6 +164,14 @@ impl TaskManager { task_source_functions!( self, + timer_task_source_with_canceller, + timer_task_source, + TimerTaskSource, + Timer + ); + + task_source_functions!( + self, websocket_task_source_with_canceller, websocket_task_source, WebsocketTaskSource, |