From b1f3390fe4fbe94fdd8c6a29ea76f7adfc7ff155 Mon Sep 17 00:00:00 2001
From: Rick Waldron <rwaldron@salesforce.com>
Date: Thu, 4 Nov 2021 13:27:30 -0400
Subject: [PATCH] Features: remove duplicate "cleanupSome" feature (#2892)

* Features: remove duplicate "cleanupSome" feature

* Replace feature flag in harness file

Co-authored-by: Mike Pennisi <mike@mikepennisi.com>
---
 features.txt                                                    | 1 -
 harness/async-gc.js                                             | 2 +-
 .../gc-has-one-chance-to-call-cleanupCallback.js                | 2 +-
 .../prototype/cleanupSome/callback-not-callable-throws.js       | 2 +-
 .../prototype/cleanupSome/cleanup-prevented-with-reference.js   | 2 +-
 .../prototype/cleanupSome/cleanup-prevented-with-unregister.js  | 2 +-
 .../FinalizationRegistry/prototype/cleanupSome/custom-this.js   | 2 +-
 .../prototype/cleanupSome/holdings-multiple-values.js           | 2 +-
 .../FinalizationRegistry/prototype/cleanupSome/length.js        | 2 +-
 .../FinalizationRegistry/prototype/cleanupSome/name.js          | 2 +-
 .../FinalizationRegistry/prototype/cleanupSome/prop-desc.js     | 2 +-
 .../FinalizationRegistry/prototype/cleanupSome/reentrancy.js    | 2 +-
 .../prototype/cleanupSome/return-undefined-with-gc.js           | 2 +-
 .../prototype/cleanupSome/return-undefined.js                   | 2 +-
 .../cleanupSome/this-does-not-have-internal-cells-throws.js     | 2 +-
 .../prototype/cleanupSome/this-not-object-throws.js             | 2 +-
 .../prototype/unregister/unregister-cleaned-up-cell.js          | 2 +-
 .../prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js   | 2 +-
 18 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/features.txt b/features.txt
index fae5d364fa..76d5a37d70 100644
--- a/features.txt
+++ b/features.txt
@@ -156,7 +156,6 @@ FinalizationRegistry
 # FinalizationRegistry#cleanupSome
 # link pending
 FinalizationRegistry.prototype.cleanupSome
-cleanupSome
 
 # Optional Chaining
 # https://github.com/tc39/proposal-optional-chaining
diff --git a/harness/async-gc.js b/harness/async-gc.js
index 0735182271..65a589dbae 100644
--- a/harness/async-gc.js
+++ b/harness/async-gc.js
@@ -3,7 +3,7 @@
 /*---
 description: >
     Collection of functions used to capture references cleanup from garbage collectors
-features: [cleanupSome, FinalizationRegistry, Symbol, async-functions]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, Symbol, async-functions]
 flags: [non-deterministic]
 defines: [asyncGC, asyncGCDeref, resolveAsyncGC]
 ---*/
diff --git a/test/built-ins/FinalizationRegistry/gc-has-one-chance-to-call-cleanupCallback.js b/test/built-ins/FinalizationRegistry/gc-has-one-chance-to-call-cleanupCallback.js
index 9b6ab0366d..bc9d6f589d 100644
--- a/test/built-ins/FinalizationRegistry/gc-has-one-chance-to-call-cleanupCallback.js
+++ b/test/built-ins/FinalizationRegistry/gc-has-one-chance-to-call-cleanupCallback.js
@@ -25,7 +25,7 @@ info: |
   2. For each FinalizationRegistry finalizationRegistry such that finalizationRegistry.[[Cells]] contains cell, such that cell.[[Target]] is obj,
     a. Set cell.[[Target]] to empty.
     b. Optionally, perform ! HostCleanupFinalizationRegistry(finalizationRegistry).
-features: [cleanupSome, FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, async-functions, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, async-functions, host-gc-required]
 flags: [async, non-deterministic]
 includes: [async-gc.js, compareArray.js]
 ---*/
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/callback-not-callable-throws.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/callback-not-callable-throws.js
index 49fa6eb4f3..94bb62561a 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/callback-not-callable-throws.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/callback-not-callable-throws.js
@@ -12,7 +12,7 @@ info: |
   3. If finalizationRegistry does not have a [[Cells]] internal slot, throw a TypeError exception.
   4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
   ...
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry]
 ---*/
 
 assert.sameValue(typeof FinalizationRegistry.prototype.cleanupSome, 'function');
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-reference.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-reference.js
index 9364318988..fbe6b2368d 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-reference.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-reference.js
@@ -13,7 +13,7 @@ info: |
   4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
   5. Perform ? CleanupFinalizationRegistry(finalizationRegistry, callback).
   6. Return undefined.
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, host-gc-required]
 includes: [async-gc.js]
 flags: [async, non-deterministic]
 ---*/
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-unregister.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-unregister.js
index b2d606f713..808e57608c 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-unregister.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-unregister.js
@@ -22,7 +22,7 @@ info: |
       i. Remove cell from finalizationRegistry.[[Cells]].
       ii. Set removed to true.
   3. Return removed.
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, host-gc-required]
 includes: [async-gc.js]
 flags: [async, non-deterministic]
 ---*/
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/custom-this.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/custom-this.js
index 75fdb96fd3..1ce10b3aad 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/custom-this.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/custom-this.js
@@ -13,7 +13,7 @@ info: |
   4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
   5. Perform ! CleanupFinalizationRegistry(finalizationRegistry, callback).
   6. Return undefined.
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry]
 ---*/
 
 var fn = function() {};
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/holdings-multiple-values.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/holdings-multiple-values.js
index 60f3198cf2..e08cc91ee4 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/holdings-multiple-values.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/holdings-multiple-values.js
@@ -23,7 +23,7 @@ info: |
   ...
 
 
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry, Symbol, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, Symbol, host-gc-required]
 includes: [async-gc.js]
 flags: [async, non-deterministic]
 ---*/
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/length.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/length.js
index e936ab4b6a..46adfedfec 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/length.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/length.js
@@ -21,7 +21,7 @@ info: |
   function object has the attributes { [[Writable]]: false,
   [[Enumerable]]: false, [[Configurable]]: true }.
 includes: [propertyHelper.js]
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry]
 ---*/
 
 verifyProperty(FinalizationRegistry.prototype.cleanupSome, 'length', {
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/name.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/name.js
index 510a6f9327..27dd5f67d3 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/name.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/name.js
@@ -20,7 +20,7 @@ info: |
   object, if it exists, has the attributes { [[Writable]]: false,
   [[Enumerable]]: false, [[Configurable]]: true }.
 includes: [propertyHelper.js]
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry]
 ---*/
 
 verifyProperty(FinalizationRegistry.prototype.cleanupSome, 'name', {
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/prop-desc.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/prop-desc.js
index d82cdbe004..18cd489e95 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/prop-desc.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/prop-desc.js
@@ -12,7 +12,7 @@ info: |
   has the attributes { [[Writable]]: true, [[Enumerable]]: false,
   [[Configurable]]: true } unless otherwise specified.
 includes: [propertyHelper.js]
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry]
 ---*/
 
 assert.sameValue(typeof FinalizationRegistry.prototype.cleanupSome, 'function');
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/reentrancy.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/reentrancy.js
index 8cc437e087..786f009359 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/reentrancy.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/reentrancy.js
@@ -8,7 +8,7 @@ description: >
 info: |
   FinalizationRegistry.prototype.cleanupSome ( [ callback ] )
 
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, host-gc-required]
 includes: [async-gc.js]
 flags: [async, non-deterministic]
 ---*/
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js
index d102379bdd..83d2107162 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js
@@ -13,7 +13,7 @@ info: |
   4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
   5. Perform ? CleanupFinalizationRegistry(finalizationRegistry, callback).
   6. Return undefined.
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry, arrow-function, async-functions, async-iteration, class, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, arrow-function, async-functions, async-iteration, class, host-gc-required]
 includes: [async-gc.js]
 flags: [async, non-deterministic]
 ---*/
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js
index e5e1b30e5f..ba0b53914f 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js
@@ -13,7 +13,7 @@ info: |
   4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
   5. Perform ? CleanupFinalizationRegistry(finalizationRegistry, callback).
   6. Return undefined.
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry, arrow-function, async-functions, async-iteration, class]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, arrow-function, async-functions, async-iteration, class]
 ---*/
 
 var fn = function() {};
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-does-not-have-internal-cells-throws.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-does-not-have-internal-cells-throws.js
index 623068f6da..0052bb494a 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-does-not-have-internal-cells-throws.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-does-not-have-internal-cells-throws.js
@@ -12,7 +12,7 @@ info: |
   3. If finalizationRegistry does not have a [[Cells]] internal slot, throw a TypeError exception.
   4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
   ...
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, WeakSet, WeakMap, FinalizationRegistry, WeakRef]
+features: [FinalizationRegistry.prototype.cleanupSome, WeakSet, WeakMap, FinalizationRegistry, WeakRef]
 ---*/
 
 assert.sameValue(typeof FinalizationRegistry.prototype.cleanupSome, 'function');
diff --git a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-not-object-throws.js b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-not-object-throws.js
index 002589c332..e94692ddde 100644
--- a/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-not-object-throws.js
+++ b/test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-not-object-throws.js
@@ -12,7 +12,7 @@ info: |
   3. If finalizationRegistry does not have a [[Cells]] internal slot, throw a TypeError exception.
   4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
   ...
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry]
 ---*/
 
 assert.sameValue(typeof FinalizationRegistry.prototype.cleanupSome, 'function');
diff --git a/test/built-ins/FinalizationRegistry/prototype/unregister/unregister-cleaned-up-cell.js b/test/built-ins/FinalizationRegistry/prototype/unregister/unregister-cleaned-up-cell.js
index e3f566705a..e303455086 100644
--- a/test/built-ins/FinalizationRegistry/prototype/unregister/unregister-cleaned-up-cell.js
+++ b/test/built-ins/FinalizationRegistry/prototype/unregister/unregister-cleaned-up-cell.js
@@ -29,7 +29,7 @@ info: |
       i. Remove cell from finalizationRegistry.[[Cells]].
       ii. Set removed to true.
   3. Return removed.
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, FinalizationRegistry, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, FinalizationRegistry, host-gc-required]
 includes: [async-gc.js]
 flags: [async, non-deterministic]
 ---*/
diff --git a/test/built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js b/test/built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js
index 07e0911a2d..adcd3acb03 100644
--- a/test/built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js
+++ b/test/built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js
@@ -13,7 +13,7 @@ info: |
     a. Perform ! KeepDuringJob(target).
     b. Return target.
   6. Return undefined.
-features: [FinalizationRegistry.prototype.cleanupSome, cleanupSome, WeakRef, host-gc-required]
+features: [FinalizationRegistry.prototype.cleanupSome, WeakRef, host-gc-required]
 includes: [async-gc.js]
 flags: [async, non-deterministic]
 ---*/