diff options
Diffstat (limited to 'components/script/docs/JS-Servos-only-GC.md')
-rw-r--r-- | components/script/docs/JS-Servos-only-GC.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/docs/JS-Servos-only-GC.md b/components/script/docs/JS-Servos-only-GC.md index e7237853217..c8129241a84 100644 --- a/components/script/docs/JS-Servos-only-GC.md +++ b/components/script/docs/JS-Servos-only-GC.md @@ -122,8 +122,8 @@ which has an area, and the trait provides a way to get that object's area. Now let's look at the `JSTraceable` trait, which we use for tracing: ```rust -pub trait JSTraceable { - fn trace(&self, trc: *mut JSTracer); +pub unsafe trait JSTraceable { + unsafe fn trace(&self, trc: *mut JSTracer); } ``` @@ -182,7 +182,7 @@ pub fn trace_reflector(tracer: *mut JSTracer, description: &str, reflector: &Ref } impl<T: Reflectable> JSTraceable for JS<T> { - fn trace(&self, trc: *mut JSTracer) { + unsafe fn trace(&self, trc: *mut JSTracer) { trace_reflector(trc, "", unsafe { (**self.ptr).reflector() }); } } |