diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-12-01 02:50:06 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-12-06 13:15:06 -1000 |
commit | 620a67ff14b21c9da2d23bd96ecb9bb191738457 (patch) | |
tree | f97ae58850c4211664f99b1cb3c835955fe1452a /components/script/docs | |
parent | 73b6e705b4e18f53f36c8af98543dc2819764ef5 (diff) | |
download | servo-620a67ff14b21c9da2d23bd96ecb9bb191738457.tar.gz servo-620a67ff14b21c9da2d23bd96ecb9bb191738457.zip |
Mark JSTraceable and its method as unsafe
Diffstat (limited to 'components/script/docs')
-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() }); } } |