MCPcopy Create free account
hub / github.com/nodejs/node / run

Function run

test/fixtures/snapshot/weak-reference-gc.js:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11let maxGC = 10;
12
13function run() {
14 globalThis.gc();
15 setImmediate(() => {
16 gcCount++;
17 if (ref.get() === undefined) {
18 return;
19 } else if (gcCount < maxGC) {
20 run();
21 } else {
22 throw new Error(`Reference is still around after ${maxGC} GC`);
23 }
24 });
25}
26
27setDeserializeMainFunction(() => {
28 obj = null;

Callers 1

Calls 2

getMethod · 0.65
setImmediateFunction · 0.50

Tested by

no test coverage detected