style: Make an assertion a release assert in nightly.

If this can happen legitimately, this will help fuzzers to catch it.

Differential Revision: https://phabricator.services.mozilla.com/D59066
This commit is contained in:
Emilio Cobos Álvarez 2020-01-08 00:55:18 +00:00
parent 718a9b1f05
commit d459e3453a
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -1719,7 +1719,10 @@ impl Drop for StrongRuleNode {
return;
}
debug_assert!(node.children.read().is_empty());
if cfg!(debug_assertions) || crate::gecko_bindings::structs::GECKO_IS_NIGHTLY {
assert!(node.children.read().is_empty());
}
if node.parent.is_none() {
debug!("Dropping root node!");
// The free list should be null by this point