summaryrefslogtreecommitdiff
path: root/bench_util
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-11-27 00:58:23 +0100
committerGitHub <noreply@github.com>2022-11-27 00:58:23 +0100
commit28b5a7e2ec519e6c1ff928d57368c0d8741a8bb4 (patch)
tree791f02bb6b41cfa250e56a07c64a1d75010de033 /bench_util
parentd4f659d1d3caa550dfc15ca9e62d4ad6a31db7ac (diff)
feat(core): support initializing extensions with and without JS (#16789)
This commit allows to execute more JS code from extensions when creating a snapshot from an existing snapshot. "deno_core::RuntimeOptions::extensions_with_js" field was added that is used to pass a list of extensions whose both "ops" and associated JS source should be executed upon start. Co-authored-by: crowlkats <crowlkats@toaxl.com>
Diffstat (limited to 'bench_util')
-rw-r--r--bench_util/js_runtime.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/bench_util/js_runtime.rs b/bench_util/js_runtime.rs
index f87fa3b03..0495d6d8d 100644
--- a/bench_util/js_runtime.rs
+++ b/bench_util/js_runtime.rs
@@ -9,7 +9,7 @@ use crate::profiling::is_profiling;
pub fn create_js_runtime(setup: impl FnOnce() -> Vec<Extension>) -> JsRuntime {
JsRuntime::new(RuntimeOptions {
- extensions: setup(),
+ extensions_with_js: setup(),
..Default::default()
})
}