From 3f6cfad7ef06d1bf004a040436455515a708fa27 Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Mon, 23 Feb 2026 09:18:25 -0600 Subject: [PATCH] fix gc scanning for env on native fns --- source/runtime.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/runtime.c b/source/runtime.c index 94df3904..0163a847 100644 --- a/source/runtime.c +++ b/source/runtime.c @@ -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; }