From 60ef6bc46125d34e492a4294622e2791f3c619b5 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 22 Aug 2024 07:42:36 -0400 Subject: Start marking functions that can transitively trigger a GC (#33144) * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews --------- Signed-off-by: Josh Matthews --- components/script/script_runtime.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'components/script/script_runtime.rs') diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index 03916b14b09..bc1f8f7e1bc 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -1119,3 +1119,11 @@ impl Runnable { } } } + +pub struct CanGc(()); + +impl CanGc { + pub fn note() -> CanGc { + CanGc(()) + } +} -- cgit v1.2.3