mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
This commit is contained in:
parent
5dd010a4fb
commit
c464cd7073
20 changed files with 125 additions and 45 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue