summaryrefslogtreecommitdiff
path: root/runtime/ops/worker_host.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 /runtime/ops/worker_host.rs
parent5dd010a4fbeb0602891ea537b98216b8ad7d27a7 (diff)
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
Diffstat (limited to 'runtime/ops/worker_host.rs')
-rw-r--r--runtime/ops/worker_host.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs
index a77f57b60..960e35b3d 100644
--- a/runtime/ops/worker_host.rs
+++ b/runtime/ops/worker_host.rs
@@ -26,6 +26,8 @@ use std::collections::HashMap;
use std::rc::Rc;
use std::sync::Arc;
+pub const UNSTABLE_FEATURE_NAME: &str = "worker";
+
pub struct CreateWebWorkerArgs {
pub name: String,
pub worker_id: WorkerId,
@@ -140,7 +142,11 @@ fn op_create_worker(
}
if args.permissions.is_some() {
- super::check_unstable(state, "Worker.deno.permissions");
+ super::check_unstable(
+ state,
+ UNSTABLE_FEATURE_NAME,
+ "Worker.deno.permissions",
+ );
}
let parent_permissions = state.borrow_mut::<PermissionsContainer>();
let worker_permissions = if let Some(child_permissions_arg) = args.permissions