mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use AtomicRefCell instead of RwLock inside SharedRwLock for stylo.
MozReview-Commit-ID: 8M6BUqe4pil
This commit is contained in:
parent
22d40e3680
commit
7850d3f331
2 changed files with 97 additions and 43 deletions
|
@ -172,9 +172,15 @@ longhand_properties_idents!(reexport_computed_values);
|
|||
/// FIXME: Remove this and use Arc::ptr_eq once we require Rust 1.17
|
||||
#[inline]
|
||||
pub fn arc_ptr_eq<T: 'static>(a: &Arc<T>, b: &Arc<T>) -> bool {
|
||||
let a: &T = &**a;
|
||||
let b: &T = &**b;
|
||||
(a as *const T) == (b as *const T)
|
||||
ptr_eq::<T>(&**a, &**b)
|
||||
}
|
||||
|
||||
/// Pointer equality
|
||||
///
|
||||
/// FIXME: Remove this and use std::ptr::eq once we require Rust 1.17
|
||||
#[inline]
|
||||
pub fn ptr_eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
|
||||
a == b
|
||||
}
|
||||
|
||||
/// Serializes as CSS a comma-separated list of any `T` that supports being
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue