From f7ed2490d4c5572281528f6cc620786f261670a7 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sun, 31 Jan 2021 20:24:49 +0530 Subject: [PATCH] test: remove outdated V8 flag The `--concurrent-array-buffer-freeing` flag is going to be removed upstream in V8 9.0. PR-URL: https://github.com/nodejs/node-addon-api/pull/895 Refs: https://github.com/v8/v8/commit/0a480c30d553c1b8dddb0dddcbdec5fb6f3101ff Reviewed-By: Michael Dawson --- test/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index 2d963ca10..35db3187b 100644 --- a/test/index.js +++ b/test/index.js @@ -4,7 +4,11 @@ const majorNodeVersion = process.versions.node.split('.')[0]; if (typeof global.gc !== 'function') { // Construct the correct (version-dependent) command-line args. - let args = ['--expose-gc', '--no-concurrent-array-buffer-freeing']; + let args = ['--expose-gc']; + const majorV8Version = process.versions.v8.split('.')[0]; + if (majorV8Version < 9) { + args.push('--no-concurrent-array-buffer-freeing'); + } if (majorNodeVersion >= 14) { args.push('--no-concurrent-array-buffer-sweeping'); }