ckerr

#55297: test: improve reliability of menu cpp-heap specs

Merged
Created: Oct 23, 2026, 5:56:42 PM
Merged: Oct 26, 2026, 3:26:36 AM
6 comments
Target: main

Description of Change

cpp heap > menu module > should not leak when rebuilding application menu failed once on Windows x64. The C++ heap grew by 75,680 bytes between two identical rounds, against a 10% allowance of 24,232 bytes. That's about the size of one replaced menu, so I checked whether it was a leak or the measurement.

It was the measurement. The spec collected with v8Util.requestGarbageCollectionForTesting(), a synchronous GC that scans the native stack conservatively. A replaced menu, its submenus and its items all reference each other, so a stale pointer to any one of them keeps the whole ~75 KB tree alive, several times the allowance.

Refs #55297 (review)

Checklist

Release Notes

Notes: none

Backports

43-x-y
Merged
PR Number
#55355
Merged At
Oct 26, 2026, 10:21:10 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#55356
Merged At
Oct 26, 2026, 10:20:51 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#55357
Merged At
Oct 26, 2026, 10:21:37 AM
Released In
Not yet
Release Date
Not yet
46-x-y
Merged
PR Number
#55358
Merged At
Oct 26, 2026, 10:21:47 AM
Released In
v46.0.0-alpha.2
Release Date
Oct 26, 2026, 3:00:25 PM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron