mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15: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
|
@ -55,7 +55,7 @@ impl Drop for RuleTree {
|
|||
unsafe { self.gc(); }
|
||||
|
||||
// After the GC, the free list should be empty.
|
||||
debug_assert!(self.root.get().next_free.load(Ordering::Relaxed) == FREE_LIST_SENTINEL);
|
||||
debug_assert_eq!(self.root.get().next_free.load(Ordering::Relaxed), FREE_LIST_SENTINEL);
|
||||
|
||||
// Remove the sentinel. This indicates that GCs will no longer occur.
|
||||
// Any further drops of StrongRuleNodes must occur on the main thread,
|
||||
|
@ -846,7 +846,7 @@ malloc_size_of_is_0!(StrongRuleNode);
|
|||
|
||||
impl StrongRuleNode {
|
||||
fn new(n: Box<RuleNode>) -> Self {
|
||||
debug_assert!(n.parent.is_none() == !n.source.is_some());
|
||||
debug_assert_eq!(n.parent.is_none(), !n.source.is_some());
|
||||
|
||||
let ptr = Box::into_raw(n);
|
||||
log_new(ptr);
|
||||
|
@ -1074,7 +1074,7 @@ impl StrongRuleNode {
|
|||
|
||||
me.free_count().store(0, Ordering::Relaxed);
|
||||
|
||||
debug_assert!(me.next_free.load(Ordering::Relaxed) == FREE_LIST_SENTINEL);
|
||||
debug_assert_eq!(me.next_free.load(Ordering::Relaxed), FREE_LIST_SENTINEL);
|
||||
}
|
||||
|
||||
unsafe fn maybe_gc(&self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue