diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2022-04-15 15:08:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-15 16:08:09 +0200 |
commit | 8b31fc23cd80de9baa62535e95367da7a21c9cfd (patch) | |
tree | 994748bd06ed5b4953929392107b6beaa1c1c337 /cli/standalone.rs | |
parent | b4af648c1515a8e79d7a5d1b14d8a4ba9d966a72 (diff) |
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.
Diffstat (limited to 'cli/standalone.rs')
-rw-r--r-- | cli/standalone.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/standalone.rs b/cli/standalone.rs index 5005fd142..9f2aba9bd 100644 --- a/cli/standalone.rs +++ b/cli/standalone.rs @@ -273,7 +273,6 @@ pub async fn run( let options = WorkerOptions { bootstrap: BootstrapOptions { - apply_source_maps: false, args: metadata.argv, cpu_count: std::thread::available_parallelism() .map(|p| p.get()) @@ -293,6 +292,7 @@ pub async fn run( .unsafely_ignore_certificate_errors, root_cert_store: Some(root_cert_store), seed: metadata.seed, + source_map_getter: None, js_error_create_fn: None, create_web_worker_cb, web_worker_preload_module_cb, |