The spinner in the popup page shell is always in the DOM and merely hidden with
tw-invisible. visibility:hidden does not stop a CSS animation, so bwi-spin keeps
running for the life of the popup at ~30 fps on a page that is doing nothing.
Every frame forces a style recalculation across the page. With the Tailwind
:has() variants on each item row that is expensive: the renderer allocates about
8 MB/s, some 500 MB a minute. It is freed again, just not fast enough -- VmData
climbs until it hits the 8 GiB RLIMIT_DATA Chromium applies to renderers, mmap
fails and V8 aborts, leaving a SIGILL core dump of that one renderer while the
browser keeps running.
That is the crash behind #23309, #23431 and #23022. None could be reproduced,
which fits: nothing leaks, the DOM does not grow and the JS heap stays flat, so
a heap snapshot shows nothing. Measured on a local build with the popup open and
untouched, growth went from +500 MB/min to -1.5 MB/min, while
document.getAnimations() reported exactly one running animation -- bwi-spin, on
a bit-icon whose computed visibility was hidden.
Guarding with @if is what every other spinner in the codebase already does. The
overlay is absolutely positioned, so not rendering it costs no layout.
(cherry picked from commit d1d1224ef0)
Co-authored-by: Urias Uhle <101756727+Lolig4@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Bitwarden Client Applications
This repository houses all Bitwarden client applications except the mobile applications (iOS | android).
Please refer to the Clients section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.
Related projects:
- bitwarden/server: The core infrastructure backend (API, database, Docker, etc).
- bitwarden/ios: Bitwarden iOS Password Manager & Authenticator apps.
- bitwarden/android: Bitwarden Android Password Manager & Authenticator apps.
- bitwarden/directory-connector: A tool for syncing a directory (AD, LDAP, Azure, G Suite, Okta) to an organization.
We're Hiring!
Interested in contributing in a big way? Consider joining our team! We're hiring for many positions. Please take a look at our Careers page to see what opportunities are currently open as well as what it's like to work at Bitwarden.
Contribute
Code contributions are welcome! Please commit any pull requests against the main branch. Learn more about how to contribute by reading the Contributing Guidelines. Check out the Contributing Documentation for how to get started with your first contribution.
Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the SECURITY.md file.
