diff options
author | Josh Matthews <josh@joshmatthews.net> | 2024-09-27 01:11:11 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2024-09-27 01:11:11 -0400 |
commit | 52e1b19c5cb95f3f3d1ceb87b8945b98555a949c (patch) | |
tree | ea5412c9572677dd713b962ba6ce79d78912d26c /components | |
parent | 4aef4d48be5632b6ac0173925a2b77273e8093ef (diff) | |
download | servo-52e1b19c5cb95f3f3d1ceb87b8945b98555a949c.tar.gz servo-52e1b19c5cb95f3f3d1ceb87b8945b98555a949c.zip |
Only discard documents when no window replacement has occurred.
Diffstat (limited to 'components')
-rw-r--r-- | components/script/dom/document.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 9072a337593..f3c77c4169e 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -2324,8 +2324,10 @@ impl Document { if !self.salvageable.get() { // Step 1 of clean-up steps. global_scope.close_event_sources(); - let msg = ScriptMsg::DiscardDocument; - let _ = global_scope.script_to_constellation_chan().send(msg); + if self.is_window_relevant() { + let msg = ScriptMsg::DiscardDocument; + let _ = global_scope.script_to_constellation_chan().send(msg); + } } // https://w3c.github.io/FileAPI/#lifeTime global_scope.clean_up_all_file_resources(); |