diff options
| author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-06-25 08:35:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-25 09:35:31 +0200 |
| commit | 28a4f3d0f5383695b1d49ccdc8b0f799a715b2c2 (patch) | |
| tree | cd75b05db0bbfdadf3e565ca120d1f5d9ca39942 /core/runtime/snapshot_util.rs | |
| parent | a181ceb0e3791c842db6e8e6f528cf9ce320642a (diff) | |
Reland "refactor(core): cleanup feature flags for js source inclusion" (#19519)
Relands #19463. This time the `ExtensionFileSourceCode` enum is
preserved, so this effectively just splits feature
`include_js_for_snapshotting` into `exclude_js_sources` and
`runtime_js_sources`, adds a `force_include_js_sources` option on
`extension!()`, and unifies `ext::Init_ops_and_esm()` and
`ext::init_ops()` into `ext::init()`.
Diffstat (limited to 'core/runtime/snapshot_util.rs')
| -rw-r--r-- | core/runtime/snapshot_util.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/runtime/snapshot_util.rs b/core/runtime/snapshot_util.rs index 88c273147..dba1bc233 100644 --- a/core/runtime/snapshot_util.rs +++ b/core/runtime/snapshot_util.rs @@ -57,12 +57,9 @@ pub fn create_snapshot( .iter() .flat_map(|e| vec![e.get_esm_sources(), e.get_js_sources()]) .flatten() - .flatten() { use crate::ExtensionFileSourceCode; - if let ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(path) = - &source.code - { + if let ExtensionFileSourceCode::LoadAtRuntime(path) = &source.code { files_loaded_during_snapshot.push(path.clone()); } } |
