From 62907afe1c6752f3b70fe7fabc288de09afb1866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 24 Jul 2019 13:42:45 +0200 Subject: [PATCH] style: Properly refcount-log UniqueArcs created with new_uninitialized(). --- components/servo_arc/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs index 1567fd3d421..ad4489c10bc 100644 --- a/components/servo_arc/lib.rs +++ b/components/servo_arc/lib.rs @@ -125,6 +125,12 @@ impl UniqueArc { .unwrap_or_else(|| alloc::handle_alloc_error(layout)) .cast::>>(); ptr::write(&mut p.as_mut().count, atomic::AtomicUsize::new(1)); + + #[cfg(feature = "gecko_refcount_logging")] + { + NS_LogCtor(p.as_ptr() as *mut _, b"ServoArc\0".as_ptr() as *const _, 8) + } + UniqueArc(Arc { p, phantom: PhantomData,