mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
ensure unload run with old pipeline as currently-active, do not nullify proxy unless currently-active
This commit is contained in:
parent
d553158e95
commit
a21c0bfd1a
3 changed files with 14 additions and 3 deletions
|
@ -1389,7 +1389,18 @@ impl Window {
|
|||
|
||||
self.current_state.set(WindowState::Zombie);
|
||||
*self.js_runtime.borrow_mut() = None;
|
||||
self.window_proxy.set(None);
|
||||
|
||||
// If this is the currently active pipeline,
|
||||
// nullify the window_proxy.
|
||||
if let Some(proxy) = self.window_proxy.get() {
|
||||
let pipeline_id = self.upcast::<GlobalScope>().pipeline_id();
|
||||
if let Some(currently_active) = proxy.currently_active() {
|
||||
if currently_active == pipeline_id {
|
||||
self.window_proxy.set(None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(performance) = self.performance.get() {
|
||||
performance.clear_and_disable_performance_entry_buffer();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue