Closed rot1024 closed 1 year ago
When repeating calling a function, an error occurs from quickjs-emscripten.
import { getQuickJS } from "quickjs-emscripten"; import { expect, test } from "vitest"; import { Arena } from "."; test( "repeated function", async () => { const rt = (await getQuickJS()).newRuntime(); const ctx = rt.newContext(); const arena = new Arena(ctx, { isMarshalable: true }); vm.expose({ hoge: () => {} }); // error happens from 3926 times on my machine for (let i = 0; i < 3926; i++) { // arg should be an object arena.evalCode(`hoge({})`); } arena.dispose(); ctx.dispose(); rt.dispose(); }, 1000 * 60, );
reported at https://github.com/justjake/quickjs-emscripten/issues/98
This issue is already fixed. I forgot closing it
When repeating calling a function, an error occurs from quickjs-emscripten.