mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -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:
parent
dfc254cd57
commit
2167a52d69
5 changed files with 0 additions and 21 deletions
|
@ -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> {
|
||||
|
|
|
@ -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> {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue