diff --git a/components/script/dom/bindings/cell.rs b/components/script/dom/bindings/cell.rs index f250e818412..81085256821 100644 --- a/components/script/dom/bindings/cell.rs +++ b/components/script/dom/bindings/cell.rs @@ -52,7 +52,7 @@ impl DOMRefCell { /// /// For safety checks in debug builds only. pub fn is_mutably_borrowed(&self) -> bool { - self.value.try_borrow().is_some() + self.value.borrow_state() == BorrowState::Writing } /// Attempts to immutably borrow the wrapped value.