mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
style: Share computed and specified value representation of -moz-context-properties.
Differential Revision: https://phabricator.services.mozilla.com/D30545
This commit is contained in:
parent
2bc4c42d45
commit
bbc77e3977
6 changed files with 89 additions and 70 deletions
|
@ -85,6 +85,16 @@ impl<T> ArcSlice<T> {
|
|||
mem::forget(self);
|
||||
ret
|
||||
}
|
||||
|
||||
/// Leaks an empty arc slice pointer, and returns it. Only to be used to
|
||||
/// construct ArcSlices from FFI.
|
||||
#[inline]
|
||||
pub fn leaked_empty_ptr() -> *mut std::os::raw::c_void {
|
||||
let empty: ArcSlice<_> = EMPTY_ARC_SLICE.clone();
|
||||
let ptr = empty.0.ptr();
|
||||
std::mem::forget(empty);
|
||||
ptr as *mut _
|
||||
}
|
||||
}
|
||||
|
||||
/// The inner pointer of an ArcSlice<T>, to be sent via FFI.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue