tor-browser

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

commit 655ba8eacaaa7c37d257b7bdd58f43b65e8e13b3
parent b373b47fa8047820f91243734699c68929246b87
Author: Eitan Isaacson <eitan@monotonous.org>
Date:   Sat,  6 Dec 2025 16:13:15 +0000

Bug 2000597 - Move Accessible doc shutdown to later in PresShell::Destroy. r=Jamie

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

Diffstat:
Mlayout/base/PresShell.cpp | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/layout/base/PresShell.cpp b/layout/base/PresShell.cpp @@ -1114,18 +1114,6 @@ void PresShell::Destroy() { mMVMContext = nullptr; } -#ifdef ACCESSIBILITY - if (mDocAccessible) { -# ifdef DEBUG - if (a11y::logging::IsEnabled(a11y::logging::eDocDestroy)) - a11y::logging::DocDestroy("presshell destroyed", mDocument); -# endif - - mDocAccessible->Shutdown(); - mDocAccessible = nullptr; - } -#endif // ACCESSIBILITY - MaybeReleaseCapturingContent(); EventHandler::OnPresShellDestroy(mDocument); @@ -1184,6 +1172,18 @@ void PresShell::Destroy() { mIsDestroying = true; +#ifdef ACCESSIBILITY + if (mDocAccessible) { +# ifdef DEBUG + if (a11y::logging::IsEnabled(a11y::logging::eDocDestroy)) + a11y::logging::DocDestroy("presshell destroyed", mDocument); +# endif + + mDocAccessible->Shutdown(); + mDocAccessible = nullptr; + } +#endif // ACCESSIBILITY + // We can't release all the event content in // mCurrentEventContentStack here since there might be code on the // stack that will release the event content too. Double release