diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-05-04 01:44:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 02:44:59 +0200 |
commit | 7a8bb3b611f02b272b1c19b6f3d8a85b099ca317 (patch) | |
tree | 04d37bb0f8c3fc719b3494114a054f5439733e7a /bench_util/js_runtime.rs | |
parent | e3276fbb71093faf4e8850f68ed2e080a9bda222 (diff) |
fix(core): allow esm extensions not included in snapshot (#18980)
Fixes #18979.
This changes the predicate for allowing `ext:` specifier resolution from
`snapshot_loaded_and_not_snapshotting` to `ext_resolution_allowed` which
is only set to true during the extension module loading phase. Module
loaders as used in core
are now declared as `ExtModuleLoader` rather than `dyn ModuleLoader`.
Diffstat (limited to 'bench_util/js_runtime.rs')
-rw-r--r-- | bench_util/js_runtime.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bench_util/js_runtime.rs b/bench_util/js_runtime.rs index 57085ef96..a12e6ca62 100644 --- a/bench_util/js_runtime.rs +++ b/bench_util/js_runtime.rs @@ -10,9 +10,7 @@ use crate::profiling::is_profiling; pub fn create_js_runtime(setup: impl FnOnce() -> Vec<Extension>) -> JsRuntime { JsRuntime::new(RuntimeOptions { extensions: setup(), - module_loader: Some( - std::rc::Rc::new(deno_core::ExtModuleLoader::default()), - ), + module_loader: None, ..Default::default() }) } |