refactor: propagate CanGc arguments through callers (#35565)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-21 18:35:17 +01:00 committed by GitHub
parent 085cd981aa
commit ca1f0486ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 62 additions and 42 deletions

View file

@ -36,6 +36,7 @@ impl GainNode {
window: &Window,
context: &BaseAudioContext,
options: &GainOptions,
can_gc: CanGc,
) -> Fallible<GainNode> {
let node_options =
options
@ -58,7 +59,7 @@ impl GainNode {
*options.gain, // default value
f32::MIN, // min value
f32::MAX, // max value
CanGc::note(),
can_gc,
);
Ok(GainNode {
node,
@ -83,7 +84,7 @@ impl GainNode {
options: &GainOptions,
can_gc: CanGc,
) -> Fallible<DomRoot<GainNode>> {
let node = GainNode::new_inherited(window, context, options)?;
let node = GainNode::new_inherited(window, context, options, can_gc)?;
Ok(reflect_dom_object_with_proto(
Box::new(node),
window,