tor-browser

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

commit 770dd787b82d5a78214829fd30fb229ef0f13e35
parent 551b6a5da43909e90e2ff559a0bf309542019d89
Author: Cristian Tuns <ctuns@mozilla.com>
Date:   Thu, 18 Dec 2025 19:30:56 -0500

Revert "Bug 2006953 - Make memory reporter timeout a pref. r=mccr8" for causing build bustages in nsMemoryReporterManager.cpp

This reverts commit de20aed8ca32f33af74df745e6be7c246cea3839.

Diffstat:
Mmodules/libpref/init/StaticPrefList.yaml | 7-------
Mxpcom/base/nsMemoryReporterManager.cpp | 5++---
Mxpcom/base/nsMemoryReporterManager.h | 3+++
3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml @@ -13182,13 +13182,6 @@ value: 500 mirror: always -# This timeout (ms) needs to be long enough to allow for the -# possibility of DMD reports and/or running on a low-end phone. -- name: memory.reporter.timeout - type: uint32_t - value: 180000 - mirror: never - #--------------------------------------------------------------------------- # Prefs starting with "middlemouse." #--------------------------------------------------------------------------- diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp @@ -31,7 +31,6 @@ #include "VRProcessManager.h" #include "mozilla/MemoryReportingProcess.h" #include "mozilla/Preferences.h" -#include "mozilla/StaticPrefs_memory.h" #include "mozilla/RDDProcessManager.h" #include "mozilla/Services.h" #include "mozilla/glean/XpcomMetrics.h" @@ -1997,8 +1996,8 @@ nsresult nsMemoryReporterManager::StartGettingReports() { if (!s->mChildrenPending.IsEmpty()) { nsCOMPtr<nsITimer> timer; rv = NS_NewTimerWithFuncCallback( - getter_AddRefs(timer), TimeoutCallback, this, - StaticPrefs::memory_reporter_timeout(), nsITimer::TYPE_ONE_SHOT, + getter_AddRefs(timer), TimeoutCallback, this, kTimeoutLengthMS, + nsITimer::TYPE_ONE_SHOT, "nsMemoryReporterManager::StartGettingReports"_ns); if (NS_WARN_IF(NS_FAILED(rv))) { FinishReporting(); diff --git a/xpcom/base/nsMemoryReporterManager.h b/xpcom/base/nsMemoryReporterManager.h @@ -231,6 +231,9 @@ class nsMemoryReporterManager final : public nsIMemoryReporterManager, nsISupports* aHandleReportData, bool aAnonymize); static void TimeoutCallback(nsITimer* aTimer, void* aData); + // Note: this timeout needs to be long enough to allow for the + // possibility of DMD reports and/or running on a low-end phone. + static const uint32_t kTimeoutLengthMS = 180000; mozilla::Mutex mMutex; bool mIsRegistrationBlocked MOZ_GUARDED_BY(mMutex);