Skip to content

Commit

Permalink
feat(ses): restrict dynamic permit on Hermes
Browse files Browse the repository at this point in the history
Co-authored-by: Mark S. Miller <[email protected]>
  • Loading branch information
leotm and erights committed Dec 19, 2024
1 parent 4b4171b commit d057faf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ses/src/permits.js
Original file line number Diff line number Diff line change
@@ -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' */

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit d057faf

Please sign in to comment.