Auto merge of #20340 - emilio:shadow-dom-assert, r=xidorn

style: Better Shadow DOM assertions.

Bug: 1445682
Reviewed-by: xidorn
Differential Revision: https://phabricator.services.mozilla.com/D748

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20340)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-03-19 09:34:00 -04:00 committed by GitHub
commit 794c0d445a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -171,6 +171,7 @@ impl<'lr> TShadowRoot for GeckoShadowRoot<'lr> {
let author_styles =
AuthorStyles::<GeckoStyleSheet>::from_ffi(author_styles);
debug_assert!(!author_styles.stylesheets.dirty());
debug_assert!(
author_styles.quirks_mode == self.as_node().owner_doc().quirks_mode() ||
author_styles.stylesheets.is_empty()

View file

@ -263,7 +263,7 @@ where
Self {
entries: vec![],
data_validity: DataValidity::Valid,
dirty: true,
dirty: false,
}
}
}