tor-browser

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

commit 60b4755b5fd5f898d2a968029cbd4bbb9d725166
parent 68078cc21e6792ffc2a7fa9a69bfecc62c1ca761
Author: agoloman <agoloman@mozilla.com>
Date:   Tue, 25 Nov 2025 14:08:17 +0200

Revert "Bug 2002206 [Linux] Don't delete layer manager for hidden popups r=emilio" for causing mochitest failures @test_bug1969341.html.

This reverts commit b13e90b6db834deba5cf8e39f217d992b228a88e.

Diffstat:
Mwidget/gtk/nsWindow.cpp | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp @@ -9972,6 +9972,16 @@ void nsWindow::OnUnmap() { // Reset scale for hidden windows mCeiledScaleFactor = sNoScale; } + + // Until bug 1654938 is fixed we delete layer manager for hidden popups, + // otherwise it can easily hold 1GB+ memory for a long time. + // + // Don't do this for temporarily hidden popups tho, as remote content is not + // set up to survive the layer manager destruction of the containing window, + // see bug 1958695. + if (mWindowType == WindowType::Popup && !mPopupTemporaryHidden) { + DestroyLayerManager(); + } } // Apply workaround for Mutter compositor bug (mzbz#1777269).