fix: Split extension registration and snapshotting (#18098)

This commit partially reverts changes from
https://github.com/denoland/deno/pull/18095.

Turns out I made a mistake that became apparent when working
on removing "RuntimeOptions::extensions_with_js" in a follow up.
This commit is contained in:
Bartek Iwańczuk 2023-03-09 16:09:45 -04:00 committed by GitHub
parent 47012bd931
commit 44e67df1cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 161 additions and 354 deletions

View file

@ -514,7 +514,7 @@ impl Env {
}
}
pub fn init<P: NapiPermissions + 'static>() -> Extension {
pub fn init_ops<P: NapiPermissions + 'static>() -> Extension {
Extension::builder(env!("CARGO_PKG_NAME"))
.ops(vec![op_napi_open::decl::<P>()])
.event_loop_middleware(|op_state_rc, cx| {