mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Change debug assertions to specific ones
This commit is contained in:
parent
2cf0077be1
commit
661d234c3c
23 changed files with 53 additions and 53 deletions
|
@ -472,7 +472,7 @@ impl<E: TElement> SequentialTask<E> {
|
|||
/// Executes this task.
|
||||
pub fn execute(self) {
|
||||
use self::SequentialTask::*;
|
||||
debug_assert!(thread_state::get() == ThreadState::LAYOUT);
|
||||
debug_assert_eq!(thread_state::get(), ThreadState::LAYOUT);
|
||||
match self {
|
||||
Unused(_) => unreachable!(),
|
||||
#[cfg(feature = "gecko")]
|
||||
|
@ -560,7 +560,7 @@ impl<E: TElement> SelectorFlagsMap<E> {
|
|||
|
||||
/// Applies the flags. Must be called on the main thread.
|
||||
fn apply_flags(&mut self) {
|
||||
debug_assert!(thread_state::get() == ThreadState::LAYOUT);
|
||||
debug_assert_eq!(thread_state::get(), ThreadState::LAYOUT);
|
||||
self.cache.evict_all();
|
||||
for (el, flags) in self.map.drain() {
|
||||
unsafe { el.set_selector_flags(flags); }
|
||||
|
@ -598,7 +598,7 @@ where
|
|||
E: TElement,
|
||||
{
|
||||
fn drop(&mut self) {
|
||||
debug_assert!(thread_state::get() == ThreadState::LAYOUT);
|
||||
debug_assert_eq!(thread_state::get(), ThreadState::LAYOUT);
|
||||
for task in self.0.drain(..) {
|
||||
task.execute()
|
||||
}
|
||||
|
@ -751,7 +751,7 @@ impl<E: TElement> ThreadLocalStyleContext<E> {
|
|||
|
||||
impl<E: TElement> Drop for ThreadLocalStyleContext<E> {
|
||||
fn drop(&mut self) {
|
||||
debug_assert!(thread_state::get() == ThreadState::LAYOUT);
|
||||
debug_assert_eq!(thread_state::get(), ThreadState::LAYOUT);
|
||||
|
||||
// Apply any slow selector flags that need to be set on parents.
|
||||
self.selector_flags.apply_flags();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue