1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

Revert "LibJS: Remove "uprooting" mechanism from garbage collector"

This reverts commit 6232ad3a0d.

Unfortunately this introduced some flakiness on CI, so it wasn't
quite this simple.
This commit is contained in:
Andreas Kling 2023-07-22 06:53:22 +02:00
parent a2955501d3
commit 1768d70823
6 changed files with 65 additions and 28 deletions

View file

@ -3,7 +3,9 @@ test("length is 0", () => {
});
function registerInDifferentScope(registry) {
registry.register({}, {});
const target = {};
registry.register(target, {});
return target;
}
test("basic functionality", () => {
@ -18,7 +20,8 @@ test("basic functionality", () => {
expect(count).toBe(0);
registerInDifferentScope(registry);
const target = registerInDifferentScope(registry);
markAsGarbage("target");
gc();
registry.cleanupSome(increment);