diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-06-06 23:37:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-06 23:37:53 -0400 |
commit | 386d5c8310891c5dc9627abbf2374e60bb4e50d2 (patch) | |
tree | 920367bb6e14a5d259a01765962e93ff991c1fa0 /ext/web/timers.rs | |
parent | a17794d5cf0c8d1ecc624c490071e5b3a5856bc7 (diff) |
refactor: remove `PermissionsContainer` in deno_runtime (#24119)
Also removes permissions being passed in for node resolution. It was
completely useless because we only checked it for reading package.json
files, but Deno reading package.json files for resolution is perfectly
fine.
My guess is this is also a perf improvement because Deno is doing less
work.
Diffstat (limited to 'ext/web/timers.rs')
-rw-r--r-- | ext/web/timers.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/web/timers.rs b/ext/web/timers.rs index b3060a46f..648be5715 100644 --- a/ext/web/timers.rs +++ b/ext/web/timers.rs @@ -10,6 +10,13 @@ pub trait TimersPermission { fn allow_hrtime(&mut self) -> bool; } +impl TimersPermission for deno_permissions::PermissionsContainer { + #[inline(always)] + fn allow_hrtime(&mut self) -> bool { + deno_permissions::PermissionsContainer::allow_hrtime(self) + } +} + pub type StartTime = Instant; // Returns a milliseconds and nanoseconds subsec |