0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-26 00:59:28 -05:00

add Send impl for SharedRef<BackingStore> (#154)

This commit is contained in:
Bartek Iwańczuk 2019-12-30 22:48:08 +01:00 committed by Ry Dahl
parent b7fa3341cb
commit 233160f926
2 changed files with 4 additions and 0 deletions

View file

@ -99,6 +99,8 @@ impl Delete for Allocator {
#[repr(C)]
pub struct BackingStore([usize; 6]);
unsafe impl Send for BackingStore {}
impl BackingStore {
/// Returns a rust u8 slice with a lifetime equal to the lifetime of the BackingStore.
pub fn data_bytes<'a>(&'a mut self) -> &'a mut [u8] {

View file

@ -169,6 +169,8 @@ where
}
}
unsafe impl<T> Send for SharedRef<T> where T: Shared + Send {}
impl<T> Deref for SharedRef<T>
where
T: Shared,