mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Ignore navigation requests from pages that are not active.
This commit is contained in:
parent
7eca462c5a
commit
c79231f9c6
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
self.handle_load_start_msg(&source_id);
|
||||||
// Being here means either there are no pending frames, or none of the pending
|
// 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.
|
// changes would be overridden by changing the subframe associated with source_id.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue