mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: replace gc(true) with gc({ type: 'minor' })
V8 considers gc(true) legacy, and the new signature is much more expressive. PR-URL: https://github.com/nodejs/node/pull/43493 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
1 parent
7be07c719c
commit
a5df207c2b
3 files changed
+3
-3
No files matched your search
@@ -16,7 +16,7 @@ process.on('uncaughtException', common.mustCall((err) => {
|
||||
throw new Error('finalizer error');
|
||||
}));
|
||||
}
|
||||
global.gc(true);
|
||||
global.gc({ type: 'minor' });
|
||||
await tick(common.platformTimeout(100));
|
||||
global.gc();
|
||||
await tick(common.platformTimeout(100));
|
||||
|
||||
@@ -23,7 +23,7 @@ const server = net.createServer(common.mustCall(function(conn) {
|
||||
}
|
||||
|
||||
while (conn.write(Buffer.from(data)));
|
||||
global.gc(true);
|
||||
global.gc({ type: 'minor' });
|
||||
// The buffer allocated above should still be alive.
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ const server = net.createServer(common.mustCall(function(conn) {
|
||||
}
|
||||
|
||||
while (conn.write(data, 'hex'));
|
||||
global.gc(true);
|
||||
global.gc({ type: 'minor' });
|
||||
// The buffer allocated inside the .write() call should still be alive.
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user