fix: generator/async native 状态 session 字符串 GC 标记修复

This commit is contained in:
2026-08-22 08:50:41 +08:00
parent c66dd81134
commit d2572682dc
+9
View File
@@ -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() {