From bc7dbfafff7f73dc78f230c36c947669e9c7935c Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 27 Feb 2020 23:28:33 -0800 Subject: 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. --- deno_typescript/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'deno_typescript/lib.rs') diff --git a/deno_typescript/lib.rs b/deno_typescript/lib.rs index 8ee2c2c01..f10ce5b48 100644 --- a/deno_typescript/lib.rs +++ b/deno_typescript/lib.rs @@ -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)?; -- cgit v1.2.3