summaryrefslogtreecommitdiff
path: root/runtime/snapshot.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/snapshot.rs')
-rw-r--r--runtime/snapshot.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/snapshot.rs b/runtime/snapshot.rs
index f7342ce14..3a9d67086 100644
--- a/runtime/snapshot.rs
+++ b/runtime/snapshot.rs
@@ -6,7 +6,7 @@ use crate::shared::maybe_transpile_source;
use crate::shared::runtime;
use deno_cache::SqliteBackedCache;
use deno_core::error::AnyError;
-use deno_core::snapshot_util::*;
+use deno_core::snapshot::*;
use deno_core::v8;
use deno_core::Extension;
use deno_http::DefaultHttpPropertyExtractor;
@@ -268,10 +268,11 @@ pub fn create_runtime_snapshot(
let output = create_snapshot(
CreateSnapshotOptions {
cargo_manifest_dir: env!("CARGO_MANIFEST_DIR"),
- snapshot_path,
startup_snapshot: None,
extensions,
- compression_cb: None,
+ serializer: Box::new(SnapshotFileSerializer::new(
+ std::fs::File::create(snapshot_path).unwrap(),
+ )),
with_runtime_cb: Some(Box::new(|rt| {
let isolate = rt.v8_isolate();
let scope = &mut v8::HandleScope::new(isolate);
@@ -282,7 +283,8 @@ pub fn create_runtime_snapshot(
skip_op_registration: false,
},
None,
- );
+ )
+ .unwrap();
for path in output.files_loaded_during_snapshot {
println!("cargo:rerun-if-changed={}", path.display());
}