style: relax assertions in dom::element when setting selector flags.

Fixes #16409
This commit is contained in:
Emilio Cobos Álvarez 2017-04-13 17:32:13 +08:00
parent b514168469
commit 39ab49823b
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 10 additions and 1 deletions

View file

@ -780,7 +780,7 @@ impl LayoutElementHelpers for LayoutJS<Element> {
#[inline]
#[allow(unsafe_code)]
fn insert_selector_flags(&self, flags: ElementSelectorFlags) {
debug_assert!(thread_state::get() == thread_state::LAYOUT);
debug_assert!(thread_state::get().is_layout());
unsafe {
let f = &(*self.unsafe_get()).selector_flags;
f.set(f.get() | flags);