refactor: propagate CanGc arguments through callers (#35591)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-23 01:34:51 +01:00 committed by GitHub
parent 02199520f2
commit b0b0289014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 403 additions and 275 deletions

View file

@ -93,13 +93,13 @@ impl PerformanceObserver {
/// Trigger performance observer callback with the list of performance entries
/// buffered since the last callback call.
pub(crate) fn notify(&self) {
pub(crate) fn notify(&self, can_gc: CanGc) {
if self.entries.borrow().is_empty() {
return;
}
let entry_list = PerformanceEntryList::new(self.entries.borrow_mut().drain(..).collect());
let observer_entry_list =
PerformanceObserverEntryList::new(&self.global(), entry_list, CanGc::note());
PerformanceObserverEntryList::new(&self.global(), entry_list, can_gc);
// using self both as thisArg and as the second formal argument
let _ = self
.callback