mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Add refcount logging to servo_arc.
Differential Revision: https://phabricator.services.mozilla.com/D32173
This commit is contained in:
parent
57868f571f
commit
9a9a4e12d5
10 changed files with 100 additions and 23 deletions
|
@ -755,8 +755,7 @@ unsafe impl Sync for RuleTree {}
|
|||
unsafe impl Send for RuleTree {}
|
||||
|
||||
// On Gecko builds, hook into the leak checking machinery.
|
||||
#[cfg(feature = "gecko")]
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(all(feature = "gecko", debug_assertions))]
|
||||
mod gecko_leak_checking {
|
||||
use super::RuleNode;
|
||||
use std::mem::size_of;
|
||||
|
@ -789,15 +788,13 @@ mod gecko_leak_checking {
|
|||
|
||||
#[inline(always)]
|
||||
fn log_new(_ptr: *const RuleNode) {
|
||||
#[cfg(feature = "gecko")]
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(all(feature = "gecko", debug_assertions))]
|
||||
gecko_leak_checking::log_ctor(_ptr);
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn log_drop(_ptr: *const RuleNode) {
|
||||
#[cfg(feature = "gecko")]
|
||||
#[cfg(debug_assertions)]
|
||||
#[cfg(all(feature = "gecko", debug_assertions))]
|
||||
gecko_leak_checking::log_dtor(_ptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue