From 3a41c0e5f34e7c3f89613fc50994790316ca7d41 Mon Sep 17 00:00:00 2001 From: Roy Wright 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 2d963ca..35db318 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'); }