aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo_arc/lib.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-05-27 14:56:08 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-06-04 01:03:54 -0400
commit3652a0f1e1babfdb3906803b9a081d7e42e8b2d8 (patch)
tree0cde63574d9db45c5dd94d1e4bf8533e048e2dc5 /components/servo_arc/lib.rs
parent9a9a4e12d51c983db25e3517332f3f7346ef7b22 (diff)
downloadservo-3652a0f1e1babfdb3906803b9a081d7e42e8b2d8.tar.gz
servo-3652a0f1e1babfdb3906803b9a081d7e42e8b2d8.zip
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
Diffstat (limited to 'components/servo_arc/lib.rs')
-rw-r--r--components/servo_arc/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs
index 79785bbb56a..34463b52654 100644
--- a/components/servo_arc/lib.rs
+++ b/components/servo_arc/lib.rs
@@ -177,7 +177,7 @@ impl<T> Arc<T> {
data,
}));
- #[cfg(all(feature = "gecko", debug_assertions))]
+ #[cfg(feature = "gecko_refcount_logging")]
unsafe {
// FIXME(emilio): Would be so amazing to have
// std::intrinsics::type_name() around, so that we could also report
@@ -312,7 +312,7 @@ impl<T: ?Sized> Arc<T> {
#[inline(always)]
fn record_drop(&self) {
- #[cfg(all(feature = "gecko", debug_assertions))]
+ #[cfg(feature = "gecko_refcount_logging")]
unsafe {
NS_LogDtor(self.ptr() as *const _, b"ServoArc\0".as_ptr() as *const _, 8);
}
@@ -348,7 +348,7 @@ impl<T: ?Sized> Arc<T> {
}
}
-#[cfg(all(feature = "gecko", debug_assertions))]
+#[cfg(feature = "gecko_refcount_logging")]
extern "C" {
fn NS_LogCtor(aPtr: *const std::os::raw::c_void, aTypeName: *const std::os::raw::c_char, aSize: u32);
fn NS_LogDtor(aPtr: *const std::os::raw::c_void, aTypeName: *const std::os::raw::c_char, aSize: u32);
@@ -745,7 +745,7 @@ impl<H, T> Arc<HeaderSlice<H, [T]>> {
);
}
- #[cfg(all(feature = "gecko", debug_assertions))]
+ #[cfg(feature = "gecko_refcount_logging")]
unsafe {
if !is_static {
// FIXME(emilio): Would be so amazing to have