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

Shadow Realms: Check the function prototype of all points of wrapping #3269

Merged
merged 1 commit into from
Oct 15, 2021
Merged

Shadow Realms: Check the function prototype of all points of wrapping #3269

merged 1 commit into from
Oct 15, 2021

Conversation

philomates
Copy link
Contributor

@philomates philomates commented Oct 15, 2021

Expanding the test added in #3230 to cover all points at which wrapping occurs in the Shadow Realm proposal.
I think I got the caller/target realm expectations correct, but definitely worth a close review

As a side note, I'm having some issues adapting the JSC implementation to satisfy this test and was offhand wondering: how important is the detail that the wrapped function's prototype pertains to the caller realm and not the target realm to the behavior of the feature?

cc/ @legendecas @rwaldron @leobalter

@leobalter
Copy link
Member

The devil is in the details.

Thanks for adding these assertions, @philomates! It's important for the wrapped functions to never leak objects from a different realm. This is a solution to match requirements to move this to Stage 3 at TC39.

I'm glad you're working on this!

@leobalter leobalter merged commit d351cfd into tc39:main Oct 15, 2021
@philomates philomates deleted the expand-wrap-proto-check branch October 18, 2021 09:16
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.

2 participants