mirror of
https://github.com/servo/servo.git
synced 2025-06-18 13:24:29 +00:00
Warn when a timer event is processed for a discarded document.
This commit is contained in:
parent
d918c14247
commit
8ca387c0e0
3 changed files with 25 additions and 2 deletions
|
@ -1049,8 +1049,11 @@ impl ScriptThread {
|
|||
TimerSource::FromWorker => panic!("Worker timeouts must not be sent to script thread"),
|
||||
};
|
||||
|
||||
let window = self.documents.borrow().find_window(pipeline_id)
|
||||
.expect("ScriptThread: received fire timer msg for a pipeline not in this script thread. This is a bug.");
|
||||
let window = self.documents.borrow().find_window(pipeline_id);
|
||||
let window = match window {
|
||||
Some(w) => w,
|
||||
None => return warn!("Received fire timer msg for a closed pipeline {}.", pipeline_id),
|
||||
};
|
||||
|
||||
window.handle_fire_timer(id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue