aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/js.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-12-01 02:50:06 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2016-12-06 13:15:06 -1000
commit620a67ff14b21c9da2d23bd96ecb9bb191738457 (patch)
treef97ae58850c4211664f99b1cb3c835955fe1452a /components/script/dom/bindings/js.rs
parent73b6e705b4e18f53f36c8af98543dc2819764ef5 (diff)
downloadservo-620a67ff14b21c9da2d23bd96ecb9bb191738457.tar.gz
servo-620a67ff14b21c9da2d23bd96ecb9bb191738457.zip
Mark JSTraceable and its method as unsafe
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r--components/script/dom/bindings/js.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index 528b1213ccb..9ddf3fc46fc 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -105,10 +105,10 @@ impl<T: Reflectable> Deref for JS<T> {
}
}
-impl<T: Reflectable> JSTraceable for JS<T> {
- fn trace(&self, trc: *mut JSTracer) {
+unsafe impl<T: Reflectable> JSTraceable for JS<T> {
+ unsafe fn trace(&self, trc: *mut JSTracer) {
#[cfg(debug_assertions)]
- let trace_str = format!("for {} on heap", unsafe { type_name::<T>() });
+ let trace_str = format!("for {} on heap", type_name::<T>());
#[cfg(debug_assertions)]
let trace_info = &trace_str[..];
#[cfg(not(debug_assertions))]
@@ -116,7 +116,7 @@ impl<T: Reflectable> JSTraceable for JS<T> {
trace_reflector(trc,
trace_info,
- unsafe { (**self.ptr).reflector() });
+ (**self.ptr).reflector());
}
}