Skip to content

chore: bump napi: drain the platform's fallback foreground-task queue - #6845

Open
Arshia001 wants to merge 1 commit into
guest-heap-mandatory-allocfrom
fix/foreground-task-queue-drain
Open

chore: bump napi: drain the platform's fallback foreground-task queue#6845
Arshia001 wants to merge 1 commit into
guest-heap-mandatory-allocfrom
fix/foreground-task-queue-drain

Conversation

@Arshia001

Copy link
Copy Markdown
Member

Picks up wasmerio/napi#50 (branch `fix/foreground-task-queue-drain` on top
of `guest-heap-mandatory-alloc`), which fixes V8-internal
FinalizationRegistry cleanup callbacks never firing in the napi-v8
embedding: the cleanup task V8 posts after GC was silently dropped whenever
the guest hadn't bound its own foreground-task hook (edgejs never does --
it drives everything through `unofficial_napi_process_microtasks`),
because nothing pumped the fallback platform runner those tasks fell back
to.

See wasmerio/napi#50 for the root-cause writeup and verification (standalone
V8 repro + before/after FinalizationRegistry/WeakRef fire-rate tests).

Stacked on #6844.

Picks up wasmerio/napi#<pending> (branch fix/foreground-task-queue-drain
on top of guest-heap-mandatory-alloc), which fixes V8-internal
FinalizationRegistry cleanup callbacks never firing in the napi-v8
embedding: the cleanup task V8 posts after GC is silently dropped
whenever the guest hasn't bound its own foreground-task hook (edgejs
never does -- it drives everything through
unofficial_napi_process_microtasks), because nothing pumped the
fallback platform runner those tasks fell back to.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Arshia001
Arshia001 requested a review from syrusakbary as a code owner August 4, 2026 13:56
Copilot AI lite review requested due to automatic review settings August 4, 2026 13:56
@Arshia001
Arshia001 force-pushed the fix/foreground-task-queue-drain branch from ec91df3 to aa82623 Compare August 4, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the lib/napi git submodule to pick up wasmerio/napi#50, addressing a correctness issue in the napi-v8 embedding where V8-internal deferred foreground tasks (notably FinalizationRegistry cleanup callbacks) could be silently dropped when the guest never binds a foreground-task hook and only drives execution via unofficial_napi_process_microtasks.

Changes:

  • Updates the lib/napi submodule pointer to include the upstream fix that explicitly drains the fallback platform foreground-task queue.
  • Ensures V8鈥檚 post-GC FinalizationRegistry cleanup work has an opportunity to run even without a guest-provided foreground-task enqueue hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants