tor-browser

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

commit a319c525f0f1a311fcd49e37b2ee4fa4075fd6e3
parent 3df44584dfdb895c16867513b13c941878f88c23
Author: Atila Butkovits <abutkovits@mozilla.com>
Date:   Fri, 10 Oct 2025 03:24:37 +0300

Revert "Bug 1993562 - Remove call to EnsureGPUReady in GPUProcessManager::GetProcessMemoryReporter. r=gfx-reviewers,lsalzman" for causing bustages complaining about sccache.

This reverts commit a0b092e3854c4a6b59b2a124ecd67a2a789d1b5e.

Diffstat:
Mgfx/ipc/GPUProcessManager.cpp | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp @@ -1730,7 +1730,9 @@ class GPUMemoryReporter : public MemoryReportingProcess { private: GPUChild* GetChild() const { if (GPUProcessManager* gpm = GPUProcessManager::Get()) { - return gpm->GetGPUChild(); + if (GPUChild* child = gpm->GetGPUChild()) { + return child; + } } return nullptr; } @@ -1740,14 +1742,12 @@ class GPUMemoryReporter : public MemoryReportingProcess { }; RefPtr<MemoryReportingProcess> GPUProcessManager::GetProcessMemoryReporter() { - // If we are in the middle of launching a GPU process, we can wait for it to - // finish, otherwise if there is no GPU process, we should just return now to - // avoid launching it again. - if (!mProcess || AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdown) || - !mProcess->WaitForLaunch()) { + // Ensure mProcess is non-null before calling EnsureGPUReady, to avoid + // launching the process if it has not already been launched. + if (!mProcess || NS_FAILED(EnsureGPUReady())) { return nullptr; } - return MakeRefPtr<GPUMemoryReporter>(); + return new GPUMemoryReporter(); } void GPUProcessManager::SetAppInForeground(bool aInForeground) {