tor-browser

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

commit 412ac33182f5e15eb8bc80c602c80c2a763149c0
parent 3fcea9bf2e633587774e81489c3598754ee107b7
Author: Adam Vandolder <avandolder@mozilla.com>
Date:   Tue, 28 Oct 2025 14:17:01 +0000

Bug 1996576 - Fix updating the active entry list for certain replace loads. r=dom-core,smaug

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

Diffstat:
Mdocshell/base/CanonicalBrowsingContext.cpp | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp @@ -1222,11 +1222,9 @@ void CanonicalBrowsingContext::SessionHistoryCommit( if (!addEntry) { shistory->ReplaceEntry(index, newActiveEntry); if (Navigation::IsAPIEnabled() && mActiveEntry && - mActiveEntry->isInList()) { - RefPtr entry = mActiveEntry; - while (entry) { - entry = entry->removeAndGetNext(); - } + mActiveEntry->isInList() && !newActiveEntry->isInList()) { + mActiveEntry->setNext(newActiveEntry); + mActiveEntry->remove(); } } if (Navigation::IsAPIEnabled() && !newActiveEntry->isInList()) {