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

@ -71,6 +71,14 @@ impl SharedRwLock {
}
}
/// Create a new global shared lock (gecko).
#[cfg(feature = "gecko")]
pub fn new_leaked() -> Self {
SharedRwLock {
cell: Some(Arc::new_leaked(AtomicRefCell::new(SomethingZeroSizedButTyped))),
}
}
/// Create a new read-only shared lock (gecko).
#[cfg(feature = "gecko")]
pub fn read_only() -> Self {