Skip to content

Commit 14731fe

Browse files
leotmerights
andcommitted
feat(ses): restrict dynamic permit on Hermes
Co-authored-by: Mark S. Miller <[email protected]>
1 parent 704bc42 commit 14731fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/ses/src/permits.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-restricted-globals */
22
/* eslint max-lines: 0 */
33

4-
import { arrayPush, getOwnPropertyNames, arrayForEach } from './commons.js';
4+
import { arrayPush, arrayForEach } from './commons.js';
55

66
/** @import {GenericErrorConstructor} from '../types.js' */
77

@@ -304,7 +304,8 @@ const strict = function () {
304304
'use strict';
305305
};
306306

307-
arrayForEach(getOwnPropertyNames(strict), prop => {
307+
// TODO Remove this once we no longer support the Hermes that needed this.
308+
arrayForEach(['caller', 'arguments'], prop => {
308309
try {
309310
strict[prop];
310311
} catch (e) {

0 commit comments

Comments
 (0)