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

@ -546,9 +546,9 @@ impl Window {
self.webxr_registry.clone()
}
fn new_paint_worklet(&self) -> DomRoot<Worklet> {
fn new_paint_worklet(&self, can_gc: CanGc) -> DomRoot<Worklet> {
debug!("Creating new paint worklet.");
Worklet::new(self, WorkletGlobalScopeType::Paint, CanGc::note())
Worklet::new(self, WorkletGlobalScopeType::Paint, can_gc)
}
pub(crate) fn register_image_cache_listener(
@ -1708,7 +1708,8 @@ impl Window {
// https://drafts.css-houdini.org/css-paint-api-1/#paint-worklet
pub(crate) fn paint_worklet(&self) -> DomRoot<Worklet> {
self.paint_worklet.or_init(|| self.new_paint_worklet())
self.paint_worklet
.or_init(|| self.new_paint_worklet(CanGc::note()))
}
pub(crate) fn has_document(&self) -> bool {