summaryrefslogtreecommitdiff
path: root/core/runtime.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/runtime.rs')
-rw-r--r--core/runtime.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/runtime.rs b/core/runtime.rs
index 92e23873a..f751138a9 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -8,7 +8,7 @@ use crate::extensions::OpDecl;
use crate::extensions::OpEventLoopFn;
use crate::inspector::JsRuntimeInspector;
use crate::module_specifier::ModuleSpecifier;
-use crate::modules::InternalModuleLoaderCb;
+use crate::modules::ExtModuleLoaderCb;
use crate::modules::ModuleError;
use crate::modules::ModuleId;
use crate::modules::ModuleLoadId;
@@ -275,7 +275,7 @@ pub struct RuntimeOptions {
/// An optional callback that will be called for each module that is loaded
/// during snapshotting. This callback can be used to transpile source on the
/// fly, during snapshotting, eg. to transpile TypeScript to JavaScript.
- pub snapshot_module_load_cb: Option<InternalModuleLoaderCb>,
+ pub snapshot_module_load_cb: Option<ExtModuleLoaderCb>,
/// Isolate creation parameters.
pub create_params: Option<v8::CreateParams>,
@@ -620,7 +620,7 @@ impl JsRuntime {
}
}
- Rc::new(crate::modules::InternalModuleLoader::new(
+ Rc::new(crate::modules::ExtModuleLoader::new(
options.module_loader,
esm_sources,
options.snapshot_module_load_cb,
@@ -3984,8 +3984,8 @@ assertEquals(1, notify_return_value);
)
.unwrap_err();
let error_string = error.to_string();
- // Test that the script specifier is a URL: `internal:<repo-relative path>`.
- assert!(error_string.contains("internal:core/01_core.js"));
+ // Test that the script specifier is a URL: `ext:<repo-relative path>`.
+ assert!(error_string.contains("ext:core/01_core.js"));
}
#[test]
@@ -5018,8 +5018,8 @@ Deno.core.opAsync("op_async_serialize_object_with_numbers_as_keys", {
) -> Pin<Box<ModuleSourceFuture>> {
let source = r#"
// This module doesn't really exist, just verifying that we'll get
- // an error when specifier starts with "internal:".
- import { core } from "internal:core.js";
+ // an error when specifier starts with "ext:".
+ import { core } from "ext:core.js";
"#;
async move {
@@ -5055,7 +5055,7 @@ Deno.core.opAsync("op_async_serialize_object_with_numbers_as_keys", {
.unwrap_err();
assert_eq!(
err.to_string(),
- "Cannot load internal module from external code"
+ "Cannot load extension module from external code"
);
}
}