mirror of
https://github.com/denoland/deno.git
synced 2025-09-15 15:15:03 +00:00
Exit HandleScope before snapshotting (#4168)
The V8 documentation explicitly states that SnapshotCreator::CreateBlob() should not be called from within a HandleScope. Additionally, this patch removes some non-functional error handling code from the deno_core::Isolate::snapshot() method.
This commit is contained in:
parent
9075daa2e3
commit
bc7dbfafff
2 changed files with 13 additions and 13 deletions
|
@ -232,7 +232,7 @@ fn write_snapshot(
|
|||
snapshot_filename: &Path,
|
||||
) -> Result<(), ErrBox> {
|
||||
println!("Creating snapshot...");
|
||||
let snapshot = runtime_isolate.snapshot()?;
|
||||
let snapshot = runtime_isolate.snapshot();
|
||||
let snapshot_slice: &[u8] = &*snapshot;
|
||||
println!("Snapshot size: {}", snapshot_slice.len());
|
||||
fs::write(&snapshot_filename, snapshot_slice)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue