diff --git a/boa/src/builtins/object/gcobject.rs b/boa/src/builtins/object/gcobject.rs index 17d172acda..b13e4c9090 100644 --- a/boa/src/builtins/object/gcobject.rs +++ b/boa/src/builtins/object/gcobject.rs @@ -55,6 +55,7 @@ impl GcObject { ///# Panics /// Panics if the object is currently mutably borrowed. #[inline] + #[track_caller] pub fn borrow(&self) -> Ref<'_> { self.try_borrow().expect("Object already mutably borrowed") } @@ -67,6 +68,7 @@ impl GcObject { ///# Panics /// Panics if the object is currently borrowed. #[inline] + #[track_caller] pub fn borrow_mut(&self) -> RefMut<'_> { self.try_borrow_mut().expect("Object already borrowed") } @@ -105,6 +107,7 @@ impl GcObject { /// Panics if the object is currently mutably borrowed. // // + #[track_caller] pub fn call(&self, this: &Value, args: &[Value], ctx: &mut Interpreter) -> Result { let this_function_object = self.clone(); let f_body = if let Some(function) = self.borrow().as_function() { @@ -186,6 +189,7 @@ impl GcObject { ///# Panics /// Panics if the object is currently mutably borrowed. // + #[track_caller] pub fn construct(&self, args: &[Value], ctx: &mut Interpreter) -> Result { let this = Object::create(self.borrow().get(&PROTOTYPE.into())).into();