mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01: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 document = document_from_node(self);
|
||||||
|
|
||||||
|
{
|
||||||
let mut load_blocker = self.load_blocker.borrow_mut();
|
let mut load_blocker = self.load_blocker.borrow_mut();
|
||||||
// Any oustanding load is finished from the point of view of the blocked
|
// Any oustanding load is finished from the point of view of the blocked
|
||||||
// document; the new navigation will continue blocking it.
|
// document; the new navigation will continue blocking it.
|
||||||
LoadBlocker::terminate(&mut load_blocker);
|
LoadBlocker::terminate(&mut load_blocker);
|
||||||
|
}
|
||||||
|
|
||||||
if load_data.url.scheme() == "javascript" {
|
if load_data.url.scheme() == "javascript" {
|
||||||
let window_proxy = self.GetContentWindow();
|
let window_proxy = self.GetContentWindow();
|
||||||
|
@ -150,6 +152,7 @@ impl HTMLIFrameElement {
|
||||||
match load_data.js_eval_result {
|
match load_data.js_eval_result {
|
||||||
Some(JsEvalResult::NoContent) => (),
|
Some(JsEvalResult::NoContent) => (),
|
||||||
_ => {
|
_ => {
|
||||||
|
let mut load_blocker = self.load_blocker.borrow_mut();
|
||||||
*load_blocker = Some(LoadBlocker::new(
|
*load_blocker = Some(LoadBlocker::new(
|
||||||
&*document,
|
&*document,
|
||||||
LoadType::Subframe(load_data.url.clone()),
|
LoadType::Subframe(load_data.url.clone()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue