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

Use frozen primordials for internal runtime code #10756

Closed
lucacasonato opened this issue May 24, 2021 · 2 comments
Closed

Use frozen primordials for internal runtime code #10756

lucacasonato opened this issue May 24, 2021 · 2 comments
Labels
deno_core Changes in "deno_core" crate are needed feat new feature (which has been agreed to/accepted) refactor runtime Relates to code in the runtime crate

Comments

@lucacasonato
Copy link
Member

Currently a lot of Deno runtime code is vulnerable to prototype tampering. Just like Node, we should copy a frozen version of all JS primordials as the first step before loading deno_core, and use that for all internal JS implementation.

We have some failing WPT that are caused by this.

This will be a rather large undertaking, but maybe we can fork off some of the Node primordial init code to speed this up. Ref https://github.com/nodejs/node/blob/2eeb4e1d944b4ebebcf80261d9250bc86eadc89a/lib/internal/per_context/primordials.js

We will need to highly vigilant about performance issues that arise from using primordials due to unexpected V8 deopts.

@stale
Copy link

stale bot commented Jul 23, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 23, 2021
@kitsonk kitsonk added the feat new feature (which has been agreed to/accepted) label Jul 23, 2021
@stale stale bot removed the stale label Jul 23, 2021
@lucacasonato
Copy link
Member Author

This was done as part of #11224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno_core Changes in "deno_core" crate are needed feat new feature (which has been agreed to/accepted) refactor runtime Relates to code in the runtime crate
Projects
None yet
Development

No branches or pull requests

2 participants