From 2907df10c53c8cc0aa6c28b62740548f166916b7 Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Tue, 31 Dec 2024 21:17:41 -0800 Subject: [PATCH] fix(ses): dont use native hardener which doesnt yet suppressTrapping --- packages/ses/src/make-hardener.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/ses/src/make-hardener.js b/packages/ses/src/make-hardener.js index d377fd8793..6b918024b9 100644 --- a/packages/ses/src/make-hardener.js +++ b/packages/ses/src/make-hardener.js @@ -128,11 +128,14 @@ const freezeTypedArray = array => { * @returns {Harden} */ export const makeHardener = () => { - // Use a native hardener if possible. - if (typeof globalThis.harden === 'function') { - const safeHarden = globalThis.harden; - return safeHarden; - } + // TODO Get the native hardener to suppressTrapping at each step, + // 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; + // } const hardened = new WeakSet();