From a5842165d9a6dc7696858e1adb2c6d80b5370248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 18 Sep 2017 03:27:29 +0200 Subject: [PATCH] style: Assert we don't try to share against ourselves. --- components/style/sharing/mod.rs | 1 + 1 file changed, 1 insertion(+) 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; }