From 31079e2e3dfba8aa2a18ec06e4107f9080660b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 13 Sep 2017 19:12:49 +0200 Subject: [PATCH] style: Disable "removed" assertion in Gecko. --- components/style/stylesheet_set.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/style/stylesheet_set.rs b/components/style/stylesheet_set.rs index a05227868a8..2611208d99e 100644 --- a/components/style/stylesheet_set.rs +++ b/components/style/stylesheet_set.rs @@ -282,7 +282,13 @@ where fn remove(&mut self, sheet: &S) { let old_len = self.entries.len(); self.entries.retain(|entry| entry.sheet != *sheet); - debug_assert!(self.entries.len() != old_len, "Sheet not found?"); + if cfg!(feature = "servo") { + // FIXME(emilio): Make Gecko's PresShell::AddUserSheet not suck. + // + // Hopefully that's not necessary for correctness, just somewhat + // overkill. + debug_assert!(self.entries.len() != old_len, "Sheet not found?"); + } // Removing sheets makes us tear down the whole cascade and invalidation // data. self.set_data_validity_at_least(OriginValidity::FullyInvalid);