tor-browser

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

commit 1d276bc57ffe77e0365385c9c08fb27708f56934
parent ed95352612cd9946ea702853d568eb3654e0d174
Author: Malte Jürgens <maltejur@mozilla.com>
Date:   Thu, 13 Nov 2025 13:54:09 +0000

Bug 1968527 - Add getter for current DocumentLoadListener to CanonicalBrowsingContext r=nika

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

Diffstat:
Mdocshell/base/CanonicalBrowsingContext.cpp | 5+++++
Mdocshell/base/CanonicalBrowsingContext.h | 3+++
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp @@ -3735,6 +3735,11 @@ EntryList* CanonicalBrowsingContext::GetActiveEntries() { return mActiveEntryList; } +already_AddRefed<net::DocumentLoadListener> +CanonicalBrowsingContext::GetCurrentLoad() { + return do_AddRef(this->mCurrentLoad); +} + NS_IMPL_CYCLE_COLLECTION_CLASS(CanonicalBrowsingContext) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(CanonicalBrowsingContext, diff --git a/docshell/base/CanonicalBrowsingContext.h b/docshell/base/CanonicalBrowsingContext.h @@ -458,6 +458,9 @@ class CanonicalBrowsingContext final : public BrowsingContext { void MaybeReconstructActiveEntryList(); + // Get the load listener for the current load in this browsing context. + already_AddRefed<net::DocumentLoadListener> GetCurrentLoad(); + protected: // Called when the browsing context is being discarded. void CanonicalDiscard();