Skip to content

Implement the Timer task source #24747

@gterzian

Description

@gterzian

Spec: https://html.spec.whatwg.org/multipage/#timer-task-source

Currently, we handle messages coming-in from the timer dispatcher(in the constellation) as a MixedMessage either by the script-thread at

recv(self.timer_event_port) -> msg => FromScheduler(msg.unwrap()),

or the worker at

recv(timer_event_port) -> msg => worker_scope.from_timer_msg(msg.unwrap()),

Those message are initially coming over IPC and then routed onto a threaded channel, at

ipc_timer_event_port,
and
timer_ipc_port.to_opaque(),
and for ServiceWorker it seems timeouts aren't supported yet?
let (timer_ipc_chan, _timer_ipc_port) = ipc::channel().unwrap();

In all of these cases, we should instead route the incoming IPC message into a task queued using the newly implemented timer-task-source, that should be added to https://github.com/servo/servo/tree/master/components/script/task_source

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions