Skip to content

Commit

Permalink
fix(ses): dont use native hardener which doesnt suppressTrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jan 1, 2025
1 parent 7c0edb8 commit cf7676f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/ses/src/make-hardener.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,13 @@ const freezeTypedArray = array => {
*/
export const makeHardener = () => {
// TODO Get the native hardener to suppressTrapping at each step,
// rather than freeze. Until then, we cannot use it, which is *expensive*!
// TODO Comment out the following to skip the native hardener.
// rather than freeze. Until then, it is *expensive*!
//
// Use a native hardener if possible.
if (typeof globalThis.harden === 'function') {
const safeHarden = globalThis.harden;
return safeHarden;
}
// // Use a native hardener if possible.
// if (typeof globalThis.harden === 'function') {
// const safeHarden = globalThis.harden;
// return safeHarden;
// }

const hardened = new WeakSet();

Expand Down

0 comments on commit cf7676f

Please sign in to comment.