diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-02-27 23:28:33 -0800 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-02-28 09:04:28 -0800 |
commit | bc7dbfafff7f73dc78f230c36c947669e9c7935c (patch) | |
tree | 61fc7412b861f02ac68d0fb2d699bbf85a774abd /deno_typescript/lib.rs | |
parent | 9075daa2e3cfac0cdb13f5d926e39d42890982d5 (diff) |
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.
Diffstat (limited to 'deno_typescript/lib.rs')
-rw-r--r-- | deno_typescript/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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)?; |