diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-10-12 17:55:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 15:55:50 +0000 |
commit | c464cd7073c761780b3170a48542c387560e3f26 (patch) | |
tree | 881a26d05423f9c696c8f35ce8bd2d72d562b1ea /runtime/ops/mod.rs | |
parent | 5dd010a4fbeb0602891ea537b98216b8ad7d27a7 (diff) |
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
Diffstat (limited to 'runtime/ops/mod.rs')
-rw-r--r-- | runtime/ops/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/ops/mod.rs b/runtime/ops/mod.rs index cdafd61ec..bafa6c571 100644 --- a/runtime/ops/mod.rs +++ b/runtime/ops/mod.rs @@ -15,10 +15,12 @@ pub mod worker_host; use deno_core::OpState; /// Helper for checking unstable features. Used for sync ops. -pub fn check_unstable(state: &OpState, api_name: &str) { +pub fn check_unstable(state: &OpState, feature: &str, 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_legacy_unstable_or_exit(api_name); + .check_or_exit_with_legacy_fallback(feature, api_name); } pub struct TestingFeaturesEnabled(pub bool); |