summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/build.rs11
-rw-r--r--cli/js.rs20
-rw-r--r--cli/source_maps.rs2
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();
diff --git a/cli/js.rs b/cli/js.rs
index ef6d6c7e8..beb8df192 100644
--- a/cli/js.rs
+++ b/cli/js.rs
@@ -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);