aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/docs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-12-06 18:31:46 -0800
committerGitHub <noreply@github.com>2016-12-06 18:31:46 -0800
commit32c121b6ff4a3f9336e742ecf1a96b187986fde0 (patch)
tree678963322c292d39a286a78f299def638d6c2c17 /components/script/docs
parentb54cfc9f259e72ea26e68ec8a7b1d617cf0812d3 (diff)
parent535765907d667466636e0fcaa9a7c6a078cf397d (diff)
downloadservo-32c121b6ff4a3f9336e742ecf1a96b187986fde0.tar.gz
servo-32c121b6ff4a3f9336e742ecf1a96b187986fde0.zip
Auto merge of #14473 - nox:raf-safety, r=Ms2ger
Clean up JSTraceable and how we use it <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14473) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/docs')
-rw-r--r--components/script/docs/JS-Servos-only-GC.md6
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() });
}
}