From 0e9746fbbec1ffb843d19e44e2729d5ad2b7479a Mon Sep 17 00:00:00 2001 From: Domenico Rizzo Date: Fri, 13 Dec 2024 16:51:59 +0100 Subject: Add CanGc argument to reflect_dom_object (#34606) * applied mach fmt Signed-off-by: Domenico Rizzo Refinements Signed-off-by: Domenico Rizzo Modified reflect_dom_object signature and all its calls Signed-off-by: Domenico Rizzo * fix function calls when parameter is passed up Signed-off-by: Domenico Rizzo --------- Signed-off-by: Domenico Rizzo --- components/script/dom/gamepadbuttonlist.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'components/script/dom/gamepadbuttonlist.rs') diff --git a/components/script/dom/gamepadbuttonlist.rs b/components/script/dom/gamepadbuttonlist.rs index ef0739ee060..6a7aeb8389f 100644 --- a/components/script/dom/gamepadbuttonlist.rs +++ b/components/script/dom/gamepadbuttonlist.rs @@ -9,6 +9,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot, DomSlice}; use crate::dom::gamepadbutton::GamepadButton; use crate::dom::globalscope::GlobalScope; +use crate::script_runtime::CanGc; // https://w3c.github.io/gamepad/#gamepadbutton-interface #[dom_struct] @@ -27,7 +28,11 @@ impl GamepadButtonList { } pub fn new(global: &GlobalScope, list: &[&GamepadButton]) -> DomRoot { - reflect_dom_object(Box::new(GamepadButtonList::new_inherited(list)), global) + reflect_dom_object( + Box::new(GamepadButtonList::new_inherited(list)), + global, + CanGc::note(), + ) } } -- cgit v1.2.3