mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 11:41:13 +08:00
fix: generator/async native 状态 session 字符串 GC 标记修复
This commit is contained in:
@@ -172,6 +172,9 @@ impl SessionGc {
|
|||||||
for value in crate::generator::generator_native_edges(obj) {
|
for value in crate::generator::generator_native_edges(obj) {
|
||||||
Self::process_edge(value, vm, stack, live_strings, live_bigints);
|
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() {
|
if obj.is_promise_obj() {
|
||||||
for value in crate::promise::promise_native_edges(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) {
|
for value in crate::async_func::async_native_edges(obj) {
|
||||||
Self::process_edge(value, vm, stack, live_strings, live_bigints);
|
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() {
|
if obj.is_async_generator_obj() {
|
||||||
for value in crate::async_generator::async_generator_native_edges(obj) {
|
for value in crate::async_generator::async_generator_native_edges(obj) {
|
||||||
Self::process_edge(value, vm, stack, live_strings, live_bigints);
|
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 中的引用。
|
// 遍历 upvalue cell 中的引用。
|
||||||
for cell_ptr in obj.upvalues_slice() {
|
for cell_ptr in obj.upvalues_slice() {
|
||||||
|
|||||||
Reference in New Issue
Block a user