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 committed Oct 9, 2024
1 parent 6ae4689 commit ba9f9fd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/ses/src/intrinsics.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ 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%',
];
// eslint-disable-next-line @endo/no-polymorphic-call
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 ba9f9fd

Please sign in to comment.