summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-09 16:09:45 -0400
committerGitHub <noreply@github.com>2023-03-09 21:09:45 +0100
commit44e67df1cd637d46744e7471f68f8bc4d1680a0e (patch)
treea7508cb4ffebab2a469c6e1a294be3bddb55a037 /ext
parent47012bd931e785073e943b82dd397386b6ee7ca5 (diff)
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.
Diffstat (limited to 'ext')
-rw-r--r--ext/napi/lib.rs2
-rw-r--r--ext/tls/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/napi/lib.rs b/ext/napi/lib.rs
index 471ebfeab..41004638e 100644
--- a/ext/napi/lib.rs
+++ b/ext/napi/lib.rs
@@ -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| {
diff --git a/ext/tls/lib.rs b/ext/tls/lib.rs
index b762ac90a..fb4e8759d 100644
--- a/ext/tls/lib.rs
+++ b/ext/tls/lib.rs
@@ -36,7 +36,7 @@ use std::sync::Arc;
use std::time::SystemTime;
/// This extension has no runtime apis, it only exports some shared native functions.
-pub fn init() -> Extension {
+pub fn init_ops() -> Extension {
Extension::builder(env!("CARGO_PKG_NAME")).build()
}