From 08071f9561b17b8899f370dc771604c2c2da445f Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sat, 17 Feb 2024 15:22:46 -0700 Subject: chore: bump deno_core (#22443) Migrations: - Use the new SnapshotSerializer for TSC/compiler snapshots --- runtime/snapshot.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'runtime') 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()); } -- cgit v1.2.3