summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/broadcast_channel/lib.rs9
-rw-r--r--ext/cron/lib.rs4
-rw-r--r--ext/kv/lib.rs4
-rw-r--r--ext/net/lib.rs4
-rw-r--r--ext/net/ops.rs5
5 files changed, 7 insertions, 19 deletions
diff --git a/ext/broadcast_channel/lib.rs b/ext/broadcast_channel/lib.rs
index 437580971..47c48656d 100644
--- a/ext/broadcast_channel/lib.rs
+++ b/ext/broadcast_channel/lib.rs
@@ -50,12 +50,9 @@ pub fn op_broadcast_subscribe<BC>(
where
BC: BroadcastChannel + 'static,
{
- // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
- // once we phase out `check_or_exit_with_legacy_fallback`
- state.feature_checker.check_or_exit_with_legacy_fallback(
- UNSTABLE_FEATURE_NAME,
- "BroadcastChannel",
- );
+ state
+ .feature_checker
+ .check_or_exit(UNSTABLE_FEATURE_NAME, "BroadcastChannel");
let bc = state.borrow::<BC>();
let resource = bc.subscribe()?;
Ok(state.resource_table.add(resource))
diff --git a/ext/cron/lib.rs b/ext/cron/lib.rs
index 95e38179d..e350e4d69 100644
--- a/ext/cron/lib.rs
+++ b/ext/cron/lib.rs
@@ -62,11 +62,9 @@ where
{
let cron_handler = {
let state = state.borrow();
- // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
- // once we phase out `check_or_exit_with_legacy_fallback`
state
.feature_checker
- .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, "Deno.cron");
+ .check_or_exit(UNSTABLE_FEATURE_NAME, "Deno.cron");
state.borrow::<Rc<C>>().clone()
};
diff --git a/ext/kv/lib.rs b/ext/kv/lib.rs
index c7a995073..45095724d 100644
--- a/ext/kv/lib.rs
+++ b/ext/kv/lib.rs
@@ -129,11 +129,9 @@ where
{
let handler = {
let state = state.borrow();
- // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
- // once we phase out `check_or_exit_with_legacy_fallback`
state
.feature_checker
- .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, "Deno.openKv");
+ .check_or_exit(UNSTABLE_FEATURE_NAME, "Deno.openKv");
state.borrow::<Rc<DBH>>().clone()
};
let db = handler.open(state.clone(), path).await?;
diff --git a/ext/net/lib.rs b/ext/net/lib.rs
index 0ef3e85c4..b039965d4 100644
--- a/ext/net/lib.rs
+++ b/ext/net/lib.rs
@@ -88,11 +88,9 @@ impl NetPermissions for deno_permissions::PermissionsContainer {
/// Helper for checking unstable features. Used for sync ops.
fn check_unstable(state: &OpState, api_name: &str) {
- // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit`
- // once we phase out `check_or_exit_with_legacy_fallback`
state
.feature_checker
- .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, api_name);
+ .check_or_exit(UNSTABLE_FEATURE_NAME, api_name);
}
pub fn get_declaration() -> PathBuf {
diff --git a/ext/net/ops.rs b/ext/net/ops.rs
index 67d32fe03..f2735eda9 100644
--- a/ext/net/ops.rs
+++ b/ext/net/ops.rs
@@ -1063,12 +1063,9 @@ mod tests {
}
);
- let mut feature_checker = deno_core::FeatureChecker::default();
- feature_checker.enable_legacy_unstable();
-
let mut runtime = JsRuntime::new(RuntimeOptions {
extensions: vec![test_ext::init_ops()],
- feature_checker: Some(Arc::new(feature_checker)),
+ feature_checker: Some(Arc::new(Default::default())),
..Default::default()
});