Skip to content

[v26.x] deps: V8: cherry-pick 497c2e6a2434 - #66728

Open
inoway46 wants to merge 1 commit into
nodejs:v26.x-stagingfrom
inoway46:backport-v26-retained-maps
Open

inoway46 wants to merge 1 commit into
nodejs:v26.x-stagingfrom
inoway46:backport-v26-retained-maps

Conversation

@inoway46

@inoway46 inoway46 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Backport the upstream V8 fix for indefinitely retained maps and increment v8_embedder_string.

This affects real-world Jest workloads, where retained contexts substantially increase memory usage, making the fix worth including in Current.

Upstream fix: https://chromium-review.googlesource.com/c/v8/v8/+/8557820

The v26.11.0 reproduction retained 1→8 contexts before the fix and 0 throughout with it applied: https://github.com/inoway46/node/actions/runs/38432566001

Refs: #66490


This targets v26.x-staging directly, following the discussion in #66710; main can pick up the fix through a V8 update.

Original commit message:

    [heap] Always decrement age in RetainMaps()

    When the prototype and constructor were already marked we did not
    age the map because of the assumption that this would only keep the
    transition tree alive. However, this does not hold because of
    the JSFunctions inside an AccessorPair in DescriptorArray.

    This can result in retaining maps indefinitely when not triggering
    memory reducing GCs. This CL therefore simplifies the code to
    always age maps instead. This is neutral on Speedometer and Jetstream.

    Bug: 571157135
    Change-Id: I8fb633a0ec0c1d66e4596390ca48e1c7006c9cc2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8557820
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#110622}

Fixes: nodejs#66490
Refs: v8/v8@497c2e6
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Oct 14, 2026
@inoway46
inoway46 marked this pull request as ready for review October 14, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants