Propagate CanGc arguments through callers in constructors (#35541)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-20 17:17:45 +01:00 committed by GitHub
parent 5465bfc2af
commit 863d2ce871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
260 changed files with 986 additions and 603 deletions

View file

@ -267,7 +267,7 @@ impl WorkerGlobalScopeMethods<crate::DomTypeHolder> for WorkerGlobalScope {
// https://html.spec.whatwg.org/multipage/#dom-workerglobalscope-location
fn Location(&self) -> DomRoot<WorkerLocation> {
self.location
.or_init(|| WorkerLocation::new(self, self.worker_url.borrow().clone()))
.or_init(|| WorkerLocation::new(self, self.worker_url.borrow().clone(), CanGc::note()))
}
// https://html.spec.whatwg.org/multipage/#handler-workerglobalscope-onerror
@ -340,7 +340,8 @@ impl WorkerGlobalScopeMethods<crate::DomTypeHolder> for WorkerGlobalScope {
// https://html.spec.whatwg.org/multipage/#dom-worker-navigator
fn Navigator(&self) -> DomRoot<WorkerNavigator> {
self.navigator.or_init(|| WorkerNavigator::new(self))
self.navigator
.or_init(|| WorkerNavigator::new(self, CanGc::note()))
}
// https://html.spec.whatwg.org/multipage/#dfn-Crypto
@ -444,7 +445,7 @@ impl WorkerGlobalScopeMethods<crate::DomTypeHolder> for WorkerGlobalScope {
fn Performance(&self) -> DomRoot<Performance> {
self.performance.or_init(|| {
let global_scope = self.upcast::<GlobalScope>();
Performance::new(global_scope, self.navigation_start)
Performance::new(global_scope, self.navigation_start, CanGc::note())
})
}