From d2572682dc9c133b8587172c452a2fa6319d75c2 Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Sat, 22 Aug 2026 08:50:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20generator/async=20native=20=E7=8A=B6?= =?UTF-8?q?=E6=80=81=20session=20=E5=AD=97=E7=AC=A6=E4=B8=B2=20GC=20?= =?UTF-8?q?=E6=A0=87=E8=AE=B0=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_vm/src/session_gc.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/oxide_vm/src/session_gc.rs b/crates/oxide_vm/src/session_gc.rs index 022612dc..1d4cdd93 100644 --- a/crates/oxide_vm/src/session_gc.rs +++ b/crates/oxide_vm/src/session_gc.rs @@ -172,6 +172,9 @@ impl SessionGc { for value in crate::generator::generator_native_edges(obj) { Self::process_edge(value, vm, stack, live_strings, live_bigints); } + for ptr in crate::generator::generator_native_string_edges(obj) { + Self::mark_string_live(live_strings, ptr); + } } if obj.is_promise_obj() { for value in crate::promise::promise_native_edges(obj) { @@ -182,11 +185,17 @@ impl SessionGc { for value in crate::async_func::async_native_edges(obj) { Self::process_edge(value, vm, stack, live_strings, live_bigints); } + for ptr in crate::async_func::async_native_string_edges(obj) { + Self::mark_string_live(live_strings, ptr); + } } if obj.is_async_generator_obj() { for value in crate::async_generator::async_generator_native_edges(obj) { Self::process_edge(value, vm, stack, live_strings, live_bigints); } + for ptr in crate::async_generator::async_generator_native_string_edges(obj) { + Self::mark_string_live(live_strings, ptr); + } } // 遍历 upvalue cell 中的引用。 for cell_ptr in obj.upvalues_slice() {