tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit efd87935c141042aa032ac63c27e378a11e8936a
parent fc7363724447683645ada28fa4cd512988b57f3d
Author: Ryan VanderMeulen <rvandermeulen@mozilla.com>
Date:   Mon, 22 Dec 2025 12:44:37 +0000

Bug 2007215 - Only define STARTUP_CACHE_MAX_CAPACITY if diagnostic asserts are enabled. r=mccr8

Differential Revision: https://phabricator.services.mozilla.com/D277269

Diffstat:
Mstartupcache/StartupCache.cpp | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp @@ -87,9 +87,12 @@ static const uint8_t MAGIC[] = "startupcache0002"; // debug builds as it should be stable. If we exceed this number we should // just increase it. static const size_t STARTUP_CACHE_RESERVE_CAPACITY = 450; + +#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED // This is a hard limit which we will assert on, to ensure that we don't // have some bug causing runaway cache growth. static const size_t STARTUP_CACHE_MAX_CAPACITY = 5000; +#endif // Not const because we change it for gtests. static uint8_t STARTUP_CACHE_WRITE_TIMEOUT = 60;