Skip to content

Commit bf6f359

Browse files
committed
Annotate DomRefCell::borrow/borrow_mut with #[track_caller]
Fixes servo#27336 Signed-off-by: Simon Wülker <[email protected]>
1 parent 81fa4d6 commit bf6f359

File tree

1 file changed

+2
-0
lines changed
  • components/script/dom/bindings

1 file changed

+2
-0
lines changed

components/script/dom/bindings/cell.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ impl<T> DomRefCell<T> {
103103
/// # Panics
104104
///
105105
/// Panics if the value is currently mutably borrowed.
106+
#[track_caller]
106107
pub fn borrow(&self) -> Ref<T> {
107108
self.value.borrow()
108109
}
@@ -115,6 +116,7 @@ impl<T> DomRefCell<T> {
115116
/// # Panics
116117
///
117118
/// Panics if the value is currently borrowed.
119+
#[track_caller]
118120
pub fn borrow_mut(&self) -> RefMut<T> {
119121
self.value.borrow_mut()
120122
}

0 commit comments

Comments
 (0)