diff options
author | Gregory Terzian <gterzian@users.noreply.github.com> | 2019-11-21 23:55:34 +0800 |
---|---|---|
committer | Gregory Terzian <gterzian@users.noreply.github.com> | 2019-11-21 23:58:03 +0800 |
commit | 1fab2416d7d6036399e3581419252d79a88b8c37 (patch) | |
tree | ab71a8bb0d6559519ff24cae1c34bc42bb624de8 | |
parent | d553158e95cd5988eeb3e32310c11971c0450449 (diff) | |
download | servo-1fab2416d7d6036399e3581419252d79a88b8c37.tar.gz servo-1fab2416d7d6036399e3581419252d79a88b8c37.zip |
abort parser, if any, when pipeline exits
-rw-r--r-- | components/script/script_thread.rs | 6 |
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(); |