File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ use crate::jsval::{JSVal, UndefinedValue};
27
27
use std:: marker:: PhantomData ;
28
28
use std:: mem;
29
29
use std:: ops:: Deref ;
30
- use std:: ops:: DerefMut ;
31
30
use std:: ptr;
32
31
33
32
impl < T > Deref for JS :: Handle < T > {
@@ -46,12 +45,6 @@ impl<T> Deref for JS::MutableHandle<T> {
46
45
}
47
46
}
48
47
49
- impl < T > DerefMut for JS :: MutableHandle < T > {
50
- fn deref_mut < ' a > ( & ' a mut self ) -> & ' a mut T {
51
- unsafe { & mut * self . ptr }
52
- }
53
- }
54
-
55
48
impl Default for jsid {
56
49
fn default ( ) -> Self {
57
50
VoidId ( )
@@ -119,6 +112,13 @@ impl<T> JS::MutableHandle<T> {
119
112
{
120
113
unsafe { * self . ptr = v }
121
114
}
115
+
116
+ /// The returned pointer is aliased by a pointer that the GC will read
117
+ /// through, and thus `&mut` references created from it must not be held
118
+ /// across GC pauses.
119
+ pub fn as_ptr ( self ) -> * mut T {
120
+ self . ptr
121
+ }
122
122
}
123
123
124
124
impl JS :: HandleValue {
You can’t perform that action at this time.
0 commit comments