summaryrefslogtreecommitdiff
path: root/cli/ops/compiler.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-25 18:53:16 +0100
committerGitHub <noreply@github.com>2020-01-25 18:53:16 +0100
commitc824eb5817db675be4d9966a0d1a43d90dfa61fd (patch)
tree400906eb76f95b3457a15c90baca58ecd193b22f /cli/ops/compiler.rs
parent37a7b01d5cf555bbc57d74dc9e04000115ec4867 (diff)
refactor: Modules and Loader trait (#3791)
* move is_dyn_import argument from Loader::resolve to Loader::load - it was always kind of strange that resolve() checks permissions. * change argument type from &str to &ModuleSpecifier where applicable
Diffstat (limited to 'cli/ops/compiler.rs')
-rw-r--r--cli/ops/compiler.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/cli/ops/compiler.rs b/cli/ops/compiler.rs
index 2d0ffe1f3..d2a2a1d58 100644
--- a/cli/ops/compiler.rs
+++ b/cli/ops/compiler.rs
@@ -58,11 +58,6 @@ fn op_resolve_modules(
_data: Option<ZeroCopyBuf>,
) -> Result<JsonOp, ErrBox> {
let args: SpecifiersReferrerArgs = serde_json::from_value(args)?;
-
- // TODO(ry) Maybe a security hole. Only the compiler worker should have access
- // to this. Need a test to demonstrate the hole.
- let is_dyn_import = false;
-
let (referrer, is_main) = if let Some(referrer) = args.referrer {
(referrer, false)
} else {
@@ -72,8 +67,7 @@ fn op_resolve_modules(
let mut specifiers = vec![];
for specifier in &args.specifiers {
- let resolved_specifier =
- state.resolve(specifier, &referrer, is_main, is_dyn_import);
+ let resolved_specifier = state.resolve(specifier, &referrer, is_main);
match resolved_specifier {
Ok(ms) => specifiers.push(ms.as_str().to_owned()),
Err(err) => return Err(err),