tor-browser

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

commit 474ec71a5d692932cd9743b8097416baf9e3eaf8
parent 3aff965e839b7872bf48a9803b80669ca49276ac
Author: Kui-Feng Lee <thinker.li@gmail.com>
Date:   Fri, 17 Oct 2025 04:31:58 +0000

Bug 1994092 - Annotate PSI information without considering memory pressure. r=xpcom-reviewers,nika

Move UpdatePSIInfo() and UpdateCrashAnnotation() calls outside the
mUnderMemoryPressure condition check so PSI information is always
recorded in crash annotations, regardless of memory pressure state.
This allows better analysis of memory conditions in crash reports.

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

Diffstat:
Mxpcom/base/AvailableMemoryWatcherLinux.cpp | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/xpcom/base/AvailableMemoryWatcherLinux.cpp b/xpcom/base/AvailableMemoryWatcherLinux.cpp @@ -306,11 +306,11 @@ void nsAvailableMemoryWatcher::HandleLowMemory() { } if (!mUnderMemoryPressure) { mUnderMemoryPressure = true; - UpdatePSIInfo(lock); - UpdateCrashAnnotation(lock); // Poll more frequently under memory pressure. StartPolling(lock); } + UpdatePSIInfo(lock); + UpdateCrashAnnotation(lock); UpdateLowMemoryTimeStamp(); // We handle low memory offthread, but we want to unload // tabs only from the main thread, so we will dispatch this @@ -360,9 +360,9 @@ void nsAvailableMemoryWatcher::MaybeHandleHighMemory() { RecordTelemetryEventOnHighMemory(lock); NS_NotifyOfEventualMemoryPressure(MemoryPressureState::NoPressure); mUnderMemoryPressure = false; - UpdatePSIInfo(lock); - UpdateCrashAnnotation(lock); } + UpdatePSIInfo(lock); + UpdateCrashAnnotation(lock); StartPolling(lock); }