diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-02-17 15:22:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 22:22:46 +0000 |
commit | 08071f9561b17b8899f370dc771604c2c2da445f (patch) | |
tree | df270cf3f349a7d2bce72b1195e36665062e4f7d /runtime/snapshot.rs | |
parent | 828d9b84858d53b74d7801604c8c3bee418b631e (diff) |
chore: bump deno_core (#22443)
Migrations:
- Use the new SnapshotSerializer for TSC/compiler snapshots
Diffstat (limited to 'runtime/snapshot.rs')
-rw-r--r-- | runtime/snapshot.rs | 10 |
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()); } |