diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-13 21:12:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 01:12:09 +0000 |
commit | 48ede89f1f192df28cc74822d7bb79b0b4bd0957 (patch) | |
tree | d6dd65cf03152fb0253aba551f7ed016e3b7b09f /core/ops_builtin_v8.rs | |
parent | c4771356f27b250e7fdbcede0de5682982720455 (diff) |
refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170)
This commit changes current "deno_core::resolve_url_or_path" API to
"resolve_url_or_path_deprecated" and adds new "resolve_url_or_path"
API that requires to explicitly pass the directory from which paths
should be resolved to.
Some of the call sites were updated to use the new API, the reminder
of them will be updated in a follow up PR.
Towards landing https://github.com/denoland/deno/pull/15454
Diffstat (limited to 'core/ops_builtin_v8.rs')
-rw-r--r-- | core/ops_builtin_v8.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/ops_builtin_v8.rs b/core/ops_builtin_v8.rs index c3c4ec092..e00ed5a29 100644 --- a/core/ops_builtin_v8.rs +++ b/core/ops_builtin_v8.rs @@ -6,7 +6,7 @@ use crate::error::range_error; use crate::error::type_error; use crate::error::JsError; use crate::ops_builtin::WasmStreamingResource; -use crate::resolve_url_or_path; +use crate::resolve_url_or_path_deprecated; use crate::serde_v8::from_v8; use crate::source_map::apply_source_map as apply_source_map_; use crate::JsRealm; @@ -165,7 +165,7 @@ fn op_eval_context<'a>( let source = v8::Local::<v8::String>::try_from(source.v8_value) .map_err(|_| type_error("Invalid source"))?; let specifier = match specifier { - Some(s) => resolve_url_or_path(&s)?.to_string(), + Some(s) => resolve_url_or_path_deprecated(&s)?.to_string(), None => crate::DUMMY_SPECIFIER.to_string(), }; let specifier = v8::String::new(tc_scope, &specifier).unwrap(); |