mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: Make timers per-process (#34581)
Before all timers were managed by the Constellation process, meaning that they had to trigger IPC calls to be scheduled and fired. Currently, timers are only used in the `ScriptThread`, so it makes sense that they are per-process. This change restores the timer thread functionality that existed before avoided entirely. Completion is done using a callback that is sent to the timer thread similarly to how fetch is done. This allows reusing the existing task queue without making any new channels. Fixes #15219. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
ff7626bfc6
commit
226299380d
21 changed files with 366 additions and 324 deletions
|
@ -57,8 +57,8 @@ use script_layout_interface::{
|
|||
use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult};
|
||||
use script_traits::{
|
||||
ConstellationControlMsg, DocumentState, LoadData, NavigationHistoryBehavior, ScriptMsg,
|
||||
ScriptToConstellationChan, ScrollState, StructuredSerializedData, Theme, TimerSchedulerMsg,
|
||||
WindowSizeData, WindowSizeType,
|
||||
ScriptToConstellationChan, ScrollState, StructuredSerializedData, Theme, WindowSizeData,
|
||||
WindowSizeType,
|
||||
};
|
||||
use selectors::attr::CaseSensitivity;
|
||||
use servo_arc::Arc as ServoArc;
|
||||
|
@ -2697,7 +2697,6 @@ impl Window {
|
|||
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||
constellation_chan: ScriptToConstellationChan,
|
||||
control_chan: IpcSender<ConstellationControlMsg>,
|
||||
scheduler_chan: IpcSender<TimerSchedulerMsg>,
|
||||
pipelineid: PipelineId,
|
||||
parent_info: Option<PipelineId>,
|
||||
window_size: WindowSizeData,
|
||||
|
@ -2739,7 +2738,6 @@ impl Window {
|
|||
mem_profiler_chan,
|
||||
time_profiler_chan,
|
||||
constellation_chan,
|
||||
scheduler_chan,
|
||||
resource_threads,
|
||||
origin,
|
||||
Some(creator_url),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue