mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Remove named window proxy map entry when destroying nested browsing context (#42344)
Leaving the entries sitting around both unnecessarily increases memory usage and breaks code that looks up window proxies by name and reuses names for iframes within the same page. Testing: Newly-passing tests. Fixes: #15258 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
@@ -448,7 +448,9 @@ impl HTMLIFrameElement {
|
||||
self.pending_pipeline_id.set(None);
|
||||
self.about_blank_pipeline_id.set(None);
|
||||
self.webview_id.set(None);
|
||||
self.browsing_context_id.set(None);
|
||||
if let Some(browsing_context_id) = self.browsing_context_id.take() {
|
||||
self.script_window_proxies.remove(browsing_context_id)
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn update_pipeline_id(
|
||||
|
||||
Reference in New Issue
Block a user