Skip to content

Commit

Permalink
Fix debug assertion introduced in #13108 by me.
Browse files Browse the repository at this point in the history
I'm stupid, and when I did the last moving-the-code-around, I failed miserably
to double-check it in a debug build.
  • Loading branch information
emilio committed Aug 30, 2016
1 parent 8695552 commit b9d9192
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/style/restyle_hints.rs
Expand Up @@ -470,10 +470,10 @@ impl DependencySet {
return;
}
for dep in deps {
debug_assert!(state_changes.intersects(dep.sensitivities.states) ||
attrs_changed && dep.sensitivities.attrs,
"Testing a completely ineffective dependency?");
if !hint.intersects(dep.hint) {
debug_assert!((!state_changes.is_empty() && !dep.sensitivities.states.is_empty()) ||
(attrs_changed && dep.sensitivities.attrs),
"Testing a known ineffective dependency?");
if (attrs_changed || state_changes.intersects(dep.sensitivities.states)) && !hint.intersects(dep.hint) {
let matched_then =
matches_complex_selector(&dep.selector, snapshot, None,
&mut StyleRelations::empty());
Expand Down

0 comments on commit b9d9192

Please sign in to comment.