Skip to content

Commit

Permalink
fixup! comments
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 2, 2025
1 parent 090106f commit f340945
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions packages/pass-style/test/passStyleOf.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,17 @@ test('passStyleOf testing remotables', t => {
t.is(passStyleOf(farObj1), 'remotable');

const tagRecord2 = makeTagishRecord('Alleged: tagRecord not hardened');
/** @type {any} UNTIL https://github.com/microsoft/TypeScript/issues/38385 */
// TODO In order to run this test before we have explicit support for a
// non-trapping integrity level, we have to `freeze` here but not `harden`.
// However, once we do have that support, and `passStyleOf` checks that
// its argument is also non-trapping, we still need to avoid `harden`
// because that would also hardden `mercurialProto`. So we will need to
// explicitly make this non-trapping, which we cannot yet express.
/**
* TODO In order to run this test before we have explicit support for a
* non-trapping integrity level, we have to `freeze` here but not `harden`.
* However, once we do have that support, and `passStyleOf` checks that
* its argument is also non-trapping, we still need to avoid `harden`
* because that would also hardden `__proto__`. So we will need to
* explicitly make this non-trapping, which we cannot yet express.
* @see https://github.com/tc39/proposal-stabilize
*
* @type {any} UNTIL https://github.com/microsoft/TypeScript/issues/38385
*/
const farObj2 = freeze({ __proto__: tagRecord2 });
if (harden.isFake) {
t.is(passStyleOf(farObj2), 'remotable');
Expand Down Expand Up @@ -373,12 +377,15 @@ test('remotables - safety from the gibson042 attack', t => {
},
);

// TODO In order to run this test before we have explicit support for a
// non-trapping integrity level, we have to `freeze` here but not `harden`.
// However, once we do have that support, and `passStyleOf` checks that
// its argument is also non-trapping, we still need to avoid `harden`
// because that would also hardden `mercurialProto`. So we will need to
// explicitly make this non-trapping, which we cannot yet express.
/**
* TODO In order to run this test before we have explicit support for a
* non-trapping integrity level, we have to `freeze` here but not `harden`.
* However, once we do have that support, and `passStyleOf` checks that
* its argument is also non-trapping, we still need to avoid `harden`
* because that would also hardden `__proto__`. So we will need to
* explicitly make this non-trapping, which we cannot yet express.
* @see https://github.com/tc39/proposal-stabilize
*/
const makeInput = () => freeze({ __proto__: mercurialProto });
const input1 = makeInput();
const input2 = makeInput();
Expand Down

0 comments on commit f340945

Please sign in to comment.