fix gc scanning for env on native fns

This commit is contained in:
2026-02-23 09:18:25 -06:00
parent 4edc4b7cc5
commit 3f6cfad7ef

View File

@@ -1475,6 +1475,7 @@ void gc_scan_object (JSContext *ctx, void *ptr, uint8_t *from_base, uint8_t *fro
fn->u.cell.env_record = gc_copy_value (ctx, fn->u.cell.env_record, from_base, from_end, to_base, to_free, to_end);
} else if (fn->kind == JS_FUNC_KIND_NATIVE) {
fn->u.cell.outer_frame = gc_copy_value (ctx, fn->u.cell.outer_frame, from_base, from_end, to_base, to_free, to_end);
fn->u.cell.env_record = gc_copy_value (ctx, fn->u.cell.env_record, from_base, from_end, to_base, to_free, to_end);
}
break;
}