Mark JSTraceable and its method as unsafe

This commit is contained in:
Anthony Ramine 2016-12-01 02:50:06 +01:00
parent 73b6e705b4
commit 620a67ff14
16 changed files with 191 additions and 185 deletions

View file

@ -143,8 +143,9 @@ impl WeakMediaQueryListVec {
}
}
impl JSTraceable for WeakMediaQueryListVec {
fn trace(&self, _: *mut JSTracer) {
#[allow(unsafe_code)]
unsafe impl JSTraceable for WeakMediaQueryListVec {
unsafe fn trace(&self, _: *mut JSTracer) {
self.cell.borrow_mut().retain_alive()
}
}