• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / edge-runtime / 15722224875

18 Jun 2025 02:08AM UTC coverage: 51.866% (+0.4%) from 51.448%
15722224875

push

github

web-flow
feat: introduce v8 locker in our codebase (#549)

* fix: use `BTreeMap` instead of `IndexMap`

DESCRIPTION:
vfs uses binary search internally, so it must be properly sorted.
However, it is inappropriate to use IndexMap::(...)::collect() and
expect the elements to be sorted.

* fix: introduce `WorkerAlreadyRetired` error

DESCRIPTION:
When the main worker's script relays an HTTP request to
the user worker, it may already be in a retired state.

* fix: expose why the response failed on the main worker to the actual response

* chore(base): add a dependency

* chore: patch dependencies

* chore: update `Cargo.lock`

* stamp: fmt

* chore: update `deno.json`

* chore: update `.cargo/config.toml`

* feat: introduce v8 locker api

* fix: update integration tests

* chore: update main worker script

* fix(k6): add various specs

* stamp: polishing

* fix: make cpu timer compatible on multi-thread

* fix: allow calling synchronous deno functions in the top-level context

* chore: add `vendor/deno_unsync`

* chore: update v8 mirror

* chore: update dependencies

* chore: update `Cargo.lock`

* stamp: polishing

* chore: update `.dprint.json`

1025 of 1173 new or added lines in 18 files covered. (87.38%)

7 existing lines in 4 files now uncovered.

18153 of 35000 relevant lines covered (51.87%)

5514.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/crates/base/src/runtime/unsync.rs
1
use std::future::Future;
2
use std::pin::Pin;
3
use std::task::Poll;
4

5
#[repr(transparent)]
6
pub struct MaskValueAsSend<V> {
7
  pub value: V,
8
}
9

10
unsafe impl<R> Send for MaskValueAsSend<R> {}
11

12
impl<R> MaskValueAsSend<R> {
13
  #[inline(always)]
14
  pub fn into_inner(self) -> R {
9,092✔
15
    self.value
9,092✔
16
  }
9,092✔
17
}
18

19
pub struct MaskFutureAsSend<Fut> {
20
  pub fut: MaskValueAsSend<Fut>,
21
}
22

23
impl<Fut> From<Fut> for MaskFutureAsSend<Fut>
24
where
25
  Fut: Future,
26
{
NEW
27
  fn from(value: Fut) -> Self {
×
NEW
28
    Self {
×
NEW
29
      fut: MaskValueAsSend { value },
×
NEW
30
    }
×
NEW
31
  }
×
32
}
33

34
impl<Fut: Future> Future for MaskFutureAsSend<Fut> {
35
  type Output = Fut::Output;
36

NEW
37
  fn poll(
×
NEW
38
    self: Pin<&mut Self>,
×
NEW
39
    cx: &mut std::task::Context<'_>,
×
NEW
40
  ) -> Poll<Self::Output> {
×
NEW
41
    unsafe { Pin::new_unchecked(&mut self.get_unchecked_mut().fut.value) }
×
NEW
42
      .poll(cx)
×
NEW
43
  }
×
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc