diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/build.rs | 11 | ||||
-rw-r--r-- | cli/js.rs | 20 | ||||
-rw-r--r-- | cli/source_maps.rs | 2 |
3 files changed, 20 insertions, 13 deletions
diff --git a/cli/build.rs b/cli/build.rs index d969a3415..64cef3082 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -2,7 +2,6 @@ mod op_fetch_asset; -use deno_core::js_check; use deno_core::JsRuntime; use deno_core::RuntimeOptions; use std::collections::HashMap; @@ -24,10 +23,12 @@ fn create_snapshot( println!("cargo:rerun-if-changed={}", file.display()); let display_path = file.strip_prefix(display_root).unwrap(); let display_path_str = display_path.display().to_string(); - js_check(isolate.execute( - &("deno:".to_string() + &display_path_str.replace('\\', "/")), - &std::fs::read_to_string(&file).unwrap(), - )); + isolate + .execute( + &("deno:".to_string() + &display_path_str.replace('\\', "/")), + &std::fs::read_to_string(&file).unwrap(), + ) + .unwrap(); } let snapshot = isolate.snapshot(); @@ -34,15 +34,17 @@ fn cli_snapshot() { startup_snapshot: Some(deno_isolate_init()), ..Default::default() }); - deno_core::js_check(isolate.execute( - "<anon>", - r#" + isolate + .execute( + "<anon>", + r#" if (!(bootstrap.mainRuntime && bootstrap.workerRuntime)) { throw Error("bad"); } console.log("we have console.log!!!"); "#, - )); + ) + .unwrap(); } #[test] @@ -51,13 +53,15 @@ fn compiler_snapshot() { startup_snapshot: Some(compiler_isolate_init()), ..Default::default() }); - deno_core::js_check(isolate.execute( - "<anon>", - r#" + isolate + .execute( + "<anon>", + r#" if (!(bootstrapCompilerRuntime)) { throw Error("bad"); } console.log(`ts version: ${ts.version}`); "#, - )); + ) + .unwrap(); } diff --git a/cli/source_maps.rs b/cli/source_maps.rs index 1e7a14a0e..4744482a7 100644 --- a/cli/source_maps.rs +++ b/cli/source_maps.rs @@ -78,6 +78,7 @@ pub fn apply_source_map<G: SourceMapGetter>( start_column, end_column, frames: js_error.frames.clone(), + stack: None, } } @@ -204,6 +205,7 @@ mod tests { start_column: Some(16), end_column: None, frames: vec![], + stack: None, }; let getter = MockSourceMapGetter {}; let actual = apply_source_map(&e, &getter); |