-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
JsRuntime::create_realm
should be a static method
#15293
Comments
As I was trying this out, I realized that since |
Part of #13239. Closes denoland#15293.
I either made such methods static, or moved them to Edit: Never mind, it does run into that issue, but |
Part of #13239. Closes denoland#15293.
@andreubotella is this something you still want to pursue? |
I'm not sure at the moment. I'll try rebasing #16211 to see if it can be done without this. |
Closing in favour of denoland/deno_core#101. |
The
JsRuntime::create_realm
method, introduced, in #14019, made it possible to create V8 contexts that had the same set of extensions and ops loaded, and it has since been used to write tests fordeno_core
's realm support. However, this method takes a&mut self
, so it can only be called from code embedding the Deno runtime, as opposed to from the runtime itself.Given that the whole intention of having
deno_core
support realms was to make it possible to implement the upcomingShadowRealm
TC39 proposal (see denoland/deno_core#911), it must be possible to create such a realm from a callback passed to V8.Making this method static would require making
JsRuntime::init_extension_js
andJsRuntime::init_cbs
static as well, plus probably moving theextension
field fromJsRuntime
toJsRuntimeState
.The text was updated successfully, but these errors were encountered: