From 88e6e9c1e6263f326d30b7fcc33465e0428faf33 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Wed, 14 Jun 2023 10:45:59 -0600 Subject: refactor(core): some runtime methods should live on the module map (#19502) A few easy migrations of module code from the runtime to the module map. The module map already has a few places where it needs a handle scope, so we're not coupling it any further with the v8 runtime. `init_runtime_module_map` is replaced with an option to reduce API surface of JsRuntime. `module_resolve_callback` now lives in the `ModuleMap` and we use a annex data to avoid having to go through the `Rc>` stored in the `JsRuntime`'s isolate. --- core/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/lib.rs') diff --git a/core/lib.rs b/core/lib.rs index 82cd1dd43..ddc4d6d91 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -127,6 +127,7 @@ pub fn v8_version() -> &'static str { /// An internal module re-exporting functions used by the #[op] (`deno_ops`) macro #[doc(hidden)] pub mod _ops { + pub use super::error::throw_type_error; pub use super::error_codes::get_error_code; pub use super::ops::to_op_result; pub use super::ops::OpCtx; @@ -137,7 +138,6 @@ pub mod _ops { pub use super::runtime::ops::map_async_op4; pub use super::runtime::ops::queue_async_op; pub use super::runtime::ops::queue_fast_async_op; - pub use super::runtime::throw_type_error; pub use super::runtime::V8_WRAPPER_OBJECT_INDEX; pub use super::runtime::V8_WRAPPER_TYPE_INDEX; } -- cgit v1.2.3