From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Sun, 1 Mar 2020 13:59:57 -0800
Subject: Rename FinalizationGroup to FinalizationRegistry for JS

https://chromium-review.googlesource.com/c/v8/v8/+/2071236

This is already present in Node.js v14 and can be removed when we upgrade.

diff --git a/test/parallel/test-finalization-group-error.js b/test/parallel/test-finalization-group-error.js
index 0685811f55b7f8efc88e04ffd5e173ed7d415258..46a670073b1dbba9729e54166378991a7edba5a0 100644
--- a/test/parallel/test-finalization-group-error.js
+++ b/test/parallel/test-finalization-group-error.js
@@ -5,7 +5,7 @@
 const common = require('../common');
 const assert = require('assert');
 
-const g = new globalThis.FinalizationGroup(common.mustCallAtLeast(() => {
+const g = new globalThis.FinalizationRegistry(common.mustCallAtLeast(() => {
   throw new Error('test');
 }, 1));
 g.register({}, 42);
diff --git a/test/parallel/test-finalization-group-regular-gc.js b/test/parallel/test-finalization-group-regular-gc.js
index 7a4a4797eadcf02867ad30c20b37060fa7abb5fb..3c16cfcee23e971fde8793a0478a819d3fc59d90 100644
--- a/test/parallel/test-finalization-group-regular-gc.js
+++ b/test/parallel/test-finalization-group-regular-gc.js
@@ -7,7 +7,7 @@ const assert = require('assert');
 // GC (not global.gc()).
 
 const start = Date.now();
-const g = new globalThis.FinalizationGroup(() => {
+const g = new globalThis.FinalizationRegistry(() => {
   const diff = Date.now() - start;
   assert(diff < 10000, `${diff} >= 10000`);
 });
diff --git a/test/parallel/test-finalization-group.js b/test/parallel/test-finalization-group.js
index 3e6b9d72e356480e2b78f0b336f252d0eec641d4..4b9357e4d18e6c21d53fc6534f5af1f98805b150 100644
--- a/test/parallel/test-finalization-group.js
+++ b/test/parallel/test-finalization-group.js
@@ -4,7 +4,7 @@
 
 const common = require('../common');
 
-const g = new globalThis.FinalizationGroup(common.mustCallAtLeast(1));
+const g = new globalThis.FinalizationRegistry(common.mustCallAtLeast(1));
 g.register({}, 42);
 
 setTimeout(() => {
