1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

refactor: remove TimersPermissions::check_unstable (#20831)

This is dead code that was not used in any way.

Ref https://github.com/denoland/deno/pull/20797
This commit is contained in:
Bartek Iwańczuk 2023-10-09 02:08:10 +02:00 committed by GitHub
parent dfc254cd57
commit 2167a52d69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 21 deletions

View file

@ -7,7 +7,6 @@ use deno_bench_util::bencher::Bencher;
use deno_core::Extension;
use deno_core::ExtensionFileSource;
use deno_core::ExtensionFileSourceCode;
use deno_core::OpState;
#[derive(Clone)]
struct Permissions;
@ -16,9 +15,6 @@ impl deno_web::TimersPermission for Permissions {
fn allow_hrtime(&mut self) -> bool {
false
}
fn check_unstable(&self, _state: &OpState, _api_name: &'static str) {
unreachable!()
}
}
fn setup() -> Vec<Extension> {

View file

@ -7,7 +7,6 @@ use deno_bench_util::bencher::Bencher;
use deno_core::Extension;
use deno_core::ExtensionFileSource;
use deno_core::ExtensionFileSourceCode;
use deno_core::OpState;
#[derive(Clone)]
struct Permissions;
@ -16,7 +15,6 @@ impl deno_web::TimersPermission for Permissions {
fn allow_hrtime(&mut self) -> bool {
true
}
fn check_unstable(&self, _state: &OpState, _api_name: &'static str) {}
}
fn setup() -> Vec<Extension> {

View file

@ -19,7 +19,6 @@ use std::time::Instant;
pub trait TimersPermission {
fn allow_hrtime(&mut self) -> bool;
fn check_unstable(&self, state: &OpState, api_name: &'static str);
}
pub type StartTime = Instant;

View file

@ -55,14 +55,6 @@ mod startup_snapshot {
fn allow_hrtime(&mut self) -> bool {
unreachable!("snapshotting!")
}
fn check_unstable(
&self,
_state: &deno_core::OpState,
_api_name: &'static str,
) {
unreachable!("snapshotting!")
}
}
impl deno_ffi::FfiPermissions for Permissions {

View file

@ -15,7 +15,6 @@ use deno_core::serde_json;
use deno_core::url;
use deno_core::url::Url;
use deno_core::ModuleSpecifier;
use deno_core::OpState;
use log;
use once_cell::sync::Lazy;
use std::borrow::Cow;
@ -1434,11 +1433,6 @@ impl deno_web::TimersPermission for PermissionsContainer {
fn allow_hrtime(&mut self) -> bool {
self.0.lock().hrtime.check().is_ok()
}
#[inline(always)]
fn check_unstable(&self, state: &OpState, api_name: &'static str) {
crate::ops::check_unstable(state, api_name);
}
}
impl deno_websocket::WebSocketPermissions for PermissionsContainer {