Apply review feedback

This commit is contained in:
Leo Balter 2019-06-19 14:06:20 -04:00 committed by Rick Waldron
parent ca11ac4a43
commit 73f80aea4d
11 changed files with 35 additions and 38 deletions

View File

@ -6,6 +6,7 @@ esid: sec-finalization-group-constructor
description: > description: >
The FinalizationGroup constructor is the %FinalizationGroup% intrinsic object and the initial The FinalizationGroup constructor is the %FinalizationGroup% intrinsic object and the initial
value of the FinalizationGroup property of the global object. value of the FinalizationGroup property of the global object.
features: [FinalizationGroup]
---*/ ---*/
assert.sameValue( assert.sameValue(

View File

@ -23,7 +23,7 @@ info: |
4. Set obj.[[Prototype]] to proto. 4. Set obj.[[Prototype]] to proto.
5. Set obj.[[Extensible]] to true. 5. Set obj.[[Extensible]] to true.
6. Return obj. 6. Return obj.
features: [FinalizationGroup, Reflect] features: [FinalizationGroup]
---*/ ---*/
var fg = new FinalizationGroup(function() {}); var fg = new FinalizationGroup(function() {});

View File

@ -38,4 +38,4 @@ assert.throws(Test262Error, function() {
Reflect.construct(FinalizationGroup, [function() {}], newTarget); Reflect.construct(FinalizationGroup, [function() {}], newTarget);
}); });
assert.sameValue(calls, 1); assert.sameValue(calls, 1);

View File

@ -20,38 +20,34 @@ assert.sameValue(typeof FinalizationGroup.prototype.cleanupSome, 'function');
var fg = new FinalizationGroup(function() {}); var fg = new FinalizationGroup(function() {});
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(undefined); fg.cleanupSome(null);
}, 'undefined');
assert.throws(TypeError, function() {
fg(null);
}, 'null'); }, 'null');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(true); fg.cleanupSome(true);
}, 'true'); }, 'true');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(false); fg.cleanupSome(false);
}, 'false'); }, 'false');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(1); fg.cleanupSome(1);
}, 'number'); }, 'number');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg('object'); fg.cleanupSome('object');
}, 'string'); }, 'string');
var s = Symbol(); var s = Symbol();
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(s); fg.cleanupSome(s);
}, 'symbol'); }, 'symbol');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg({}); fg.cleanupSome({});
}, 'object'); }, 'object');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(FinalizationGroup.prototype); fg.cleanupSome(FinalizationGroup.prototype);
}, 'FinalizationGroup.prototype'); }, 'FinalizationGroup.prototype');

View File

@ -13,7 +13,7 @@ info: |
4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception. 4. If callback is not undefined and IsCallable(callback) is false, throw a TypeError exception.
5. Perform ! CleanupFinalizationGroup(finalizationGroup, callback). 5. Perform ! CleanupFinalizationGroup(finalizationGroup, callback).
6. Return undefined. 6. Return undefined.
features: [FinalizationGroup] features: [FinalizationGroup, arrow-function, async-functions, async-iteration, class]
---*/ ---*/
var fn = function() {}; var fn = function() {};

View File

@ -26,7 +26,7 @@ features: [FinalizationGroup]
verifyProperty(FinalizationGroup.prototype.register, 'length', { verifyProperty(FinalizationGroup.prototype.register, 'length', {
value: 2, value: 2,
writable: false,
enumerable: false, enumerable: false,
writable: false,
configurable: true configurable: true
}); });

View File

@ -25,7 +25,7 @@ features: [FinalizationGroup]
verifyProperty(FinalizationGroup.prototype.register, 'name', { verifyProperty(FinalizationGroup.prototype.register, 'name', {
value: 'register', value: 'register',
writable: false,
enumerable: false, enumerable: false,
writable: false,
configurable: true configurable: true
}); });

View File

@ -23,30 +23,30 @@ assert.sameValue(typeof FinalizationGroup.prototype.register, 'function');
var fg = new FinalizationGroup(function() {}); var fg = new FinalizationGroup(function() {});
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(undefined); fg.register(undefined);
}, 'undefined'); }, 'undefined');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(null); fg.register(null);
}, 'null'); }, 'null');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(true); fg.register(true);
}, 'true'); }, 'true');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(false); fg.register(false);
}, 'false'); }, 'false');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(1); fg.register(1);
}, 'number'); }, 'number');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg('object'); fg.register('object');
}, 'string'); }, 'string');
var s = Symbol(); var s = Symbol();
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(s); fg.register(s);
}, 'symbol'); }, 'symbol');

View File

@ -23,26 +23,26 @@ var fg = new FinalizationGroup(function() {});
var target = {}; var target = {};
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(target, undefined, null); fg.register(target, undefined, null);
}, 'null'); }, 'null');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(target, undefined, true); fg.register(target, undefined, true);
}, 'true'); }, 'true');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(target, undefined, false); fg.register(target, undefined, false);
}, 'false'); }, 'false');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(target, undefined, 1); fg.register(target, undefined, 1);
}, 'number'); }, 'number');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(target, undefined, 'object'); fg.register(target, undefined, 'object');
}, 'string'); }, 'string');
var s = Symbol(); var s = Symbol();
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(target, undefined, s); fg.register(target, undefined, s);
}, 'symbol'); }, 'symbol');

View File

@ -20,30 +20,30 @@ assert.sameValue(typeof FinalizationGroup.prototype.unregister, 'function');
var fg = new FinalizationGroup(function() {}); var fg = new FinalizationGroup(function() {});
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(undefined); fg.unregister(undefined);
}, 'undefined'); }, 'undefined');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(null); fg.unregister(null);
}, 'null'); }, 'null');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(true); fg.unregister(true);
}, 'true'); }, 'true');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(false); fg.unregister(false);
}, 'false'); }, 'false');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(1); fg.unregister(1);
}, 'number'); }, 'number');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg('object'); fg.unregister('object');
}, 'string'); }, 'string');
var s = Symbol(); var s = Symbol();
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
fg(s); fg.unregister(s);
}, 'symbol'); }, 'symbol');

View File

@ -18,7 +18,7 @@ info: |
... ...
2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto). 2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto).
3. Return ObjectCreate(proto, internalSlotsList). 3. Return ObjectCreate(proto, internalSlotsList).
features: [FinalizationGroup] features: [FinalizationGroup, for-of]
---*/ ---*/
var cleanupCallback = function() {}; var cleanupCallback = function() {};