mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
61c8fe6fb0
The spec says HostMakeJobCallback has to be used on the callback: https://tc39.es/ecma262/multipage/managing-memory.html#sec-finalization-registry-cleanup-callback That makes the following (arguably contrived) example run forever until memory is exhausted. ```js let count = 0; function main() { console.log(`main! ${++count}`); const registry = new FinalizationRegistry(() => { globalThis.foo = main(); }); registry.register([]); registry.register([]); return registry; } main(); console.log(count); ``` That is unlike V8, which runs 0 times. This can be explained by the difference in GC implementations and since FinRec makes GC observable, here we are! Fixes: https://github.com/quickjs-ng/quickjs/issues/432 |
||
---|---|---|
.. | ||
function_source.js | ||
microbench.js | ||
test262.patch | ||
test_bigint.js | ||
test_bjson.js | ||
test_builtin.js | ||
test_closure.js | ||
test_conv.c | ||
test_language.js | ||
test_loop.js | ||
test_queue_microtask.js | ||
test_std.js | ||
test_worker.js | ||
test_worker_module.js |