Skip to content

build: run perfetto build and test on GHA - #64721

Closed
legendecas wants to merge 4 commits into
nodejs:mainfrom
legendecas:ci-perfetto
Closed

legendecas wants to merge 4 commits into
nodejs:mainfrom
legendecas:ci-perfetto

Conversation

@legendecas

@legendecas legendecas commented Jul 24, 2026 •

Copy link
Copy Markdown
Member

This ensures that the src/lib changes (like emitting trace events) are compatible with perfetto, and compatible with V8 compiled with perfetto.

Refs: #64565
Fixes: nodejs/diagnostics#654

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-bot nodejs-github-bot added the meta Issues and PRs related to the general management of the project. label Jul 24, 2026
@legendecas legendecas added dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. labels Jul 24, 2026
Comment on lines +44 to +48
path: node
- name: Install Clang ${{ env.CLANG_VERSION }}
uses: ./node/.github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
path: node
- name: Install Clang ${{ env.CLANG_VERSION }}
uses: ./node/.github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}
- name: Install Clang ${{ env.CLANG_VERSION }}
uses: .github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}

nit: use the CWD

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@avivkeller avivkeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, we should probably update the other workflows to use the CWD, IMO it's cleaner

@Renegade334

Copy link
Copy Markdown
Member

Could we enable this for the existing Linux workflow rather than adding an additional run?

@Renegade334
Renegade334 requested a review from aduh95 July 25, 2026 02:09
@legendecas

Copy link
Copy Markdown
Member Author

Could we enable this for the existing Linux workflow rather than adding an additional run?

We could. Still, I think in the near future, we might want to keep testing both legacy tracing and perfetto tracing, until we can fully deprecate the legacy one.

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.

For other flags (except QUIC, but the QUIC job being restricted to a very limited set of files, that's less of a concern), we put this as part of the test-shared workflow. Can we do that here as well? Having a dedicated job is probably a waste and won't scale well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion, updated!

@codecov

codecov Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.17%. Comparing base (f8f8aa2) to head (a8e5815).
⚠️ Report is 51 commits behind head on main.

Files with missing lines Patch % Lines
src/tracing/trace_event_helper.cc 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64721      +/-   ##
==========================================
+ Coverage   90.14%   90.17%   +0.03%     
==========================================
  Files         746      746              
  Lines      242818   242771      -47     
  Branches    45765    45740      -25     
==========================================
+ Hits       218884   218918      +34     
+ Misses      15417    15345      -72     
+ Partials     8517     8508       -9     
Files with missing lines Coverage Δ
src/debug_utils.h 80.00% <ø> (ø)
src/node_trace_events.cc 82.30% <ø> (ø)
src/tracing/node_trace_writer.cc 77.50% <100.00%> (-1.12%) ⬇️
src/tracing/trace_event_helper.h 100.00% <ø> (ø)
src/tracing/trace_event_helper.cc 95.65% <92.30%> (-4.35%) ⬇️

... and 60 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@legendecas
legendecas force-pushed the ci-perfetto branch 4 times, most recently from 494f038 to dd064f0 Compare July 29, 2026 13:54
@legendecas legendecas added test Issues and PRs related to Node.js core tests and test infrastructure. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels Jul 29, 2026
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
@legendecas

Copy link
Copy Markdown
Member Author

Rebased on the latest main branch to fix conflicts and build failures.

@legendecas legendecas added the trace_events Issues and PRs related to trace events from V8, Node.js core, and user code. label Jul 29, 2026
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

aduh95 pushed a commit that referenced this pull request Aug 4, 2026
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #64721
Fixes: nodejs/diagnostics#654
Refs: #64565
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
ckerr added a commit to electron/electron that referenced this pull request Aug 4, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
ckerr added a commit to electron/electron that referenced this pull request Aug 5, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
aduh95 pushed a commit that referenced this pull request Aug 5, 2026
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #64721
Fixes: nodejs/diagnostics#654
Refs: #64565
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 5, 2026
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #64721
Fixes: nodejs/diagnostics#654
Refs: #64565
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 5, 2026
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #64721
Fixes: nodejs/diagnostics#654
Refs: #64565
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 5, 2026
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: #64721
Fixes: nodejs/diagnostics#654
Refs: #64565
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
ckerr added a commit to electron/electron that referenced this pull request Aug 5, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
ckerr added a commit to electron/electron that referenced this pull request Aug 5, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
ckerr added a commit to electron/electron that referenced this pull request Aug 7, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 11, 2026
This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [node](https://nodejs.org) ([source](https://github.com/nodejs/node)) | tools | minor | `26.5.0` → `26.7.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>nodejs/node (node)</summary>

### [`v26.7.0`](https://github.com/nodejs/node/releases/tag/v26.7.0): 2026-08-05, Version 26.7.0 (Current), @&#8203;aduh95

[Compare Source](nodejs/node@v26.5.0...v26.7.0)

##### Notable Changes

- \[[`58717685a1`](nodejs/node@58717685a1)] - **(SEMVER-MINOR)** **crypto**: support loading private keys through STORE loaders (Filip Skokan) [#&#8203;63949](nodejs/node#63949)
- \[[`44b940ee8c`](nodejs/node@44b940ee8c)] - **crypto**: update root certificates to NSS 3.125 (Node.js GitHub Bot) [#&#8203;64746](nodejs/node#64746)
- \[[`c1e4f7365e`](nodejs/node@c1e4f7365e)] - **(SEMVER-MINOR)** **lib**: add perfetto support (Chengzhong Wu) [#&#8203;64565](nodejs/node#64565)
- \[[`11c2f9c642`](nodejs/node@11c2f9c642)] - **(SEMVER-MINOR)** **module**: implement `Symbol.dispose` in `ModuleHooks` (Remco Haszing) [#&#8203;63928](nodejs/node#63928)
- \[[`a646319f61`](nodejs/node@a646319f61)] - **(SEMVER-MINOR)** **test\_runner**: add support for `--test-coverage-include-all` (avivkeller) [#&#8203;64830](nodejs/node#64830)

##### Commits

- \[[`a2d3f891d3`](nodejs/node@a2d3f891d3)] - **async\_hooks**: use validateBoolean for trackPromises (Soul Lee) [#&#8203;64731](nodejs/node#64731)
- \[[`d7266cdd99`](nodejs/node@d7266cdd99)] - **benchmark**: fix calibrate-n option handling (Luan Muniz) [#&#8203;64146](nodejs/node#64146)
- \[[`2e64293e3f`](nodejs/node@2e64293e3f)] - **buffer**: use Clamp conversion in Blob slice (Donghoon Kang) [#&#8203;64739](nodejs/node#64739)
- \[[`5fda0958bd`](nodejs/node@5fda0958bd)] - **buffer**: validate copyArrayBuffer offsets against buffer length (Ilia Alshanetsky) [#&#8203;63904](nodejs/node#63904)
- \[[`5298db40f9`](nodejs/node@5298db40f9)] - **build**: run perfetto build and test on GHA (Chengzhong Wu) [#&#8203;64721](nodejs/node#64721)
- \[[`e3eac7cef9`](nodejs/node@e3eac7cef9)] - **build**: fix v8\_use\_perfetto source scraping (Chengzhong Wu) [#&#8203;64721](nodejs/node#64721)
- \[[`ab5f076d7f`](nodejs/node@ab5f076d7f)] - **build**: bump rustc requirement to >=1.86 (Renegade334) [#&#8203;64543](nodejs/node#64543)
- \[[`df608e061f`](nodejs/node@df608e061f)] - **(SEMVER-MINOR)** **build**: perfetto-sdk (Chengzhong Wu) [#&#8203;64565](nodejs/node#64565)
- \[[`74928adc46`](nodejs/node@74928adc46)] - **build,tools**: fix shared library cross-compile (Kirill Saied) [#&#8203;63963](nodejs/node#63963)
- \[[`58717685a1`](nodejs/node@58717685a1)] - **(SEMVER-MINOR)** **crypto**: support loading private keys through STORE loaders (Filip Skokan) [#&#8203;63949](nodejs/node#63949)
- \[[`58d13b6f3d`](nodejs/node@58d13b6f3d)] - **crypto**: preserve OpenSSL errors from KDF failures (Filip Skokan) [#&#8203;64776](nodejs/node#64776)
- \[[`478a719cb5`](nodejs/node@478a719cb5)] - **crypto**: fix Argon2 bypassing FIPS mode (Filip Skokan) [#&#8203;64776](nodejs/node#64776)
- \[[`44b940ee8c`](nodejs/node@44b940ee8c)] - **crypto**: update root certificates to NSS 3.125 (Node.js GitHub Bot) [#&#8203;64746](nodejs/node#64746)
- \[[`fde85237c7`](nodejs/node@fde85237c7)] - **crypto**: clarify missing cipher error (Filip Skokan) [#&#8203;64852](nodejs/node#64852)
- \[[`c604d8846d`](nodejs/node@c604d8846d)] - **crypto**: reuse X509 issuer result (Filip Skokan) [#&#8203;64852](nodejs/node#64852)
- \[[`c68c7d0112`](nodejs/node@c68c7d0112)] - **crypto**: validate key generation options (Filip Skokan) [#&#8203;64852](nodejs/node#64852)
- \[[`c36bb1d017`](nodejs/node@c36bb1d017)] - **crypto**: fix Argon2 validation errors (Filip Skokan) [#&#8203;64852](nodejs/node#64852)
- \[[`f61408bb27`](nodejs/node@f61408bb27)] - **crypto**: handle XOF output allocation failure (Filip Skokan) [#&#8203;64851](nodejs/node#64851)
- \[[`2b4053d046`](nodejs/node@2b4053d046)] - **crypto**: initialize KeyObjectData mutex eagerly (Filip Skokan) [#&#8203;64851](nodejs/node#64851)
- \[[`4b7b2adf44`](nodejs/node@4b7b2adf44)] - **crypto**: handle DH operation failures (Filip Skokan) [#&#8203;64851](nodejs/node#64851)
- \[[`12170c3753`](nodejs/node@12170c3753)] - **crypto**: use user-facing error for output encoding changes (Archkon) [#&#8203;64692](nodejs/node#64692)
- \[[`474f06d550`](nodejs/node@474f06d550)] - **debugger**: preserve overlapping CDP request state (Trivikram Kamat) [#&#8203;64467](nodejs/node#64467)
- \[[`718cbe9497`](nodejs/node@718cbe9497)] - **deps**: upgrade npm to 11.19.0 (npm team) [#&#8203;64883](nodejs/node#64883)
- \[[`657c6154b3`](nodejs/node@657c6154b3)] - **deps**: update ngtcp2 to 1.25.0 (Node.js GitHub Bot) [#&#8203;64944](nodejs/node#64944)
- \[[`75a1fbeff9`](nodejs/node@75a1fbeff9)] - **deps**: update nghttp3 to 1.18.0 (Node.js GitHub Bot) [#&#8203;64943](nodejs/node#64943)
- \[[`07d7cb7cd8`](nodejs/node@07d7cb7cd8)] - **deps**: update minimatch to 10.2.6 (Node.js GitHub Bot) [#&#8203;64945](nodejs/node#64945)
- \[[`f7d56359f1`](nodejs/node@f7d56359f1)] - **deps**: update simdjson to 4.6.6 (Node.js GitHub Bot) [#&#8203;64942](nodejs/node#64942)
- \[[`8b06457cfb`](nodejs/node@8b06457cfb)] - **deps**: update acorn to 8.18.0 (Node.js GitHub Bot) [#&#8203;64941](nodejs/node#64941)
- \[[`5919d01525`](nodejs/node@5919d01525)] - **deps**: update googletest to [`1b6f64d`](nodejs/node@1b6f64d) (Node.js GitHub Bot) [#&#8203;64940](nodejs/node#64940)
- \[[`4a87ad6cff`](nodejs/node@4a87ad6cff)] - **deps**: update nghttp2 to 1.70.0 (Node.js GitHub Bot) [#&#8203;64939](nodejs/node#64939)
- \[[`c96d76a7c8`](nodejs/node@c96d76a7c8)] - **deps**: update zlib to 1.3.2.1-motley-42c2f19 (Node.js GitHub Bot) [#&#8203;64744](nodejs/node#64744)
- \[[`2b59984c0f`](nodejs/node@2b59984c0f)] - **deps**: V8: backport [`5177b10`](nodejs/node@5177b10891e6) (avivkeller) [#&#8203;64631](nodejs/node#64631)
- \[[`b839af91da`](nodejs/node@b839af91da)] - **deps**: update ada to 4.0.0 (Node.js GitHub Bot) [#&#8203;64790](nodejs/node#64790)
- \[[`70dedef942`](nodejs/node@70dedef942)] - **deps**: update sqlite to 3.53.4 (Node.js GitHub Bot) [#&#8203;64745](nodejs/node#64745)
- \[[`7bc4c171f5`](nodejs/node@7bc4c171f5)] - **deps**: update Rust crates for V8 14.6.202.34-node.26 (Renegade334) [#&#8203;64543](nodejs/node#64543)
- \[[`308c6b2ac3`](nodejs/node@308c6b2ac3)] - **deps**: V8: backport [`7d9b7e0`](nodejs/node@7d9b7e03141d) (Manish Goregaokar) [#&#8203;64543](nodejs/node#64543)
- \[[`8eeae28e88`](nodejs/node@8eeae28e88)] - **deps**: V8: backport [`c4d06ba`](nodejs/node@c4d06ba586f3) (liujiahui) [#&#8203;63731](nodejs/node#63731)
- \[[`bbd6fc58c4`](nodejs/node@bbd6fc58c4)] - **diagnostics\_channel**: grow native channel storage (Stephen Belanger) [#&#8203;64497](nodejs/node#64497)
- \[[`ce8b292955`](nodejs/node@ce8b292955)] - **doc**: fix grammar and punctuation in dgram documentation (Kamal Rawal) [#&#8203;64957](nodejs/node#64957)
- \[[`1a413a60cf`](nodejs/node@1a413a60cf)] - **doc**: fix grammar and editorial issues in addons documentation (Kamal Rawal) [#&#8203;64952](nodejs/node#64952)
- \[[`63fbd59e64`](nodejs/node@63fbd59e64)] - **doc**: formalize fn/name as part of TestOptions API (Christopher Hiller) [#&#8203;64946](nodejs/node#64946)
- \[[`b263b0bca1`](nodejs/node@b263b0bca1)] - **doc**: remove references to `ca`/`crl` as per-context QuicSession options (René) [#&#8203;64769](nodejs/node#64769)
- \[[`f37de14b27`](nodejs/node@f37de14b27)] - **doc**: fix typo in maintaining-dependencies.md (greenhead) [#&#8203;64896](nodejs/node#64896)
- \[[`16cb77cdc8`](nodejs/node@16cb77cdc8)] - **doc**: add RafaelGSS as last security release stewards (Rafael Gonzaga) [#&#8203;64843](nodejs/node#64843)
- \[[`335c28cd17`](nodejs/node@335c28cd17)] - **doc**: fix typos in documentation (greenhead) [#&#8203;64900](nodejs/node#64900)
- \[[`d4bed8ca39`](nodejs/node@d4bed8ca39)] - **doc**: fix missing references in doc type map (Tim Perry) [#&#8203;64872](nodejs/node#64872)
- \[[`e71d09d5f1`](nodejs/node@e71d09d5f1)] - **doc**: improve TestContext hook descriptions (Kamal Rawal) [#&#8203;64899](nodejs/node#64899)
- \[[`7089bd9ae4`](nodejs/node@7089bd9ae4)] - **doc**: add missing float32/float64 FFI type names (Soul Lee) [#&#8203;64874](nodejs/node#64874)
- \[[`8d3ae0830e`](nodejs/node@8d3ae0830e)] - **doc**: document stream.isDestroyed() (YspritanHyzygy) [#&#8203;64789](nodejs/node#64789)
- \[[`a757e62af7`](nodejs/node@a757e62af7)] - **doc**: add contributing detail for git Signed-off-by trailer (Mike McCready) [#&#8203;64862](nodejs/node#64862)
- \[[`3e840f43ed`](nodejs/node@3e840f43ed)] - **doc**: mark config-file as release candidate (Marco Ippolito) [#&#8203;64516](nodejs/node#64516)
- \[[`70cd5df810`](nodejs/node@70cd5df810)] - **doc**: fix duplicated word in test snapshot docs (Kamal Rawal) [#&#8203;64837](nodejs/node#64837)
- \[[`d5f36c7adc`](nodejs/node@d5f36c7adc)] - **doc**: remove obsolete cctest node.gyp instructions (Soul Lee) [#&#8203;64814](nodejs/node#64814)
- \[[`a0bf29ea09`](nodejs/node@a0bf29ea09)] - **doc**: report proper return type on url.format (Brian Muenzenmeyer) [#&#8203;64806](nodejs/node#64806)
- \[[`e655e42085`](nodejs/node@e655e42085)] - **doc**: use ffi.suffix for library paths in examples (Junsoo Ha) [#&#8203;64805](nodejs/node#64805)
- \[[`e0f0830dbc`](nodejs/node@e0f0830dbc)] - **doc**: document --permission-audit audit mode behavior (Adrián Estrada) [#&#8203;64791](nodejs/node#64791)
- \[[`efbede6de0`](nodejs/node@efbede6de0)] - **doc**: clarify tlsSocket.authorized on resumption (soreavis) [#&#8203;64584](nodejs/node#64584)
- \[[`db95655c4a`](nodejs/node@db95655c4a)] - **doc**: stabilize --disable-warning (Jean Michelet) [#&#8203;64742](nodejs/node#64742)
- \[[`a8367200be`](nodejs/node@a8367200be)] - **doc**: add MDN links for explicit resource management in fs (lluisemper) [#&#8203;59557](nodejs/node#59557)
- \[[`1c09165c2e`](nodejs/node@1c09165c2e)] - **doc**: mention constructor check in deepStrictEqual (Sumit Kumar Das) [#&#8203;62010](nodejs/node#62010)
- \[[`29709324e0`](nodejs/node@29709324e0)] - **doc**: update technical priorities (Jacob Smith) [#&#8203;64505](nodejs/node#64505)
- \[[`522a28e648`](nodejs/node@522a28e648)] - **doc**: deprecation add more codemod (Augustin Mauroy) [#&#8203;63175](nodejs/node#63175)
- \[[`c40aaa6539`](nodejs/node@c40aaa6539)] - **doc**: run license-builder (Node.js GitHub Bot) [#&#8203;63918](nodejs/node#63918)
- \[[`428e9bc50f`](nodejs/node@428e9bc50f)] - **ffi**: fix crash in refCallback and unrefCallback (Trivikram Kamat) [#&#8203;64881](nodejs/node#64881)
- \[[`33912103e7`](nodejs/node@33912103e7)] - **ffi**: reject fast calls after library close (Trivikram Kamat) [#&#8203;64860](nodejs/node#64860)
- \[[`b348ed7f92`](nodejs/node@b348ed7f92)] - **ffi**: validate fast 32-bit integer argument ranges (Trivikram Kamat) [#&#8203;64691](nodejs/node#64691)
- \[[`48f4cfb480`](nodejs/node@48f4cfb480)] - **ffi**: fix optimized buffer conversions (Trivikram Kamat) [#&#8203;64639](nodejs/node#64639)
- \[[`109ffcd4f3`](nodejs/node@109ffcd4f3)] - **ffi**: preserve link register in ppc64 trampoline (Trivikram Kamat) [#&#8203;64792](nodejs/node#64792)
- \[[`aa3f168b31`](nodejs/node@aa3f168b31)] - **ffi**: preserve strings during reentrant calls (Trivikram Kamat) [#&#8203;64551](nodejs/node#64551)
- \[[`ca60942f38`](nodejs/node@ca60942f38)] - **ffi**: preserve uint8 semantics for bool fast calls (Trivikram Kamat) [#&#8203;64527](nodejs/node#64527)
- \[[`0fb1d2bd65`](nodejs/node@0fb1d2bd65)] - **ffi**: validate fast integer argument ranges (Trivikram Kamat) [#&#8203;64614](nodejs/node#64614)
- \[[`b250b40b30`](nodejs/node@b250b40b30)] - **fs**: key glob matcher cache by platform (Archkon) [#&#8203;64571](nodejs/node#64571)
- \[[`e26891ec6a`](nodejs/node@e26891ec6a)] - **http**: fix writableFinished and 'finish' after write errors (Tim Perry) [#&#8203;64847](nodejs/node#64847)
- \[[`dfc192fdfb`](nodejs/node@dfc192fdfb)] - **http**: avoid aborting IncomingMessage signal on normal close (Archkon) [#&#8203;64392](nodejs/node#64392)
- \[[`6794441c85`](nodejs/node@6794441c85)] - **http**: guard invalid timeout values in checkConnections (Efe Karasakal) [#&#8203;64506](nodejs/node#64506)
- \[[`6879aa4aa8`](nodejs/node@6879aa4aa8)] - **http**: propagate highWaterMark to ClientRequest OutgoingMessage (trivenay) [#&#8203;64653](nodejs/node#64653)
- \[[`72448a82f4`](nodejs/node@72448a82f4)] - **http2**: avoid copying the options in respond() (Matteo Collina) [#&#8203;64265](nodejs/node#64265)
- \[[`f6692da576`](nodejs/node@f6692da576)] - **http2**: avoid per-write closures in kWriteGeneric (Matteo Collina) [#&#8203;64265](nodejs/node#64265)
- \[[`3ed37153f8`](nodejs/node@3ed37153f8)] - **http2**: reduce per-request allocations (Matteo Collina) [#&#8203;64265](nodejs/node#64265)
- \[[`bce92debba`](nodejs/node@bce92debba)] - ***Revert*** "**http2**: avoid per-write closures in kWriteGeneric" (Antoine du Hamel) [#&#8203;64663](nodejs/node#64663)
- \[[`b5d5dd74a1`](nodejs/node@b5d5dd74a1)] - ***Revert*** "**http2**: avoid copying the options in respond()" (Antoine du Hamel) [#&#8203;64663](nodejs/node#64663)
- \[[`19b9c14d60`](nodejs/node@19b9c14d60)] - **lib**: fix AbortSignal.any() observed-composite leak (Paul Bouchon) [#&#8203;64481](nodejs/node#64481)
- \[[`d3cada57c2`](nodejs/node@d3cada57c2)] - **lib**: fix typo in comment in \_http\_client.js (agape1225) [#&#8203;64729](nodejs/node#64729)
- \[[`c1e4f7365e`](nodejs/node@c1e4f7365e)] - **(SEMVER-MINOR)** **lib**: add perfetto support (Chengzhong Wu) [#&#8203;64565](nodejs/node#64565)
- \[[`6c2157522d`](nodejs/node@6c2157522d)] - **loader**: enforce path normalization before lookup (Maël Nison) [#&#8203;63917](nodejs/node#63917)
- \[[`31522c41a7`](nodejs/node@31522c41a7)] - **meta**: bump actions/stale from 10.3.0 to 11.0.0 (dependabot\[bot]) [#&#8203;64935](nodejs/node#64935)
- \[[`88c8b8ef54`](nodejs/node@88c8b8ef54)] - **meta**: bump github/codeql-action/analyze from 4.36.2 to 4.37.3 (dependabot\[bot]) [#&#8203;64934](nodejs/node#64934)
- \[[`9dcd759a84`](nodejs/node@9dcd759a84)] - **meta**: bump github/codeql-action/autobuild from 4.36.2 to 4.37.3 (dependabot\[bot]) [#&#8203;64933](nodejs/node#64933)
- \[[`82ca02db3c`](nodejs/node@82ca02db3c)] - **meta**: bump actions/setup-python from 6.3.0 to 7.0.0 (dependabot\[bot]) [#&#8203;64932](nodejs/node#64932)
- \[[`848e2287f2`](nodejs/node@848e2287f2)] - **meta**: bump github/codeql-action/init from 4.36.2 to 4.37.3 (dependabot\[bot]) [#&#8203;64931](nodejs/node#64931)
- \[[`ae8ad3b17b`](nodejs/node@ae8ad3b17b)] - **meta**: bump Mozilla-Actions/sccache-action from 0.0.10 to 0.0.11 (dependabot\[bot]) [#&#8203;64930](nodejs/node#64930)
- \[[`0b359cfa4c`](nodejs/node@0b359cfa4c)] - **meta**: bump cachix/install-nix-action from 31.10.6 to 31.11.0 (dependabot\[bot]) [#&#8203;64929](nodejs/node#64929)
- \[[`3b4f980f4c`](nodejs/node@3b4f980f4c)] - **meta**: bump github/codeql-action/upload-sarif from 4.36.2 to 4.37.3 (dependabot\[bot]) [#&#8203;64927](nodejs/node#64927)
- \[[`d7ee9e9ea7`](nodejs/node@d7ee9e9ea7)] - **meta**: bump step-security/harden-runner from 2.19.4 to 2.20.0 (dependabot\[bot]) [#&#8203;64926](nodejs/node#64926)
- \[[`7e80bbaaa9`](nodejs/node@7e80bbaaa9)] - **meta**: bump ossf/scorecard-action from 2.4.3 to 2.4.4 (dependabot\[bot]) [#&#8203;64925](nodejs/node#64925)
- \[[`915cabbfcf`](nodejs/node@915cabbfcf)] - **meta**: remove node\_crates .gitignore (René) [#&#8203;64779](nodejs/node#64779)
- \[[`8e03c54347`](nodejs/node@8e03c54347)] - **meta**: add [@&#8203;nodejs/url](https://github.com/nodejs/url) as codeowner for node\_url\_pattern.\* (Efe Karasakal) [#&#8203;64737](nodejs/node#64737)
- \[[`11c2f9c642`](nodejs/node@11c2f9c642)] - **(SEMVER-MINOR)** **module**: implement Symbol.dispose in ModuleHooks (Remco Haszing) [#&#8203;63928](nodejs/node#63928)
- \[[`fffd8a76d0`](nodejs/node@fffd8a76d0)] - **net**: support TCP handle transfer on Windows (Matteo Collina) [#&#8203;64460](nodejs/node#64460)
- \[[`fe9e0dbdc2`](nodejs/node@fe9e0dbdc2)] - **net**: support AF\_UNIX paths in net.BoundSocket (Guy Bedford) [#&#8203;64399](nodejs/node#64399)
- \[[`eb61b7ee1e`](nodejs/node@eb61b7ee1e)] - **permission**: add unique warning codes (David Evans) [#&#8203;64414](nodejs/node#64414)
- \[[`999a928822`](nodejs/node@999a928822)] - **permission**: support v8.setHeapSnapshotNearHeapLimit (Ilyas Shabi) [#&#8203;64808](nodejs/node#64808)
- \[[`7de3d095b6`](nodejs/node@7de3d095b6)] - **quic**: fix stop sending behaviour & callback (Tim Perry) [#&#8203;64710](nodejs/node#64710)
- \[[`6289398bb2`](nodejs/node@6289398bb2)] - **quic**: fix coverage comment typo (Jungwon Sohn) [#&#8203;64486](nodejs/node#64486)
- \[[`01510dc759`](nodejs/node@01510dc759)] - **quic**: fix segfault after fragmented client hello (Tim Perry) [#&#8203;64720](nodejs/node#64720)
- \[[`dcc348af97`](nodejs/node@dcc348af97)] - **quic**: serialize stream reset code as string (한만욱) [#&#8203;64577](nodejs/node#64577)
- \[[`c25b8e3331`](nodejs/node@c25b8e3331)] - **readline**: reduce createInterface overhead (Matteo Collina) [#&#8203;64585](nodejs/node#64585)
- \[[`14e802d1cd`](nodejs/node@14e802d1cd)] - **sqlite**: invalidate sessions when closing database (Trivikram Kamat) [#&#8203;64783](nodejs/node#64783)
- \[[`279547b7da`](nodejs/node@279547b7da)] - **sqlite**: check database state before calling SQLite (Trivikram Kamat) [#&#8203;64812](nodejs/node#64812)
- \[[`bb86521a42`](nodejs/node@bb86521a42)] - **sqlite**: fix crash when a session outlives its database (Mohamed Sayed) [#&#8203;63797](nodejs/node#63797)
- \[[`870f4997e7`](nodejs/node@870f4997e7)] - **sqlite**: fix use-after-free in Exec() and ApplyChangeset() (Matteo Collina) [#&#8203;64535](nodejs/node#64535)
- \[[`a8ec5a9df7`](nodejs/node@a8ec5a9df7)] - **src**: fix perfetto build on GetTraceFilePath (Chengzhong Wu) [#&#8203;64721](nodejs/node#64721)
- \[[`6cd643acaa`](nodejs/node@6cd643acaa)] - **src**: implement MemoryRetainer protocol for ByteSource (Filip Skokan) [#&#8203;64660](nodejs/node#64660)
- \[[`8725e56928`](nodejs/node@8725e56928)] - **src**: fix crash when writing odd-length hex string via Writev (RajeshKumar11) [#&#8203;63658](nodejs/node#63658)
- \[[`e018f9a4a1`](nodejs/node@e018f9a4a1)] - **(SEMVER-MINOR)** **src**: add perfetto trace agent (Chengzhong Wu) [#&#8203;64565](nodejs/node#64565)
- \[[`0611d443ab`](nodejs/node@0611d443ab)] - **(SEMVER-MINOR)** **src**: rename legacy trace event headers (Chengzhong Wu) [#&#8203;64565](nodejs/node#64565)
- \[[`2897cc1d93`](nodejs/node@2897cc1d93)] - **(SEMVER-MINOR)** **src**: fix trace macro compatibility (Chengzhong Wu) [#&#8203;64565](nodejs/node#64565)
- \[[`d4d7172e10`](nodejs/node@d4d7172e10)] - **src**: avoid using ToLocalChecked in crypto\_hash (James M Snell) [#&#8203;64668](nodejs/node#64668)
- \[[`53b7d48b47`](nodejs/node@53b7d48b47)] - **src**: fix libuv assertion on windows (liuxingbaoyu) [#&#8203;61999](nodejs/node#61999)
- \[[`69d10ed021`](nodejs/node@69d10ed021)] - **src,test**: disable trace events tests when perfetto is enabled (Chengzhong Wu) [#&#8203;64721](nodejs/node#64721)
- \[[`1b0597b4ef`](nodejs/node@1b0597b4ef)] - **stream**: cut per-chunk allocations in pipeTo (Matteo Collina) [#&#8203;64890](nodejs/node#64890)
- \[[`2632d606bb`](nodejs/node@2632d606bb)] - **stream**: preserve push signal abort reason (Trivikram Kamat) [#&#8203;64798](nodejs/node#64798)
- \[[`d5358a75bc`](nodejs/node@d5358a75bc)] - **stream**: skip zero-byte broadcast writes (Trivikram Kamat) [#&#8203;64772](nodejs/node#64772)
- \[[`796c896fb4`](nodejs/node@796c896fb4)] - **stream**: honor AbortSignal in Writer.end() (Trivikram Kamat) [#&#8203;64727](nodejs/node#64727)
- \[[`ff12b8e22e`](nodejs/node@ff12b8e22e)] - **stream**: use validateString for consumer encoding (Jungwon Sohn) [#&#8203;64754](nodejs/node#64754)
- \[[`cfad2efb06`](nodejs/node@cfad2efb06)] - **stream**: use the ring buffer for pending BYOB pull-into descriptors (Matteo Collina) [#&#8203;64818](nodejs/node#64818)
- \[[`fe06bf56dc`](nodejs/node@fe06bf56dc)] - **stream**: fix uncatchable error closing half-open Duplex.toWeb() writable (Mohamed Sayed) [#&#8203;64161](nodejs/node#64161)
- \[[`f2919dbb83`](nodejs/node@f2919dbb83)] - **test**: unflake debugger and REPL tests (Matteo Collina) [#&#8203;64718](nodejs/node#64718)
- \[[`a1c29174e8`](nodejs/node@a1c29174e8)] - **test**: ensure assertions are reached on all tests (Antoine du Hamel) [#&#8203;64716](nodejs/node#64716)
- \[[`b9e596f8e5`](nodejs/node@b9e596f8e5)] - **test**: reuse ffi.suffix instead of reimplementing it (Seongeun Lee) [#&#8203;64840](nodejs/node#64840)
- \[[`c816918e14`](nodejs/node@c816918e14)] - **test**: remove test-repl-user-error-handler from flaky (avivkeller) [#&#8203;64631](nodejs/node#64631)
- \[[`9d2f10ec54`](nodejs/node@9d2f10ec54)] - **test**: update WPT for url to [`4832db4`](nodejs/node@4832db4761) (Node.js GitHub Bot) [#&#8203;64829](nodejs/node#64829)
- \[[`75b80d0b7b`](nodejs/node@75b80d0b7b)] - **test**: update WPT for url to [`b63305b`](nodejs/node@b63305b743) (Node.js GitHub Bot) [#&#8203;64790](nodejs/node#64790)
- \[[`9a139b3c86`](nodejs/node@9a139b3c86)] - **test**: cover worker throwing primitive values (varshitha) [#&#8203;64365](nodejs/node#64365)
- \[[`796acc8920`](nodejs/node@796acc8920)] - **test**: mark test-repl-user-error-handler as flaky (Aviv Keller) [#&#8203;64612](nodejs/node#64612)
- \[[`a646319f61`](nodejs/node@a646319f61)] - **(SEMVER-MINOR)** **test\_runner**: add support for --test-coverage-include-all (avivkeller) [#&#8203;64830](nodejs/node#64830)
- \[[`4368303e01`](nodejs/node@4368303e01)] - **test\_runner**: wait for filtered suite build (semimikoh) [#&#8203;64208](nodejs/node#64208)
- \[[`70d11241a3`](nodejs/node@70d11241a3)] - **test\_runner**: convert to uint during deserialization (Aviv Keller) [#&#8203;64706](nodejs/node#64706)
- \[[`cafe7bffcc`](nodejs/node@cafe7bffcc)] - **tls**: fix SNICallback certificate selection (Matteo Collina) [#&#8203;64700](nodejs/node#64700)
- \[[`9ee05ec40f`](nodejs/node@9ee05ec40f)] - **tools**: bump the eslint group in /tools/eslint with 4 updates (dependabot\[bot]) [#&#8203;64928](nodejs/node#64928)
- \[[`5f4b859932`](nodejs/node@5f4b859932)] - **tools**: bump brace-expansion from 5.0.7 to 5.0.9 in /tools/eslint (dependabot\[bot]) [#&#8203;64904](nodejs/node#64904)
- \[[`b5ced907b3`](nodejs/node@b5ced907b3)] - **tools**: use 'readonly' for EventSource global (Honey Tyagi) [#&#8203;64787](nodejs/node#64787)
- \[[`fd4460e34e`](nodejs/node@fd4460e34e)] - **typings**: add heap\_utils internalBinding types (Donghoon Kang) [#&#8203;64816](nodejs/node#64816)
- \[[`3bc0ee0492`](nodejs/node@3bc0ee0492)] - **typings**: remove isDataView from types binding (Archkon) [#&#8203;64738](nodejs/node#64738)
- \[[`236d7ca965`](nodejs/node@236d7ca965)] - **url**: create URLPattern result properties in WebIDL order (Archkon) [#&#8203;64733](nodejs/node#64733)
- \[[`3def577ab4`](nodejs/node@3def577ab4)] - **v8**: report minor mark-sweep in GCProfiler (Archkon) [#&#8203;64688](nodejs/node#64688)
- \[[`5293abff73`](nodejs/node@5293abff73)] - **vfs**: speed up recursive readdir test setup (Trivikram Kamat) [#&#8203;64813](nodejs/node#64813)
- \[[`4345185496`](nodejs/node@4345185496)] - **vfs**: make lchown update symlink metadata (Trivikram Kamat) [#&#8203;64573](nodejs/node#64573)
- \[[`b6ab546de5`](nodejs/node@b6ab546de5)] - **wasm**: register missing SetURL function (Archkon) [#&#8203;64679](nodejs/node#64679)
- \[[`f322870bd1`](nodejs/node@f322870bd1)] - **zlib**: validate pledgedSrcSize as a safe integer (Archkon) [#&#8203;64604](nodejs/node#64604)
- \[[`44042c20d4`](nodejs/node@44042c20d4)] - **zlib**: accept ArrayBuffer dictionary in Zstd (Ryuhei Shima) [#&#8203;64599](nodejs/node#64599)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODguMCIsInVwZGF0ZWRJblZlciI6IjQzLjI4OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6bWlub3IiXX0=-->
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 20, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 24, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 24, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 24, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 25, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 25, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 25, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
deepak1556 pushed a commit to electron/electron that referenced this pull request Aug 26, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 26, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
deepak1556 added a commit to electron/electron that referenced this pull request Aug 27, 2026
* chore: bump node in DEPS to v24.19.0

* chore: remove upstreamed patch

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* chore: update patches (trivial only)

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64565: src: rename legacy trace event headers

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): sample delay per event loop iteration

Ref: nodejs/node#62935

Ref: nodejs/node#64480

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): avoid redundant std::get_if<>() call

Ref: nodejs/node#64094

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): support native IPC serialization in V8 sandbox

Ref: nodejs/node#63933

Co-Authored-By: GitHub Copilot <copilot@github.com>

* test: hide output package.json in node spec runner

Virtual CommonJS files rooted at process.execPath inherit the output directory's type=module package unless the runner hides it alongside Chromium's root package.

Ref: nodejs/node#44713

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): account for libc++ rm error on Electron Linux

Node's fs.rmSync() delegates recursive deletion to
std::filesystem::remove_all(). Electron's Linux build uses libc++, which
reports ENOTEMPTY here while Node's libstdc++ build reports EACCES.

Ref: nodejs/node#57103

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): mark worker stack-size test flaky

Ref: nodejs/node#33085

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): restore user timing trace events

Ref: #50591

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): own fallback tracing controller

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): release cppgc wrapper tracking nodes

Ref: nodejs/node#56534

Co-Authored-By: GitHub Copilot <copilot@github.com>

* test: extend cpp heap remote app timeout

The ChunkedDataPipeReadableStream liveness test can exceed the remote fixture's 30-second watchdog under Linux ASAN, which disconnects the control socket before assertions run.

Ref: #52447

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): remove unused legacy tracing backend

Electron builds Node exclusively with Perfetto since #50591. Wire the upstream Perfetto agent directly and drop the legacy header split and dual-backend source lists.

Ref: #50591

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* docs: better explanation of test_account_for_libc_rm_error_on_electron_linux.patch

* refactor: node tracing agent and track event registration (#52678)

* fix: register Node tracing in utility processes

The Node upgrade moved tracing setup out of JavascriptEnvironment, but the utility process did not adopt the explicit registration used by other embedded Node hosts. Register its TrackEvent data source with Chromium before creating the isolate.

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches (trivial only)

* chore: update patches

* Revert "fix(patch): mark worker stack-size test flaky"

This reverts commit f2e5cb5.

* fixup! support native IPC serialization in V8 sandbox

* chore: address review feedback

* fixup! support native IPC serialization in V8 sandbox

Allocate ValueSerializer buffers as V8 backing stores and retain the
original backing store when adopting the released buffer. This preserves
the shared allocator lifetime when serialized buffers are transferred
from a worker and outlive its isolate.

* fixup! refactor: node tracing agent and track event registration

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 27, 2026
Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>
MarshallOfSound pushed a commit to electron/electron that referenced this pull request Aug 28, 2026
* chore: bump node in DEPS to v24.19.0

* chore: remove upstreamed patch

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* chore: update patches (trivial only)

* fix(patch): add perfetto trace agent

Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64565: src: rename legacy trace event headers

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): sample delay per event loop iteration

Ref: nodejs/node#62935

Ref: nodejs/node#64480

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): avoid redundant std::get_if<>() call

Ref: nodejs/node#64094

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): support native IPC serialization in V8 sandbox

Ref: nodejs/node#63933

Co-Authored-By: GitHub Copilot <copilot@github.com>

* test: hide output package.json in node spec runner

Virtual CommonJS files rooted at process.execPath inherit the output directory's type=module package unless the runner hides it alongside Chromium's root package.

Ref: nodejs/node#44713

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): account for libc++ rm error on Electron Linux

Node's fs.rmSync() delegates recursive deletion to
std::filesystem::remove_all(). Electron's Linux build uses libc++, which
reports ENOTEMPTY here while Node's libstdc++ build reports EACCES.

Ref: nodejs/node#57103

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): mark worker stack-size test flaky

Ref: nodejs/node#33085

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): restore user timing trace events

Ref: #50591

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): own fallback tracing controller

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): release cppgc wrapper tracking nodes

Ref: nodejs/node#56534

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): remove unused legacy tracing backend

Electron builds Node exclusively with Perfetto since #50591. Wire the upstream Perfetto agent directly and drop the legacy header split and dual-backend source lists.

Ref: #50591

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* docs: better explanation of test_account_for_libc_rm_error_on_electron_linux.patch

* refactor: node tracing agent and track event registration (#52678)

* fix: register Node tracing in utility processes

The Node upgrade moved tracing setup out of JavascriptEnvironment, but the utility process did not adopt the explicit registration used by other embedded Node hosts. Register its TrackEvent data source with Chromium before creating the isolate.

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches (trivial only)

* chore: update patches (trivial only)

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): skip unsupported WebCrypto fixtures with BoringSSL

Ref: nodejs/node#63520

Co-Authored-By: GitHub Copilot <copilot@github.com>

* Revert "fix(patch): mark worker stack-size test flaky"

This reverts commit f2e5cb5.

* chore: address review feedback

(cherry picked from commit b8f475c)

* fixup! refactor: node tracing agent and track event registration

(cherry picked from commit d898f33)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
MarshallOfSound pushed a commit to electron/electron that referenced this pull request Aug 28, 2026
* chore: bump node in DEPS to v24.19.0

* chore: remove upstreamed patch

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* chore: update patches (trivial only)

* fix(patch): add perfetto trace agent

Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64565: src: rename legacy trace event headers

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): sample delay per event loop iteration

Ref: nodejs/node#62935

Ref: nodejs/node#64480

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): avoid redundant std::get_if<>() call

Ref: nodejs/node#64094

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): support native IPC serialization in V8 sandbox

Ref: nodejs/node#63933

Co-Authored-By: GitHub Copilot <copilot@github.com>

* test: hide output package.json in node spec runner

Virtual CommonJS files rooted at process.execPath inherit the output directory's type=module package unless the runner hides it alongside Chromium's root package.

Ref: nodejs/node#44713

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): account for libc++ rm error on Electron Linux

Node's fs.rmSync() delegates recursive deletion to
std::filesystem::remove_all(). Electron's Linux build uses libc++, which
reports ENOTEMPTY here while Node's libstdc++ build reports EACCES.

Ref: nodejs/node#57103

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): mark worker stack-size test flaky

Ref: nodejs/node#33085

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): restore user timing trace events

Ref: #50591

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): own fallback tracing controller

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): release cppgc wrapper tracking nodes

Ref: nodejs/node#56534

Co-Authored-By: GitHub Copilot <copilot@github.com>

* test: extend cpp heap remote app timeout

The ChunkedDataPipeReadableStream liveness test can exceed the remote fixture's 30-second watchdog under Linux ASAN, which disconnects the control socket before assertions run.

Ref: #52447

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): remove unused legacy tracing backend

Electron builds Node exclusively with Perfetto since #50591. Wire the upstream Perfetto agent directly and drop the legacy header split and dual-backend source lists.

Ref: #50591

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* docs: better explanation of test_account_for_libc_rm_error_on_electron_linux.patch

* refactor: node tracing agent and track event registration (#52678)

* fix: register Node tracing in utility processes

The Node upgrade moved tracing setup out of JavascriptEnvironment, but the utility process did not adopt the explicit registration used by other embedded Node hosts. Register its TrackEvent data source with Chromium before creating the isolate.

Co-Authored-By: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches (trivial only)

* chore: update patches (trivial only)

Co-Authored-By: GitHub Copilot <copilot@github.com>

* Revert "fix(patch): mark worker stack-size test flaky"

This reverts commit f2e5cb5.

* fixup! support native IPC serialization in V8 sandbox

* chore: address review feedback

(cherry picked from commit b8f475c)

* fixup! support native IPC serialization in V8 sandbox

Allocate ValueSerializer buffers as V8 backing stores and retain the
original backing store when adopting the released buffer. This preserves
the shared allocator lifetime when serialized buffers are transferred
from a worker and outlive its isolate.

(cherry picked from commit f35b26d)

* fixup! refactor: node tracing agent and track event registration

(cherry picked from commit d898f33)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
jkleinsc added a commit to electron/electron that referenced this pull request Aug 28, 2026
* chore: bump node in DEPS to v24.19.0

* chore: remove upstreamed patch

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* chore: update patches (trivial only)

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Backport Node's Perfetto tracing agent now that Chromium V8 no longer exposes the legacy tracing controller APIs.

Ref: nodejs/node#64565

Ref: nodejs/node#64721

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64565: src: rename legacy trace event headers

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): sample delay per event loop iteration

Ref: nodejs/node#62935

Ref: nodejs/node#64480

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): avoid redundant std::get_if<>() call

Ref: nodejs/node#64094

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): add perfetto trace agent

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* node#64053: src: abstract tracing agent for legacy and perfetto

Ref: nodejs/node#64053

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): support native IPC serialization in V8 sandbox

Ref: nodejs/node#63933

Co-Authored-By: GitHub Copilot <copilot@github.com>

* test: hide output package.json in node spec runner

Virtual CommonJS files rooted at process.execPath inherit the output directory's type=module package unless the runner hides it alongside Chromium's root package.

Ref: nodejs/node#44713

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): account for libc++ rm error on Electron Linux

Node's fs.rmSync() delegates recursive deletion to
std::filesystem::remove_all(). Electron's Linux build uses libc++, which
reports ENOTEMPTY here while Node's libstdc++ build reports EACCES.

Ref: nodejs/node#57103

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): mark worker stack-size test flaky

Ref: nodejs/node#33085

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): restore user timing trace events

Ref: #50591

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): own fallback tracing controller

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): release cppgc wrapper tracking nodes

Ref: nodejs/node#56534

Co-Authored-By: GitHub Copilot <copilot@github.com>

* test: extend cpp heap remote app timeout

The ChunkedDataPipeReadableStream liveness test can exceed the remote fixture's 30-second watchdog under Linux ASAN, which disconnects the control socket before assertions run.

Ref: #52447

Co-Authored-By: GitHub Copilot <copilot@github.com>

* fix(patch): remove unused legacy tracing backend

Electron builds Node exclusively with Perfetto since #50591. Wire the upstream Perfetto agent directly and drop the legacy header split and dual-backend source lists.

Ref: #50591

Ref: nodejs/node#64565

Co-Authored-By: GitHub Copilot <copilot@github.com>

* docs: better explanation of test_account_for_libc_rm_error_on_electron_linux.patch

* refactor: node tracing agent and track event registration (#52678)

* fix: register Node tracing in utility processes

The Node upgrade moved tracing setup out of JavascriptEnvironment, but the utility process did not adopt the explicit registration used by other embedded Node hosts. Register its TrackEvent data source with Chromium before creating the isolate.

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches (trivial only)

* chore: update patches (trivial only)

Co-Authored-By: GitHub Copilot <copilot@github.com>

* Revert "fix(patch): mark worker stack-size test flaky"

This reverts commit f2e5cb5.

* fixup! support native IPC serialization in V8 sandbox

* chore: update patch

* chore: address review feedback

(cherry picked from commit b8f475c)

* fixup! support native IPC serialization in V8 sandbox

Allocate ValueSerializer buffers as V8 backing stores and retain the
original backing store when adopting the released buffer. This preserves
the shared allocator lifetime when serialized buffers are transferred
from a worker and outlive its isolate.

(cherry picked from commit f35b26d)

* fixup! refactor: node tracing agent and track event registration

(cherry picked from commit d898f33)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: GitHub Copilot <copilot@github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
MarshallOfSound pushed a commit to electron/electron that referenced this pull request Sep 16, 2026
* chore: squash the perfetto backports into one Node.js patch

The perfetto trace agent came in as six separate cherry-picks of
nodejs/node#64565 and nodejs/node#64721. Both are marked dont-land-on-v24.x
upstream, so they stay for as long as Electron ships Node.js 24; carry them
as one patch. Likewise fold the CleanupHookThunkRun regression test into
the patch for its fix, matching nodejs/node#65630.

No change to the patched tree.

* chore: keep the test commit's trailers on the folded cleanup-hook patch
jkleinsc pushed a commit to electron/electron that referenced this pull request Oct 29, 2026
* support_v8_sandboxed_pointers.patch
  Ref: nodejs/node#62237
* refactor_attach_cppgc_heap_on_v8_isolate_creation.patch
  Ref: nodejs/node#58070
* test_accomodate_v8_thenable_stack_trace_change_in_snapshot.patch
  Ref: nodejs/node#59805
* api_remove_deprecated_getisolate.patch
  Ref: nodejs/node#59805
  Ref: nodejs/node#60223
* api_delete_deprecated_fields_on_v8_isolate.patch
  Ref: nodejs/node#60488
* api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch
  Ref: nodejs/node#60602
* src_refactor_module_wrap_cc_to_update_fixedarray_get_params.patch
  Ref: nodejs/node#61898
* src_refactor_wasmstreaming_finish_to_accept_a_callback.patch
  Ref: nodejs/node#61898
* src_stop_using_v8_propertycallbackinfo_t_this.patch
  Ref: nodejs/node#61898
* fix_add_externalpointertypetag_to_v8_external_api_calls.patch
  Ref: nodejs/node#61898
* src_stop_using_removed_v8_promise_reject_events.patch
  Ref: nodejs/node#62336
* src_backport_the_perfetto_trace_agent.patch
  Ref: nodejs/node#64565
  Ref: nodejs/node#64721
* test_account_for_libc_rm_error_on_electron_linux.patch
  Ref: nodejs/node#66065
* fix_do_not_pass_removed_jspi_v8_flag.patch
  Ref: nodejs/node#60014
* test_drop_removed_wasm_rab_integration_flag.patch
  The v26 version of nodejs/node#65845 never
  added the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU
MarshallOfSound pushed a commit to electron/electron that referenced this pull request Oct 30, 2026
* chore: bump node in DEPS to v26.12.1

* chore: bump node in DEPS to v26.13.0

* fix(patch): build: add simdutf dir to include path in GN build

Keep upstream's simdutf include dir in the node_js2c include_dirs and
add "tools" next to it. The patch's FixedArray::Get(context, i) change
in node_builtins.cc is no longer needed: upstream made the same change
in nodejs/node#61898.

Ref: nodejs/node#65382

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): vfs: integrate with CJS and ESM module loaders

Upstream moved the native legacyMainResolve call from esm/resolve.js
into the loaderMethods table in internal/modules/helpers.js, so pass the
asar-aware fileExists callback from there instead.

Ref: nodejs/node#63653

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): src: let embedders supply a builtin code cache without a snapshot

BuiltinLoader::RefreshCodeCache() now merges with insert_or_assign
upstream, so drop that hunk from the patch.

Ref: nodejs/node#65352

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): src: move import.meta initializer to native land

PathHelpersLazyGetter moved from node_modules.cc to module_wrap.cc and
gained a sibling ImportMetaResolveLazyGetter; switch both to Holder().
Also follow the DatabaseSyncLimits -> DatabaseLimits rename in
node_sqlite.cc (nodejs/node#65988) and the
Null(isolate) cleanup in node_constants.cc
(nodejs/node#59805).

Ref: nodejs/node#60603

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): src: fix usage of deprecated V8 API

Upstream switched to Get/SetContinuationPreservedEmbedderDataV2(), which
Chromium's V8 marks deprecated in favor of the unsuffixed names. Use the
unsuffixed getter and setter.

Ref: nodejs/node#60174

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): src: rename legacy trace event headers

The TRACING_CATEGORY_NODE* macros moved from node_internals.h to
tracing/trace_event.h, so define NODE_TRACE_CATEGORY_ENABLED there.
Agent::CreateDefault() picks the legacy agent again when V8_USE_PERFETTO
is unset (nodejs/node#64053), so only the
Perfetto branch is gated on NODE_USE_PERFETTO_SDK.

node.gyp now lists the Perfetto sources in
node_tracing_perfetto_sources. Add them, with V8's tracing target and
config, to the GN libnode target. The removed perfetto backport patch
used to carry that wiring.

Ref: nodejs/node#64565

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): src: let embedders exempt linked bindings from the addon permission

Upstream added EnvironmentFlags::kNoAddonPermissionForLinkedBindings
around the same check. Keep the electron_* exemption alongside it and
note in the patch description that the patch can be dropped once
Electron sets the new flag.

Ref: nodejs/node#66067

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* chore: remove upstreamed patches

* support_v8_sandboxed_pointers.patch
  Ref: nodejs/node#62237
* refactor_attach_cppgc_heap_on_v8_isolate_creation.patch
  Ref: nodejs/node#58070
* test_accomodate_v8_thenable_stack_trace_change_in_snapshot.patch
  Ref: nodejs/node#59805
* api_remove_deprecated_getisolate.patch
  Ref: nodejs/node#59805
  Ref: nodejs/node#60223
* api_delete_deprecated_fields_on_v8_isolate.patch
  Ref: nodejs/node#60488
* api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch
  Ref: nodejs/node#60602
* src_refactor_module_wrap_cc_to_update_fixedarray_get_params.patch
  Ref: nodejs/node#61898
* src_refactor_wasmstreaming_finish_to_accept_a_callback.patch
  Ref: nodejs/node#61898
* src_stop_using_v8_propertycallbackinfo_t_this.patch
  Ref: nodejs/node#61898
* fix_add_externalpointertypetag_to_v8_external_api_calls.patch
  Ref: nodejs/node#61898
* src_stop_using_removed_v8_promise_reject_events.patch
  Ref: nodejs/node#62336
* src_backport_the_perfetto_trace_agent.patch
  Ref: nodejs/node#64565
  Ref: nodejs/node#64721
* test_account_for_libc_rm_error_on_electron_linux.patch
  Ref: nodejs/node#66065
* fix_do_not_pass_removed_jspi_v8_flag.patch
  Ref: nodejs/node#60014
* test_drop_removed_wasm_rab_integration_flag.patch
  The v26 version of nodejs/node#65845 never
  added the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* chore: update patches (trivial only)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* chore: bump @types/node to v26

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* chore: update filenames.auto.gni

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* chore: remove deleted specs

Upstream deleted parallel/test-promise-swallowed-event and
parallel/test-warn-multipleResolves when the multipleResolves event
reached end-of-life.

Ref: nodejs/node#58707

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: clear crash dumps with fs.rmSync instead of recursive rmdir

Node.js v25 moved the fs.rmdir recursive option to end-of-life, so
fs.rmdirSync(dir, { recursive: true }) now throws and @types/node v26
no longer accepts the option.

Ref: nodejs/node#58616

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: listen on IncomingMessage unions through EventEmitter

With @types/node v26, http.IncomingMessage declares typed `on`
overloads that do not unify with Electron.IncomingMessage's, so
collectStreamBodyBuffer() no longer type-checks when calling `on` on
the union.

Ref: Unable to locate reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: pass an ArrayBuffer-backed view to subtle.digest in asar wrapper

@types/node v26 types webcrypto's BufferSource as views over an
ArrayBuffer only, so a Uint8Array<ArrayBufferLike> no longer
type-checks. Archive reads never use a SharedArrayBuffer, so narrow the
type at the call site.

Ref: Unable to locate reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* node#64565: src: rename legacy trace event headers

Node.js renamed src/tracing/trace_event_common.h to trace_event_legacy.h
and moved the legacy trace macros out of trace_event.h into
trace_event_legacy_inl.h, so feed both to electron_generate_node_defines
instead of the removed header. The generated push/undef set matches the
previous one apart from header guards, NODE_TRACE_CATEGORY_ENABLED and
INTERNAL_DECLARE_SET_TRACE_VALUE_INT, which Node.js no longer defines.

Ref: nodejs/node#64565

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): src: add perfetto trace agent

Upstream's trace_event_perfetto.h includes the amalgamated "perfetto.h"
SDK header, which Chromium's Perfetto does not provide, so libnode fails
to compile. Include the Perfetto public headers Chromium ships instead
(as the removed backport patch did), add the tracing/trace_config
includes agent_perfetto.h relied on, and skip Node's TrackEvent category
definitions when Chromium's built-in categories are already in scope.

Ref: nodejs/node#64565

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): src: handle indexed properties in `process.env`

Upstream added indexed interceptors for process.env. Migrate the new
EnvSetterIndexed and EnvDefinerIndexed callbacks to
PropertyCallbackInfo<Boolean> like their named counterparts, since
Chromium's V8 only accepts the Boolean-returning indexed setter and
definer callbacks.

Ref: nodejs/node#60826

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: read the whole heap snapshot stream

Since Node.js 26, readable.read() returns one buffered chunk at a time
instead of concatenating everything buffered, so takeHeapSnapshot()
parsed only the first 64 KiB of the snapshot. Read readableLength bytes,
as upstream test/common/heap.js now does.

Ref: nodejs/node#60441

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: use --trace-warnings in the node-options-parsing crash case

Node.js 26 throws ERR_MISSING_OPTION('--permission') when a boolean
permission flag such as --allow-addons is set without --permission
(previously only the fs flags were checked), so the utility process in
this fixture exited before reaching options.js. Repeat --trace-warnings
instead; the case still checks that disallowed NODE_OPTIONS are stripped
from a list with repeated options.

Ref: nodejs/node#62072

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): restore user timing trace events

The usertiming.js hunk that emits node.perf.usertiming trace events for
performance.mark() and performance.measure() lived in the perfetto
backport patch, which was removed as upstreamed. Upstream Node.js never
had it (Electron added it in #50591), so carry it in
fix_use_embedder_perfetto_client_when_available.patch.

Ref: #50591

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: trigger the V8 sandbox fatal error from V8 directly

Since Node.js 26, node::Buffer::New() copies memory allocated outside
the V8 sandbox into it instead of handing it to
v8::ArrayBuffer::NewBackingStore(), so the external-ab addon no longer
crashed the utility process and "emits 'error' when fatal error is
triggered from V8" timed out. Call NewBackingStore() from the addon so
the same v8_ArrayBuffer_NewBackingStore fatal error is still raised.

Ref: nodejs/node#62237

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: delete directories with rm instead of recursive rmdir

Node.js 26 removed the recursive option of fs.rmdir(), fs.rmdirSync()
and fsPromises.rmdir() (DEP0147), so they now throw
ERR_INVALID_ARG_VALUE. Use rmSync() and promises.rm(), and put an
archive in the directory so the tests delete what their titles say.

Ref: nodejs/node#58616

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* node#64894: worker: add support for Web Workers

Node.js 26 adds a Web Worker API and its pre-execution deletes
globalThis.Worker unless --experimental-web-worker is set, without
checking noBrowserGlobals, so renderers and web workers with Node
integration lost Blink's Worker. Pass the flag in those processes, as
is already done for --experimental-eventsource; Node's own Worker is not
installed under kNoBrowserGlobals.

Ref: nodejs/node#64894

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* node#61803: module: remove --experimental-transform-types

Node.js 26 removed the flag, so passing it now fails with "bad option"
(exit code 9). Stop forwarding it to Node.js, drop it from the
command-line switch docs, document the removal as a 46.0 breaking
change, and remove the spec and fixture that exercised it. The spec
that checks TypeScript-only syntax is not transformed stays.

Ref: nodejs/node#61803

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* node#65589: src: disable V8 external memory reasonable size check

Node.js now passes --external-memory-max-reasonable-size=0 to V8 in
every process that initializes it, which changes FlagList::Hash() and
so the code-cache key. Add the flag to the build-time js2c code cache
flavors that initialize Node.js and to electron_xcache's default flags,
so their caches keep being accepted (xcache.spec.ts failed on the flag
hash).

Ref: nodejs/node#65589

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: route Node.js 26's one-shot fs jobs through the asar wrapper

Node.js 26 writes files (fs.writeFile, fs.appendFile and their
fsPromises versions) with a native WriteFileJob, and copies directory
trees for fs.cp() / fsPromises.cp() with a native CpDirJob, instead of
going through binding.open() and the fs.promises walk the asar wrapper
already handles. Writes into archives therefore failed with ENOTDIR
instead of EACCES (and missed unpacked entries), and fs.cp() of an
archive directory failed with ENOTDIR.

Give binding.WriteFileJob the same archive checks as open(), wrap
fs.writeFile() for archive paths since lib/fs.js captured the native
job at startup, and copy archive trees for CpDirJob with the walk
cpSync() already uses, which now also stamps directories with
preserveTimestamps like the native walk.

Ref: nodejs/node#65489
Ref: nodejs/node#65488

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): do not leak NodePlatform's default TracingController

The NodePlatform hunk that owns the v8::TracingController it creates
when the embedder passes none lived in the perfetto backport patch,
which was removed as upstreamed, but upstream still allocates it with a
bare new. With the perfetto agent, ELECTRON_RUN_AS_NODE passes no
controller, so LeakSanitizer failed every run-as-node spec on ASan
builds. Carry the hunk in
fix_use_embedder_perfetto_client_when_available.patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: keep fsPromises.stat() and lstat() native outside archives

The asar wrapper replaced fsPromises.stat() and fsPromises.lstat() with
promisified callback versions for every path, so they ran as callback
requests (FSREQCALLBACK) instead of fsPromises' own. Node.js 26's
fsPromises.cp() checks its paths with them before handing the copy to a
native job, and parallel/test-fs-cp-async-destination-appears-late
tells the two apart. Use the wrapper only for paths inside archives.

Ref: nodejs/node#65488

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: match Node.js 26 recursive readdir in the asar wrapper

Node.js 26 accepts Buffer paths for recursive readdir, keeps parentPath
a Buffer for them and for the 'buffer' encoding, and walks the tree
breadth-first, following links to directories without stat()ing every
entry. The asar wrapper's own walks (which also descend into archives)
broke on Buffer paths and differed in order and parentPath, failing the
new parallel/test-fs-readdir-recursive-* tests. Replace the three walks
with one breadth-first walk shaped like Node's, which still lists and
descends into archives as directories, and lets errors from any
directory reach the caller.

Ref: nodejs/node#65487

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* node#66138: src: add --process-timeout=N

Node.js starts the --process-timeout watchdog in
NodeMainInstance::Run(), which ELECTRON_RUN_AS_NODE does not use, so
the option was accepted but never applied: parallel/test-process-timeout-*
failed, and the fixtures that block the main thread hung the Node.js
test job until it was cancelled. Start and stop the watchdog around the
event loop in NodeMain() the same way.

Ref: nodejs/node#66138

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: close the FileHandle in the stale asar descriptor spec

Node.js 26 made closing a FileHandle on garbage collection an error
(DEP0137 end-of-life). The 'handle' variant of "does not capture a
descriptor number that was closed behind its back" dropped its
FileHandle, so the renderer running the asar specs later died with an
uncaught ERR_INVALID_STATE and every remaining asar spec failed with
"Render frame was disposed". Close the handle like the other variants
close their descriptors.

Ref: nodejs/node#58536

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: allow ArrayBuffers above 2 GiB in Node.js-enabled isolates

Node.js 26 allocates Buffer.allocUnsafe(), Buffer.allocUnsafeSlow() and
the copies made by AdoptIntoBackingStore() through the isolate's
ArrayBuffer::Allocator (nodejs/node#61480, nodejs/node#62237). Electron's
sandboxed-pointers patch for Node.js 24 sent those through
ArrayBuffer::Allocator::NewDefaultAllocator() instead, which reaches
Electron's in-sandbox allocator, and that serves requests beyond
PartitionAlloc's single-allocation cap (2 GiB - 2 MiB) from sandbox
pages. The isolates of the browser process, the utility-process node
service and ELECTRON_RUN_AS_NODE use gin's ArrayBufferAllocator, which
has no such fallback, so with Node.js 26 a Buffer.allocUnsafe() of more
than 2 GiB - 2 MiB in those processes failed with
ERR_MEMORY_ALLOCATION_FAILED, where Electron 45 and 46 allowed up to
32 GiB - 1 (parallel/test-fs-write-buffer-large).

Give those isolates an allocator that delegates to gin's partition up to
the cap and serves larger requests from sandbox pages, sharing the page
bookkeeping with the in-sandbox allocator. Buffer.alloc() and
new ArrayBuffer() above the cap now work there as well. The page map is
only locked while a page allocation is live. Renderers are unaffected:
Blink's isolate allocator already allows giga allocations.

Ref: nodejs/node#61480

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: include node_watchdog.h only where --process-timeout is wired

node_watchdog.h chooses between its POSIX and Windows members with
Node's __POSIX__ define, which Node's own targets set but Electron's do
not, so including it from node_includes.h broke every electron_lib
source on Linux ("unknown type name 'BOOL'"). Include it in node_main.cc
alone, with __POSIX__ set around it on POSIX so the class matches Node's
own build.

Ref: nodejs/node#66138

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: let Node.js 26's virtual file system answer recursive readdir

Node.js 26 adds an experimental virtual file system that fs functions
consult (vfsState.handlers) before the real one. The asar wrapper walks
recursive readdir itself and never asked it, so with a VFS mounted
fs.readdir(..., { recursive: true }) and its sync and promise forms
listed the real path behind the mount (parallel/test-vfs-reserved-root,
parallel/test-vfs-zip-provider-readdir-recursive failed with ENOTDIR).
Ask the VFS first, as Node does.

Ref: nodejs/node#63537

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: do not log terminated Electron init scripts as errors

CompileAndCall() logged an error whenever running one of Electron's
bundled init scripts threw, including when execution was terminated
because the environment was being torn down. A Worker that is stopped,
or whose process exits, while it is still bootstrapping is not an
error. On Node.js 26 the unref()'d Worker spawned by
module-hooks/test-async-loader-hooks-with-worker-permission-allowed
reaches that point while node_init runs, and the log line broke the
test's empty-stderr check. Only log real exceptions.

Ref: Unable to locate reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix(patch): expect the Wasm Global setter WPT to pass with Chromium V8

Chromium's V8 passes "Calling setter without argument" in the Wasm
jsapi WPT global/value-get-set.any.js, which Node's own V8 still fails
and lists as an expected failure, so the run failed on an unexpected
pass.

Ref: Unable to locate reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: honor --no-node-snapshot under ELECTRON_RUN_AS_NODE

ELECTRON_RUN_AS_NODE accepted --no-node-snapshot but always created its
isolate from the embedded Node startup snapshot, and Node worker
threads inherit that snapshot from their parent. Since Node.js 26 a
worker deserializes the whole bootstrapped context from it, so
parallel/test-worker-nearheaplimit-deadlock, which passes
--no-node-snapshot so that its 0 MB-heap worker does not run out of
memory during that deserialization, crashed with SIGSEGV. Skip the
snapshot when Node's options turn it off, as node::Start() does; the
process then boots from the V8 context snapshot like a build without a
Node snapshot. The browser process and the node service parse Node's
options only after creating their isolate, so they are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* build: fetch Perfetto trace_processor_shell for the Node.js tests

nodejs/node#66068 (test: enable trace_events tests with perfetto) moved
the trace_events tests from test/parallel into a new test/trace_events
suite. When Node.js is built with Perfetto (process.config.variables
.v8_use_perfetto, which Electron's build sets), those tests write binary
.pftrace files and convert them back to JSON with Perfetto's
trace_processor_shell, through test/common/trace_events.js. Without the
tool, all 17 trace_events/* tests in nn-test fail with
"trace_processor_shell is missing".

The same PR added tools/perfetto/get_trace_processor, which upstream's
Makefile and CI use to fetch it. Run that script in the Node.js test job.
It downloads the Perfetto release matching the vendored
deps/perfetto/VERSION (v58.2) from Perfetto's GitHub releases to
tools/perfetto/trace_processor_shell, which is the default path the test
helper resolves, so TRACE_PROCESSOR_SHELL_PATH is not needed. Cache the
binary keyed on that VERSION file. Upstream pins only the version, not a
checksum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: disable Node.js source phase import and process-timeout report tests

Electron always passes --no-js-source-phase-imports. In renderers Blink
owns that V8 flag and freezes it before Node.js starts, and the other
process types match it, so the flag is consistent across processes and
the embedded code cache, which is keyed on V8's flag hash, stays valid.
nodejs/node#60364 made Node.js honour that opt-out instead of always
enabling the flag. The es-module/test-esm-wasm-*source-phase* tests are
already disabled for the same reason. Node.js 26 brings more tests that
need source phase imports:

- es-module/test-esm-wasm-jitless (nodejs/node#66533) calls
  import.source() and fails with "SyntaxError: Unexpected identifier
  'source'".
- The wasm/jsapi WPT suite, test/wpt/test-wasm-jsapi.mjs
  (nodejs/node#59034), is new to Electron with this upgrade. Its
  esm-integration/source-phase*.tentative cases use import.source() and
  fail with the same SyntaxError. Its module/moduleSource.tentative cases
  expect the %AbstractModuleSource% intrinsic, which V8 only installs
  when the flag is on. Each case runs as an .any.html and an .any.worker.html
  variant, so that is 8 entries.

nodejs/node#66138 added --process-timeout and
report/test-report-process-timeout. nodejs/node#66428 split out
report/test-report-process-timeout-worker. Both validate the generated
report with test/common/report.js, which expects
header.componentVersions to equal process.versions. In Electron,
process.versions also has chrome and electron, so the comparison fails.
The other report tests that use this helper are already disabled for
the same reason. The process timeout itself works, and both tests get
as far as the report check.

The WPT cases are listed as wpt/<test file>/<case id>, which is how
tools/test.py names them and matches --skip-tests. Teach
--validateDisabled to check the test file for these entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: resolve V8's NewBackingStore by Electron's export name on Windows

The external-ab addon now calls v8::ArrayBuffer::NewBackingStore()
itself, but on Windows it is built with MSVC's standard library while
Electron is built with Chromium's libc++, and MSVC mangles return types
into symbol names. electron.exe exports the function as returning
std::__Cr::unique_ptr, so the addon's import of the std::unique_ptr
variant never resolved, the utility process died without a V8 fatal
error and "emits 'error' when fatal error is triggered from V8" timed
out on windows-x64. Look the function up by Electron's exported name
there instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: only reference std-free V8 exports from the external-ab addon

On macOS and Linux the addon is built against a different libc++ ABI
namespace than Electron's std::__Cr, so v8::ArrayBuffer::New(isolate,
std::shared_ptr<BackingStore>) is an import that cannot bind. It only
went unnoticed because NewBackingStore() raises the fatal error first.
Stop after NewBackingStore(), whose mangled name has no standard
library types, and throw if it ever returns, as on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* Revert "build: fetch Perfetto trace_processor_shell for the Node.js tests"

This reverts commit 8920a7c.

Node.js uses trace_processor_shell only to read back the trace file that
a process started with --trace-event-categories writes. Electron never
writes that file: Chromium owns tracing, and Electron does not start
Node.js's file-based tracing agent. Every trace_events/* test fails
before it reaches trace_processor_shell, because no trace file exists
or, in test-trace-events-api, because getEnabledCategories() is
undefined in the child. Those tests are disabled again in the next
commit, so no Node.js test needs trace_processor_shell, and downloading
it would only add a network fetch to the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: disable the Node.js trace_events tests in their new directory

nodejs/node#66068 (test: enable trace_events tests with perfetto) moved
17 test-trace-events-* tests out of test/parallel into a new
test/trace_events suite. That took them out from under Electron's
"parallel/test-trace-events" entry, which --skip-tests matches as a
substring. Electron has never run these tests. They were disabled one by
one when Electron started running the Node.js tests (1d06f67) and
folded into the parallel/ prefix in #49467.

They start Node.js with --trace-event-categories and read back the trace
file it writes. Electron does not start Node.js's file-based tracing
agent, because Chromium owns tracing, so no trace file is ever written.
In nn-test, all 17 fail on a missing trace file, and
test-trace-events-api also finds getEnabledCategories() undefined in its
child.

Add the matching "trace_events/test-trace-events" prefix. It covers all
17 files in test/trace_events. Keep the parallel/ entry, which still
matches the 13 test-trace-events-* tests that stayed in test/parallel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: copy directory trees out of archives without blocking fs.cp()

nodejs/node#65488 (fs: copy directory trees for fs.cp() on the thread
pool) made fs.cp() and fsPromises.cp() copy a new destination directory
with a native CpDirJob. The job walks the tree on the thread pool and
calls ondone once. Electron's override for archive sources ran the
synchronous fs.cpSync() walk in a single process.nextTick, so an
asynchronous cp of a directory out of an archive blocked the event loop
until the whole tree had been copied.

Give the job an asynchronous version of the walk. It goes through the
fs.promises overrides, so packed files use the existing asynchronous
copyFile path, and it keeps the same ordering, force/errorOnExist,
symlink and preserveTimestamps handling and errors as the sync walk.
The job still reports through ondone exactly once. fs.cpSync() keeps
the synchronous walk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: trigger the utility process V8 fatal error from the testing binding

The utilityProcess 'error' event from #43774 reports any V8 fatal error.
Its spec raised one with the external-ab native addon, which handed V8
memory from outside the sandbox. Node.js 26 makes every Buffer site
sandbox compatible, so that no longer happens through Node.js APIs. The
earlier commits on this branch made the addon call V8 directly, and
that needed ABI workarounds on Windows and for libc++.

As Deepak suggested in review, drop the addon and its workspace entries.
Add triggerV8FatalError() to the electron_common_testing binding, which
is only built when DCHECKs are on. It fails a V8 API check by setting an
internal field on a plain object, so it does not depend on the V8
sandbox. The spec keeps #43774's checks on the event type, location and
report trigger, also checks the report's event message, and now runs
wherever the testing binding exists, including Windows on Arm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* test: wait for the utility process exit only after its 'error' event

events.once(emitter, 'exit') also listens for 'error' and rejects with
its first argument. The previous commit started waiting for 'exit'
before the 'error' event arrived, so the utility process's
'FatalError' rejected that promise and the spec failed with
"Unknown Error: FatalError". Wait for 'exit' after 'error' has been
received, as the spec from #43774 did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* refactor: use one d8-style PartitionAlloc allocator inside the V8 sandbox

Following Deepak's review, replace the sandbox-page fallback added for
nodejs/node#61480 and the older InSandboxAllocator with a single
PAInSandboxAllocator, modelled on d8's.

nodejs/node#61480 moved Buffer.allocUnsafe() onto the isolate's
ArrayBuffer allocator. gin's partition caps a single allocation at
partition_alloc::MaxAllocationSize() (2 GiB - 2 MiB), so Buffers above
that size failed. The previous fix served those requests from whole
sandbox pages and tracked them in a separate map.

PAInSandboxAllocator owns a PartitionAlloc partition in the configurable
pool, which gin::V8Initializer::Initialize() places inside the V8
sandbox. The partition is created lazily, after the pool exists. It has
allow_giga_allocations set and allocates with kAllowGigaAllocations,
along with kNoOverrideHooks and kNoMemoryToolOverride, as gin does. A
single ArrayBuffer can therefore reach MaxGigaAllocationSize()
(16 GiB - 2 MiB on 64-bit) without the page fallback. It is both the
ArrayBuffer allocator for JavascriptEnvironment isolates and V8's
in-sandbox allocator, so Node.js worker_threads isolates use it through
NewDefaultAllocator(). Builds without the V8 sandbox keep gin's
allocator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

* fix: reject instead of throwing in asar fs.promises.stat/lstat wrappers

The new fs.promises.stat/lstat wrappers call splitPath() before deciding
whether to use fsPromises' own implementation. For a URL, splitPath()
runs getValidatedPath(), which throws for a non-file: URL, so the error
escaped synchronously instead of rejecting the returned promise as it did
with util.promisify(fs.stat) on main and as Node's fsPromises does. Make
the wrappers async so every input error rejects, and add a spec for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vf2yMuJ7XxvNktpKuiMPzU

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-rebase PRs the Commit Queue should land as multiple self-contained commits. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. meta Issues and PRs related to the general management of the project. test Issues and PRs related to Node.js core tests and test infrastructure. trace_events Issues and PRs related to trace events from V8, Node.js core, and user code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reopening Perfetto in Node discussion

7 participants

⌂ Proxy