style: Add refcount logging to servo_arc.

Differential Revision: https://phabricator.services.mozilla.com/D32173
This commit is contained in:
Emilio Cobos Álvarez 2019-05-16 04:35:34 +02:00
parent 57868f571f
commit 9a9a4e12d5
10 changed files with 100 additions and 23 deletions

View file

@ -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);
}