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

@ -601,7 +601,7 @@ impl CanvasRenderingContext2DMethods<crate::DomTypeHolder> for CanvasRenderingCo
y1: Finite<f64>,
) -> DomRoot<CanvasGradient> {
self.canvas_state
.create_linear_gradient(&self.global(), x0, y0, x1, y1)
.create_linear_gradient(&self.global(), x0, y0, x1, y1, CanGc::note())
}
// https://html.spec.whatwg.org/multipage/#dom-context-2d-createradialgradient
@ -614,8 +614,16 @@ impl CanvasRenderingContext2DMethods<crate::DomTypeHolder> for CanvasRenderingCo
y1: Finite<f64>,
r1: Finite<f64>,
) -> Fallible<DomRoot<CanvasGradient>> {
self.canvas_state
.create_radial_gradient(&self.global(), x0, y0, r0, x1, y1, r1)
self.canvas_state.create_radial_gradient(
&self.global(),
x0,
y0,
r0,
x1,
y1,
r1,
CanGc::note(),
)
}
// https://html.spec.whatwg.org/multipage/#dom-context-2d-createpattern
@ -625,7 +633,7 @@ impl CanvasRenderingContext2DMethods<crate::DomTypeHolder> for CanvasRenderingCo
repetition: DOMString,
) -> Fallible<Option<DomRoot<CanvasPattern>>> {
self.canvas_state
.create_pattern(&self.global(), image, repetition)
.create_pattern(&self.global(), image, repetition, CanGc::note())
}
// https://html.spec.whatwg.org/multipage/#dom-context-2d-linewidth