aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/window.rs')
-rw-r--r--src/components/script/dom/window.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/script/dom/window.rs b/src/components/script/dom/window.rs
index 5c27aa83d00..ec2db1bf4ac 100644
--- a/src/components/script/dom/window.rs
+++ b/src/components/script/dom/window.rs
@@ -173,6 +173,12 @@ impl Window {
self.page.reflow_all(ReflowForDisplay, self.script_chan.clone(), self.compositor);
}
+ pub fn wait_until_safe_to_modify_dom(&self) {
+ // FIXME: This disables concurrent layout while we are modifying the DOM, since
+ // our current architecture is entirely unsafe in the presence of races.
+ self.page.join_layout();
+ }
+
#[fixed_stack_segment]
pub fn new(cx: *JSContext,
page: @mut Page,