aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/script_thread.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index dbc4f0fb444..5a1a91c9b46 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -2876,6 +2876,12 @@ impl ScriptThread {
}
}
+ // Abort the parser, if any,
+ // to prevent any further incoming networking messages from being handled.
+ if let Some(parser) = document.get_current_parser() {
+ parser.abort();
+ }
+
// We discard the browsing context after requesting layout shut down,
// to avoid running layout on detached iframes.
let window = document.window();