mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
dom: Reduce the scope of iframe's load blocker borrow.
This commit is contained in:
parent
bf69b6fea7
commit
af158de504
1 changed files with 7 additions and 4 deletions
|
@ -130,10 +130,12 @@ impl HTMLIFrameElement {
|
|||
|
||||
let document = document_from_node(self);
|
||||
|
||||
let mut load_blocker = self.load_blocker.borrow_mut();
|
||||
// Any oustanding load is finished from the point of view of the blocked
|
||||
// document; the new navigation will continue blocking it.
|
||||
LoadBlocker::terminate(&mut load_blocker);
|
||||
{
|
||||
let mut load_blocker = self.load_blocker.borrow_mut();
|
||||
// Any oustanding load is finished from the point of view of the blocked
|
||||
// document; the new navigation will continue blocking it.
|
||||
LoadBlocker::terminate(&mut load_blocker);
|
||||
}
|
||||
|
||||
if load_data.url.scheme() == "javascript" {
|
||||
let window_proxy = self.GetContentWindow();
|
||||
|
@ -150,6 +152,7 @@ impl HTMLIFrameElement {
|
|||
match load_data.js_eval_result {
|
||||
Some(JsEvalResult::NoContent) => (),
|
||||
_ => {
|
||||
let mut load_blocker = self.load_blocker.borrow_mut();
|
||||
*load_blocker = Some(LoadBlocker::new(
|
||||
&*document,
|
||||
LoadType::Subframe(load_data.url.clone()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue