summaryrefslogtreecommitdiff
path: root/core/bindings.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-08 07:44:54 -0400
committerGitHub <noreply@github.com>2023-03-08 12:44:54 +0100
commit72fe9bb47005e720444e65a66e91559287137780 (patch)
treed529ee7f3b2c33063ba4496f8fd3dfdbac0d1355 /core/bindings.rs
parentd24c6ea27f7dea57e3bc0cda342d6cbe59782f7d (diff)
refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme for snapshotted modules (#18041)
This commit renames "deno_core::InternalModuleLoader" to "ExtModuleLoader" and changes the specifiers used by the modules loaded from this loader to "ext:". "internal:" scheme was really ambiguous and it's more characters than "ext:", which should result in slightly smaller snapshot size. Closes https://github.com/denoland/deno/issues/18020
Diffstat (limited to 'core/bindings.rs')
-rw-r--r--core/bindings.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/bindings.rs b/core/bindings.rs
index d8e9f50d8..b674ee6b6 100644
--- a/core/bindings.rs
+++ b/core/bindings.rs
@@ -281,11 +281,11 @@ pub fn host_import_module_dynamically_callback<'s>(
.unwrap()
.to_rust_string_lossy(scope);
- let is_internal_module = specifier_str.starts_with("internal:");
+ let is_ext_module = specifier_str.starts_with("ext:");
let resolver = v8::PromiseResolver::new(scope).unwrap();
let promise = resolver.get_promise(scope);
- if !is_internal_module {
+ if !is_ext_module {
let assertions = parse_import_assertions(
scope,
import_assertions,
@@ -333,10 +333,10 @@ pub fn host_import_module_dynamically_callback<'s>(
let promise = promise.catch(scope, map_err).unwrap();
- if is_internal_module {
+ if is_ext_module {
let message = v8::String::new_external_onebyte_static(
scope,
- b"Cannot load internal module from external code",
+ b"Cannot load extension module from external code",
)
.unwrap();
let exception = v8::Exception::type_error(scope, message);