When does a FinalizationRegistry callback get a chance to run relative to garbage collection, and what guarantees does the spec provide about it?
const reg = new FinalizationRegistry((held) => {
console.log('cleanup', held);
});
(function () {
let obj = {};
reg.register(obj, 'token-1');
})();
// obj is now unreachable