Skip to content

Commit 99518a4

Browse files
authored
Arc should not be Traceable (#561)
Traceable works under the assumption that only one thread will be looking at values. The entire purpose of `Arc` is to share things between threads. This ~never works (unless the Arc could be replaced by a Rc). Nothing in this crate or servo uses this impl. Let's just delete this. Signed-off-by: Greg Morenz <[email protected]>
1 parent f1c5f13 commit 99518a4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

mozjs-sys/src/trace.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,6 @@ unsafe impl<T: Traceable> Traceable for Rc<T> {
138138
}
139139
}
140140

141-
unsafe impl<T: Traceable> Traceable for Arc<T> {
142-
#[inline]
143-
unsafe fn trace(&self, trc: *mut JSTracer) {
144-
(**self).trace(trc);
145-
}
146-
}
147-
148141
unsafe impl<T: Traceable + ?Sized> Traceable for Box<T> {
149142
#[inline]
150143
unsafe fn trace(&self, trc: *mut JSTracer) {

0 commit comments

Comments
 (0)