Skip to content

Commit

Permalink
Arc should not be Traceable (#561)
Browse files Browse the repository at this point in the history
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 <greg-morenz@droid.cafe>
  • Loading branch information
gmorenz authored Mar 6, 2025
1 parent f1c5f13 commit 99518a4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions mozjs-sys/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@ unsafe impl<T: Traceable> Traceable for Rc<T> {
}
}

unsafe impl<T: Traceable> Traceable for Arc<T> {
#[inline]
unsafe fn trace(&self, trc: *mut JSTracer) {
(**self).trace(trc);
}
}

unsafe impl<T: Traceable + ?Sized> Traceable for Box<T> {
#[inline]
unsafe fn trace(&self, trc: *mut JSTracer) {
Expand Down

0 comments on commit 99518a4

Please sign in to comment.