mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Rejigger a bit rust features so that rusttests still link.
We cannot compile with just feature(gecko + debug_assertions), since that's how debug rusttests get compiled and they don't have the refcount logging stuff. We were getting away with it for the pre-existing usage of the style crate, because it wasn't used during any test and presumably the linker didn't complain. But servo_arc is definitely used in tests. Differential Revision: https://phabricator.services.mozilla.com/D32691
This commit is contained in:
parent
9a9a4e12d5
commit
3652a0f1e1
4 changed files with 9 additions and 8 deletions
|
@ -755,7 +755,7 @@ unsafe impl Sync for RuleTree {}
|
|||
unsafe impl Send for RuleTree {}
|
||||
|
||||
// On Gecko builds, hook into the leak checking machinery.
|
||||
#[cfg(all(feature = "gecko", debug_assertions))]
|
||||
#[cfg(feature = "gecko_refcount_logging")]
|
||||
mod gecko_leak_checking {
|
||||
use super::RuleNode;
|
||||
use std::mem::size_of;
|
||||
|
@ -788,13 +788,13 @@ mod gecko_leak_checking {
|
|||
|
||||
#[inline(always)]
|
||||
fn log_new(_ptr: *const RuleNode) {
|
||||
#[cfg(all(feature = "gecko", debug_assertions))]
|
||||
#[cfg(feature = "gecko_refcount_logging")]
|
||||
gecko_leak_checking::log_ctor(_ptr);
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn log_drop(_ptr: *const RuleNode) {
|
||||
#[cfg(all(feature = "gecko", debug_assertions))]
|
||||
#[cfg(feature = "gecko_refcount_logging")]
|
||||
gecko_leak_checking::log_dtor(_ptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue