From c0354eb048b5d499020ac8bb72ed4bb3f4e1480e Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Tue, 31 Dec 2024 13:28:17 -0800 Subject: [PATCH] feat(ses,pass-style): use no-trapping integrity level for safety --- packages/no-trapping-shim/test/no-trapping-shim.test.js | 5 +---- packages/ses/src/permits.js | 8 ++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/no-trapping-shim/test/no-trapping-shim.test.js b/packages/no-trapping-shim/test/no-trapping-shim.test.js index 886493478c..0d8595cfdc 100644 --- a/packages/no-trapping-shim/test/no-trapping-shim.test.js +++ b/packages/no-trapping-shim/test/no-trapping-shim.test.js @@ -1,8 +1,5 @@ import '../src/no-trapping-shim.js'; -// TODO make compat with ses and uncomment -// import test from '@endo/ses-ava/prepare-endo.js'; -// instead of -import test from 'ava'; +import test from '@endo/ses-ava/prepare-endo.js'; const { freeze, isFrozen } = Object; diff --git a/packages/ses/src/permits.js b/packages/ses/src/permits.js index 283d861c34..6c79bd435c 100644 --- a/packages/ses/src/permits.js +++ b/packages/ses/src/permits.js @@ -488,6 +488,9 @@ export const permitted = { groupBy: fn, // Seen on QuickJS __getClass: false, + // /~https://github.com/endojs/endo/pull/2673 + isNoTrapping: fn, + suppressTrapping: fn, }, '%ObjectPrototype%': { @@ -1624,12 +1627,17 @@ export const permitted = { set: fn, setPrototypeOf: fn, '@@toStringTag': 'string', + // /~https://github.com/endojs/endo/pull/2673 + isNoTrapping: fn, + suppressTrapping: fn, }, Proxy: { // Properties of the Proxy Constructor '[[Proto]]': '%FunctionPrototype%', revocable: fn, + // /~https://github.com/endojs/endo/pull/2673 + prototype: 'undefined', }, // Appendix B