diff --git a/components/style/sharing/mod.rs b/components/style/sharing/mod.rs index 8e56ed5f1a1..83ad650c5e2 100644 --- a/components/style/sharing/mod.rs +++ b/components/style/sharing/mod.rs @@ -751,6 +751,7 @@ impl StyleSharingCache { target: E, ) -> Option { self.cache_mut().lookup(|candidate| { + debug_assert_ne!(candidate.element, target); if !candidate.parent_style_identity().eq(inherited) { return None; }