diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-09 20:22:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 19:22:27 -0500 |
commit | d1685b120bf7da5ba384806153f65d90ef156b77 (patch) | |
tree | 155c87f1beae810f52fb2a9ef9ab7526fa1af990 /runtime/build.rs | |
parent | 78d430103a8f6931154ddbbe19d36f3b8630286d (diff) |
refactor(core): remove RuntimeOptions::extensions_with_js (#18099)
This commit removes "deno_core::RuntimeOptions::extensions_with_js".
Now it's embedders' responsibility to properly register extensions
that will not contains JavaScript sources when running from an existing
snapshot.
Prerequisite for https://github.com/denoland/deno/pull/18080
Diffstat (limited to 'runtime/build.rs')
-rw-r--r-- | runtime/build.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/build.rs b/runtime/build.rs index 784e46d4f..2bb2b4cf1 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -250,7 +250,7 @@ mod startup_snapshot { )) .build(); - let mut extensions_with_js: Vec<Extension> = vec![ + let mut extensions: Vec<Extension> = vec![ deno_webidl::init_esm(), deno_console::init_esm(), deno_url::init_ops_and_esm(), @@ -291,15 +291,14 @@ mod startup_snapshot { ]; if let Some(additional_extension) = maybe_additional_extension { - extensions_with_js.push(additional_extension); + extensions.push(additional_extension); } create_snapshot(CreateSnapshotOptions { cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"), snapshot_path, startup_snapshot: None, - extensions: vec![], - extensions_with_js, + extensions, compression_cb: Some(Box::new(|vec, snapshot_slice| { lzzzz::lz4_hc::compress_to_vec( snapshot_slice, |