-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
module: migrate to script context based host defined options #44923
Conversation
Review requested:
|
I'm beyond happy to see movement on this issue more than a year and a half after it was pointed to as a blocker of stabilization of vm ESM 🎉 |
Can this PR get landed before the v8 team decides to adopt your change? @legendecas |
@ywave620 that's not in accord with the working process. I don't think we should land this before the v8 CL gets landed first. |
@legendecas What's the status on the V8 side? |
@targos thanks for the ping. I'll reach out to Camillo to see the next steps. |
This allows the host-defined options to be an arbitrary JavaScript value so that the module/script wrapper object can be used as the host-defined options instead. In this way, we can move away from the id-based module tables and fixes the problem that the scripts can out lives the module wrapper objects.
54f0d90
to
438df3b
Compare
#48510 fixed the crashes with an alternative approach. |
This is not ready to be reviewed properly. Just a preview of the solution.
deps: v8: [runtime] Store host-defined options in the context
CR-URL: https://chromium-review.googlesource.com/c/v8/v8/+/3172764
module: migrate to script context based host defined options
This allows the host-defined options to be an arbitrary JavaScript value
so that the module/script wrapper object can be used as the host-defined
options instead. In this way, we can move away from the id-based module
tables and fixes the problem that the scripts can out lives the module
wrapper objects.
Fixes: #43681
Fixes: #43205
Fixes: #44438