From 8b31fc23cd80de9baa62535e95367da7a21c9cfd Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 15 Apr 2022 15:08:09 +0100 Subject: refactor: Move source map lookups to core (#14274) The following transformations gradually faced by "JsError" have all been moved up front to "JsError::from_v8_exception()": - finding the first non-"deno:" source line; - moving "JsError::script_resource_name" etc. into the first error stack in case of syntax errors; - source mapping "JsError::script_resource_name" etc. when wrapping the error even though the frame locations are source mapped earlier; - removing "JsError::{script_resource_name,line_number,start_column,end_column}" entirely in favour of "js_error.frames.get(0)". We also no longer pass a js-side callback to "core/02_error.js" from cli. I avoided doing this on previous occasions because the source map lookups were in an awkward place. --- runtime/worker_bootstrap.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'runtime/worker_bootstrap.rs') diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs index 05bde731f..f1ffd1b3d 100644 --- a/runtime/worker_bootstrap.rs +++ b/runtime/worker_bootstrap.rs @@ -8,7 +8,6 @@ use deno_core::ModuleSpecifier; pub struct BootstrapOptions { /// Sets `Deno.args` in JS runtime. pub args: Vec, - pub apply_source_maps: bool, pub cpu_count: usize, pub debug_flag: bool, pub enable_testing_features: bool, @@ -28,7 +27,6 @@ impl BootstrapOptions { let payload = json!({ // Shared bootstrap args "args": self.args, - "applySourceMaps": self.apply_source_maps, "cpuCount": self.cpu_count, "debugFlag": self.debug_flag, "denoVersion": self.runtime_version, -- cgit v1.2.3