Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ses): fix conflicting definitions of %InertAsyncFunction% on Hermes #2221

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leotm
Copy link
Contributor

@leotm leotm commented Apr 17, 2024

closes: #XXXX
refs: #1891

Description

Context: Running SES on React Native on Android (Hermes)

Follow-up to

When calling addIntrinsics(getAnonymousIntrinsics())

The way we define AsyncFunctionInstance
async function AsyncFunctionInstance() {}

is throwing TypeError: Conflicting definitions of %InertAsyncFunction%
at https://github.com/endojs/endo/blob/master/packages/ses/src/intrinsics.js#L46

which doesn't match what's returned from (0,eval)('(async function () { })'); which is ok in repro
leotm/RN07117SES@cb44efd

Security Considerations

Likely since calling eval

Scaling Considerations

Documentation Considerations

Testing Considerations

Compatibility Considerations

Upgrade Considerations

  • Includes *BREAKING*: in the commit message with migration instructions for any breaking change.
  • Updates NEWS.md for user-facing changes.

@leotm leotm force-pushed the ses-hermes-getAnonymousIntrinsics-p2 branch from cb1073a to 4fac67d Compare April 17, 2024 18:26
@mhofman
Copy link
Contributor

mhofman commented Apr 18, 2024

Because of other use cases (like extensions) we can't rely on eval to get the intrinsics. There is an open issue about verifying that the ses shim wasn't transpiled, which seems to be what's happening here.

See #902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants