From 28b5a7e2ec519e6c1ff928d57368c0d8741a8bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 27 Nov 2022 00:58:23 +0100 Subject: 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 --- bench_util/js_runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bench_util/js_runtime.rs') 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) -> JsRuntime { JsRuntime::new(RuntimeOptions { - extensions: setup(), + extensions_with_js: setup(), ..Default::default() }) } -- cgit v1.2.3