Make JSTraceable for DomRefCell<T> panic if cell is mutably borrowed (see #19871)

This commit is contained in:
Anthony Ramine 2018-01-26 10:12:40 +01:00
parent c9ba16f9fb
commit 31a14082eb
2 changed files with 1 additions and 13 deletions

View file

@ -206,7 +206,7 @@ unsafe impl<T: JSTraceable> JSTraceable for UnsafeCell<T> {
unsafe impl<T: JSTraceable> JSTraceable for DomRefCell<T> {
unsafe fn trace(&self, trc: *mut JSTracer) {
(*self).borrow_for_gc_trace().trace(trc)
(*self).borrow().trace(trc)
}
}