aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/cell.rs12
-rw-r--r--components/script/dom/bindings/trace.rs2
2 files changed, 1 insertions, 13 deletions
diff --git a/components/script/dom/bindings/cell.rs b/components/script/dom/bindings/cell.rs
index c5a76bb4ee2..c40885866b5 100644
--- a/components/script/dom/bindings/cell.rs
+++ b/components/script/dom/bindings/cell.rs
@@ -29,18 +29,6 @@ impl<T> DomRefCell<T> {
&*self.value.as_ptr()
}
- /// Borrow the contents for the purpose of GC tracing.
- ///
- /// This succeeds even if the object is mutably borrowed,
- /// so you have to be careful in trace code!
- #[allow(unsafe_code)]
- pub unsafe fn borrow_for_gc_trace(&self) -> &T {
- // FIXME: IN_GC isn't reliable enough - doesn't catch minor GCs
- // https://github.com/servo/servo/issues/6389
- // debug_assert!(thread_state::get().contains(SCRIPT | IN_GC));
- &*self.value.as_ptr()
- }
-
/// Borrow the contents for the purpose of script deallocation.
///
#[allow(unsafe_code)]
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index 3d006d4a6ca..97d9f062688 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -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)
}
}