mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Actually increment the counter when adding rule nodes to the free list.
MozReview-Commit-ID: 1uipYlIF8fv
This commit is contained in:
parent
81275234aa
commit
65fc5a9bd5
1 changed files with 5 additions and 0 deletions
|
@ -1339,6 +1339,11 @@ impl Drop for StrongRuleNode {
|
||||||
// This can be relaxed since this pointer won't be read until GC.
|
// This can be relaxed since this pointer won't be read until GC.
|
||||||
node.next_free.store(old_head, Ordering::Relaxed);
|
node.next_free.store(old_head, Ordering::Relaxed);
|
||||||
|
|
||||||
|
// Increment the free count. This doesn't need to be an RMU atomic
|
||||||
|
// operation, because the free list is "locked".
|
||||||
|
let old_free_count = root.free_count.load(Ordering::Relaxed);
|
||||||
|
root.free_count.store(old_free_count + 1, Ordering::Relaxed);
|
||||||
|
|
||||||
// This can be release because of the locking of the free list, that
|
// This can be release because of the locking of the free list, that
|
||||||
// ensures that all the other nodes racing with this one are using
|
// ensures that all the other nodes racing with this one are using
|
||||||
// `Acquire`.
|
// `Acquire`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue