summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-10-12 17:55:50 +0200
committerGitHub <noreply@github.com>2023-10-12 15:55:50 +0000
commitc464cd7073c761780b3170a48542c387560e3f26 (patch)
tree881a26d05423f9c696c8f35ce8bd2d72d562b1ea /cli/worker.rs
parent5dd010a4fbeb0602891ea537b98216b8ad7d27a7 (diff)
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index de8cb2018..d8738d492 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -16,6 +16,7 @@ use deno_core::url::Url;
use deno_core::v8;
use deno_core::CompiledWasmModuleStore;
use deno_core::Extension;
+use deno_core::FeatureChecker;
use deno_core::ModuleId;
use deno_core::ModuleLoader;
use deno_core::SharedArrayBufferStore;
@@ -109,6 +110,7 @@ struct SharedWorkerState {
fs: Arc<dyn deno_fs::FileSystem>,
maybe_inspector_server: Option<Arc<InspectorServer>>,
maybe_lockfile: Option<Arc<Mutex<Lockfile>>>,
+ feature_checker: Arc<FeatureChecker>,
}
impl SharedWorkerState {
@@ -313,6 +315,7 @@ impl CliMainWorkerFactory {
fs: Arc<dyn deno_fs::FileSystem>,
maybe_inspector_server: Option<Arc<InspectorServer>>,
maybe_lockfile: Option<Arc<Mutex<Lockfile>>>,
+ feature_checker: Arc<FeatureChecker>,
options: CliMainWorkerOptions,
) -> Self {
Self {
@@ -330,6 +333,7 @@ impl CliMainWorkerFactory {
fs,
maybe_inspector_server,
maybe_lockfile,
+ feature_checker,
}),
}
}
@@ -510,6 +514,7 @@ impl CliMainWorkerFactory {
shared.compiled_wasm_module_store.clone(),
),
stdio,
+ feature_checker: shared.feature_checker.clone(),
};
let worker = MainWorker::bootstrap_from_options(
@@ -681,6 +686,7 @@ fn create_web_worker_callback(
),
stdio: stdio.clone(),
cache_storage_dir,
+ feature_checker: shared.feature_checker.clone(),
};
WebWorker::bootstrap_from_options(