Skip to content

Commit 6bbdc1a

Browse files
committed
feat(ses,pass-style): use no-trapping integrity level for safety
1 parent aed8d00 commit 6bbdc1a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

packages/no-trapping-shim/test/no-trapping-shim.test.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import '../src/no-trapping-shim.js';
2-
// TODO make compat with ses and uncomment
3-
// import test from '@endo/ses-ava/prepare-endo.js';
4-
// instead of
5-
import test from 'ava';
2+
import test from '@endo/ses-ava/prepare-endo.js';
63

74
const { freeze, isFrozen } = Object;
85

packages/ses/src/permits.js

+8
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ export const permitted = {
488488
groupBy: fn,
489489
// Seen on QuickJS
490490
__getClass: false,
491+
// https://github.com/endojs/endo/pull/2673
492+
isNoTrapping: fn,
493+
suppressTrapping: fn,
491494
},
492495

493496
'%ObjectPrototype%': {
@@ -1624,12 +1627,17 @@ export const permitted = {
16241627
set: fn,
16251628
setPrototypeOf: fn,
16261629
'@@toStringTag': 'string',
1630+
// https://github.com/endojs/endo/pull/2673
1631+
isNoTrapping: fn,
1632+
suppressTrapping: fn,
16271633
},
16281634

16291635
Proxy: {
16301636
// Properties of the Proxy Constructor
16311637
'[[Proto]]': '%FunctionPrototype%',
16321638
revocable: fn,
1639+
// https://github.com/endojs/endo/pull/2673
1640+
prototype: 'undefined',
16331641
},
16341642

16351643
// Appendix B

0 commit comments

Comments
 (0)