summaryrefslogtreecommitdiff
path: root/core/snapshot_util.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/snapshot_util.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/snapshot_util.rs')
-rw-r--r--core/snapshot_util.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/snapshot_util.rs b/core/snapshot_util.rs
index 5b0ba92a0..8b4fa3fa4 100644
--- a/core/snapshot_util.rs
+++ b/core/snapshot_util.rs
@@ -4,8 +4,8 @@ use std::path::Path;
use std::path::PathBuf;
use std::time::Instant;
+use crate::ExtModuleLoaderCb;
use crate::Extension;
-use crate::InternalModuleLoaderCb;
use crate::JsRuntime;
use crate::RuntimeOptions;
use crate::Snapshot;
@@ -19,7 +19,7 @@ pub struct CreateSnapshotOptions {
pub extensions: Vec<Extension>,
pub extensions_with_js: Vec<Extension>,
pub compression_cb: Option<Box<CompressionCb>>,
- pub snapshot_module_load_cb: Option<InternalModuleLoaderCb>,
+ pub snapshot_module_load_cb: Option<ExtModuleLoaderCb>,
}
pub fn create_snapshot(create_snapshot_options: CreateSnapshotOptions) {