aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/dom_wrapper.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout_thread/dom_wrapper.rs')
-rw-r--r--components/layout_thread/dom_wrapper.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/layout_thread/dom_wrapper.rs b/components/layout_thread/dom_wrapper.rs
index cae98f7e594..d1ab90fcb0c 100644
--- a/components/layout_thread/dom_wrapper.rs
+++ b/components/layout_thread/dom_wrapper.rs
@@ -430,7 +430,10 @@ impl<'ld> ServoLayoutDocument<'ld> {
self.document
.shadow_roots()
.iter()
- .map(|sr| ServoShadowRoot::from_layout_js(*sr))
+ .map(|sr| {
+ debug_assert!(sr.upcast::<Node>().get_flag(NodeFlags::IS_CONNECTED));
+ ServoShadowRoot::from_layout_js(*sr)
+ })
.collect()
}
}