mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
The constellation notifies the script thread about documents becoming inactive, active and fully active.
This commit is contained in:
parent
556a46f537
commit
a43c842099
14 changed files with 162 additions and 98 deletions
|
@ -233,6 +233,7 @@ impl OneshotTimers {
|
|||
return warn!("Suspending an already suspended timer.");
|
||||
}
|
||||
|
||||
debug!("Suspending timers.");
|
||||
self.suspended_since.set(Some(precise_time_ms()));
|
||||
self.invalidate_expected_event_id();
|
||||
}
|
||||
|
@ -244,6 +245,7 @@ impl OneshotTimers {
|
|||
None => return warn!("Resuming an already resumed timer."),
|
||||
};
|
||||
|
||||
debug!("Resuming timers.");
|
||||
self.suspension_offset.set(self.suspension_offset.get() + additional_offset);
|
||||
self.suspended_since.set(None);
|
||||
|
||||
|
@ -252,7 +254,7 @@ impl OneshotTimers {
|
|||
|
||||
fn schedule_timer_call(&self) {
|
||||
if self.suspended_since.get().is_some() {
|
||||
// The timer will be scheduled when the pipeline is thawed.
|
||||
// The timer will be scheduled when the pipeline is fully activated.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue