Skip to content

Commit

Permalink
refactor(ses): completePrototypes on Hermes condition
Browse files Browse the repository at this point in the history
Co-authored-by: legobeat <[email protected]>
  • Loading branch information
leotm and legobeat authored Oct 9, 2024
1 parent 6ae4689 commit 490dbed
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/ses/src/intrinsics.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ export const makeIntrinsicsCollector = () => {
// - arguments {"enumerable":false,"configurable":false} from [[Proto]]: %FunctionPrototype%
// - prototype {"value":{},"writable":true,"enumerable":false,"configurable":false}
// so we tolerate the unexpected prototype property instead of throwing an Error.
if (
name === 'lockdown' ||
name === 'harden' ||
name === '%InitialGetStackString%'
)
const IGNORED_PROTOTYPE_PERMITS = ['lockdown', 'harden', '%InitialGetStackString%'];
if (IGNORED_PROTOTYPE_PERMITS.includes(name)) {
// eslint-disable-next-line no-continue
continue;
}
throw TypeError(`${name}.prototype property not whitelisted`);
}
if (
Expand Down

0 comments on commit 490dbed

Please sign in to comment.