From 14731feff0b335809c5fd846a0ba73ffb7b000f7 Mon Sep 17 00:00:00 2001 From: LeoTM <1881059+leotm@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:27:01 +0000 Subject: [PATCH] feat(ses): restrict dynamic permit on Hermes Co-authored-by: Mark S. Miller --- packages/ses/src/permits.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/ses/src/permits.js b/packages/ses/src/permits.js index 0fc5616f8f..283d861c34 100644 --- a/packages/ses/src/permits.js +++ b/packages/ses/src/permits.js @@ -1,7 +1,7 @@ /* eslint-disable no-restricted-globals */ /* eslint max-lines: 0 */ -import { arrayPush, getOwnPropertyNames, arrayForEach } from './commons.js'; +import { arrayPush, arrayForEach } from './commons.js'; /** @import {GenericErrorConstructor} from '../types.js' */ @@ -304,7 +304,8 @@ const strict = function () { 'use strict'; }; -arrayForEach(getOwnPropertyNames(strict), prop => { +// TODO Remove this once we no longer support the Hermes that needed this. +arrayForEach(['caller', 'arguments'], prop => { try { strict[prop]; } catch (e) {