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

@ -848,11 +848,12 @@ impl CanvasState {
y0: Finite<f64>,
x1: Finite<f64>,
y1: Finite<f64>,
can_gc: CanGc,
) -> DomRoot<CanvasGradient> {
CanvasGradient::new(
global,
CanvasGradientStyle::Linear(LinearGradientStyle::new(*x0, *y0, *x1, *y1, Vec::new())),
CanGc::note(),
can_gc,
)
}
@ -867,6 +868,7 @@ impl CanvasState {
x1: Finite<f64>,
y1: Finite<f64>,
r1: Finite<f64>,
can_gc: CanGc,
) -> Fallible<DomRoot<CanvasGradient>> {
if *r0 < 0. || *r1 < 0. {
return Err(Error::IndexSize);
@ -883,7 +885,7 @@ impl CanvasState {
*r1,
Vec::new(),
)),
CanGc::note(),
can_gc,
))
}
@ -893,6 +895,7 @@ impl CanvasState {
global: &GlobalScope,
image: CanvasImageSource,
mut repetition: DOMString,
can_gc: CanGc,
) -> Fallible<Option<DomRoot<CanvasPattern>>> {
let (image_data, image_size) = match image {
CanvasImageSource::HTMLImageElement(ref image) => {
@ -941,7 +944,7 @@ impl CanvasState {
image_size,
rep,
self.is_origin_clean(image),
CanGc::note(),
can_gc,
)))
} else {
Err(Error::Syntax)