diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-01-27 18:17:03 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-01-27 18:17:03 -0500 |
commit | c79231f9c619f33f7fea66c08bec7a7c0695dc21 (patch) | |
tree | 7618fca10eaa84b9d70b57e50e4c7d2fdc63e301 | |
parent | 7eca462c5a5fa613e54a09df6c5c5215b4b9762e (diff) | |
download | servo-c79231f9c619f33f7fea66c08bec7a7c0695dc21.tar.gz servo-c79231f9c619f33f7fea66c08bec7a7c0695dc21.zip |
Ignore navigation requests from pages that are not active.
-rw-r--r-- | components/compositing/constellation.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index 829b9ead234..4bf942302f7 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -946,6 +946,14 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF> } } + if !self.pipeline_is_in_current_frame(source_id) { + // Disregard this load if the navigating pipeline is not actually + // active. This could be caused by a delayed navigation (eg. from + // a timer) or a race between multiple navigations (such as an + // onclick handler on an anchor element). + return None; + } + self.handle_load_start_msg(&source_id); // Being here means either there are no pending frames, or none of the pending // changes would be overridden by changing the subframe associated with source_id. |