mirror of
https://github.com/servo/servo.git
synced 2025-08-17 19:35:33 +01:00
style: Store the Rust QuotePair slice as the computed quotes value in Gecko style structs.
Depends on D10651 Differential Revision: https://phabricator.services.mozilla.com/D10652
This commit is contained in:
parent
acf7b65f36
commit
de5584c1f6
4 changed files with 24 additions and 31 deletions
|
@ -211,6 +211,16 @@ impl<T: RefCounted> structs::RefPtr<T> {
|
|||
}
|
||||
|
||||
impl<T> structs::RefPtr<T> {
|
||||
/// Sets the contents to an `Arc<T>`, releasing the old value in `self` if
|
||||
/// necessary.
|
||||
pub fn set_arc<U>(&mut self, other: Arc<U>)
|
||||
where
|
||||
U: HasArcFFI<FFIType = T>,
|
||||
{
|
||||
unsafe { U::release_opt(self.mRawPtr.as_ref()); }
|
||||
self.set_arc_leaky(other);
|
||||
}
|
||||
|
||||
/// Sets the contents to an Arc<T>
|
||||
/// will leak existing contents
|
||||
pub fn set_arc_leaky<U>(&mut self, other: Arc<U>)
|
||||
|
@ -277,11 +287,6 @@ impl_threadsafe_refcount!(
|
|||
bindings::Gecko_AddRefURLExtraDataArbitraryThread,
|
||||
bindings::Gecko_ReleaseURLExtraDataArbitraryThread
|
||||
);
|
||||
impl_threadsafe_refcount!(
|
||||
structs::nsStyleQuoteValues,
|
||||
bindings::Gecko_AddRefQuoteValuesArbitraryThread,
|
||||
bindings::Gecko_ReleaseQuoteValuesArbitraryThread
|
||||
);
|
||||
impl_threadsafe_refcount!(
|
||||
structs::nsCSSValueSharedList,
|
||||
bindings::Gecko_AddRefCSSValueSharedListArbitraryThread,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue