Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f2311f4
Don't enqueue to a terminated worker's freed event loop from other th…
robobun Jun 10, 2026
c618e4c
Allow not_unsafe_ptr_arg_deref on the checked enqueue entry points
robobun Jun 10, 2026
007f64b
Address review: dangling-reference fields, failure-path cleanup, visi…
robobun Jun 10, 2026
64bafc1
Don't deinit a dead worker's FetchTasklet against its freed JSC heap
robobun Jun 10, 2026
575acf4
Make cross-thread VM field reads atomic and shrink dead-VM tasklet pa…
robobun Jun 10, 2026
3ca7b27
Publish MAIN_THREAD_VM only once the main VM is fully initialized
robobun Jun 10, 2026
0cf6132
Carry a generation token with cross-thread VM handles (#32082)
robobun Jun 12, 2026
4bbd5de
Merge branch 'main' into farm/7117067b/worker-terminate-concurrent-qu…
Jarred-Sumner Jun 12, 2026
c417173
Make VmHandle the only cross-thread VM identity, including C++ captures
robobun Jun 12, 2026
950d3c9
Remove a no-op borrow of the fetch tasklet's VM handle
robobun Jun 12, 2026
26fe733
Load the positive-delivery worker from a file instead of a data: URL
robobun Jun 12, 2026
6f4c56a
Sync stale VM-lifetime comments with the handle semantics
robobun Jun 12, 2026
a300ceb
Fix two more stale lifetime comments and ungroup the parked-tasklet s…
robobun Jun 12, 2026
26aa62e
ci: retrigger
robobun Jun 12, 2026
c34de46
Merge main into worker-terminate-concurrent-queue-uaf
robobun Jul 3, 2026
7ffec34
Merge remote-tracking branch 'origin/main' into farm/7117067b/worker-…
robobun Jul 10, 2026
1192b82
ci: re-run checks
robobun Jul 10, 2026
1e6d30a
Merge remote-tracking branch 'origin/main' into farm/7117067b/worker-…
robobun Jul 10, 2026
d1c2a20
Correct stale doc claims about MAIN_THREAD_VM publish, event_loop tar…
robobun Jul 10, 2026
7f78581
Fix three more doc comments contradicted by the generation capture
robobun Jul 10, 2026
76cb8a3
Qualify the link_impl_JsEventLoop header for the cross-thread enqueue…
robobun Jul 10, 2026
d680781
Merge remote-tracking branch 'origin/main' into farm/7117067b/worker-…
robobun Jul 11, 2026
99fb435
Merge remote-tracking branch 'origin/main' into farm/7117067b/worker-…
robobun Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/bundler/ParseTask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2810,14 +2810,15 @@ pub mod parse_worker {
.any_loop_mut()
.expect("BundleV2.linker.loop must be set before scheduling ParseTask")
{
bun_event_loop::AnyEventLoop::Js { owner } => {
bun_event_loop::AnyEventLoop::Js { owner, generation } => {
owner.enqueue_task_concurrent(
bun_event_loop::ConcurrentTask::ConcurrentTask::from_callback(result, |p| {
// SAFETY: `p` is the `result` Box leaked above; ownership
// transfers to `on_complete`, which deallocates it.
unsafe { on_complete(p) };
Ok(())
}),
*generation,
);
}
bun_event_loop::AnyEventLoop::Mini(mini) => {
Expand Down
3 changes: 2 additions & 1 deletion src/bundler/ServerComponentParseTask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ fn task_callback_wrap(thread_pool_task: *mut ThreadPoolTask) {
.any_loop_mut()
.expect("BundleV2.linker.loop must be set before scheduling ServerComponentParseTask")
{
bun_event_loop::AnyEventLoop::Js { owner } => {
bun_event_loop::AnyEventLoop::Js { owner, generation } => {
owner.enqueue_task_concurrent(
bun_event_loop::ConcurrentTask::ConcurrentTask::from_callback(result, |p| {
// SAFETY: `p` is the `result` Box leaked above; ownership
// transfers to `on_complete`, which deallocates it.
unsafe { on_complete(p) };
Ok(())
}),
*generation,
);
}
bun_event_loop::AnyEventLoop::Mini(mini) => {
Expand Down
10 changes: 6 additions & 4 deletions src/bundler/bundle_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1566,8 +1566,8 @@ pub mod bv2_impl {
// the plugins.
// `any_loop_mut` centralises the BACKREF deref of `linker.r#loop`.
match &*self.any_loop_mut() {
bun_event_loop::AnyEventLoop::Js { owner } => {
owner.enqueue_task_concurrent(task);
bun_event_loop::AnyEventLoop::Js { owner, generation } => {
owner.enqueue_task_concurrent(task, *generation);
}
bun_event_loop::AnyEventLoop::Mini(_) => {
panic!("No JavaScript event loop for transpiler plugins to run on");
Expand Down Expand Up @@ -4205,12 +4205,13 @@ pub mod bv2_impl {
// `on_load` must land there — not on the JS plugin loop — or it will
// mutate `graph` / allocate from `graph.heap` off-thread.
match self.any_loop_mut() {
bun_event_loop::AnyEventLoop::Js { owner } => {
bun_event_loop::AnyEventLoop::Js { owner, generation } => {
owner.enqueue_task_concurrent(
bun_event_loop::ConcurrentTask::ConcurrentTask::from_callback(
std::ptr::from_mut(load),
on_load_from_js_loop_raw,
),
*generation,
);
}
bun_event_loop::AnyEventLoop::Mini(mini) => {
Expand All @@ -4230,12 +4231,13 @@ pub mod bv2_impl {
pub fn on_resolve_async(&mut self, resolve: &mut jsc_api::JSBundler::Resolve) {
// See `on_load_async` — must dispatch on the bundler's own loop.
match self.any_loop_mut() {
bun_event_loop::AnyEventLoop::Js { owner } => {
bun_event_loop::AnyEventLoop::Js { owner, generation } => {
owner.enqueue_task_concurrent(
bun_event_loop::ConcurrentTask::ConcurrentTask::from_callback(
std::ptr::from_mut(resolve),
on_resolve_from_js_loop_raw,
),
*generation,
);
}
bun_event_loop::AnyEventLoop::Mini(mini) => {
Expand Down
Loading
Loading