diff options
-rw-r--r-- | runtime/ops/bootstrap.rs | 2 | ||||
-rw-r--r-- | runtime/worker.rs | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/runtime/ops/bootstrap.rs b/runtime/ops/bootstrap.rs index 066488d09..64536e721 100644 --- a/runtime/ops/bootstrap.rs +++ b/runtime/ops/bootstrap.rs @@ -29,7 +29,7 @@ deno_core::extension!( }, ); -#[derive(Serialize)] +#[derive(Serialize, Default)] #[serde(rename_all = "camelCase")] pub struct SnapshotOptions { pub deno_version: String, diff --git a/runtime/worker.rs b/runtime/worker.rs index a3882bf20..e83c8a720 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -380,7 +380,16 @@ impl MainWorker { ops::signal::deno_signal::init_ops_and_esm(), ops::tty::deno_tty::init_ops_and_esm(), ops::http::deno_http_runtime::init_ops_and_esm(), - ops::bootstrap::deno_bootstrap::init_ops_and_esm(None), + ops::bootstrap::deno_bootstrap::init_ops_and_esm({ + #[cfg(feature = "__runtime_js_sources")] + { + Some(Default::default()) + } + #[cfg(not(feature = "__runtime_js_sources"))] + { + None + } + }), deno_permissions_worker::init_ops_and_esm( permissions, enable_testing_features, |