mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
style: Remove HasArcFFI for some types
See blocked bug. For non-Locked types we can just use the same underlying type at the FFI boundary. Port StylesheetContents and CssUrlData to this set-up. CssUrlData is already generated by cbindgen anyways. Differential Revision: https://phabricator.services.mozilla.com/D177559
This commit is contained in:
parent
d9d865e8c9
commit
779aa9d30e
4 changed files with 42 additions and 40 deletions
|
@ -95,6 +95,15 @@ pub struct Strong<GeckoType> {
|
|||
_marker: PhantomData<GeckoType>,
|
||||
}
|
||||
|
||||
impl<T> From<Arc<T>> for Strong<T> {
|
||||
fn from(arc: Arc<T>) -> Self {
|
||||
Self {
|
||||
ptr: Arc::into_raw(arc),
|
||||
_marker: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<GeckoType> Strong<GeckoType> {
|
||||
#[inline]
|
||||
/// Returns whether this reference is null.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue