tor-browser

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

commit f5601c261c2d7bafd816694819c395ccf38933d5
parent eedf7c2752c14193a628b743fc90707148131520
Author: Leo McArdle <leo@mozilla.com>
Date:   Fri, 12 Dec 2025 18:16:20 +0000

Bug 2004324 - add guard to httpFailedOpeningRequest and log failed uris r=jdescottes,devtools-reviewers

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

Diffstat:
Mdevtools/server/actors/resources/network-events-content.js | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/devtools/server/actors/resources/network-events-content.js b/devtools/server/actors/resources/network-events-content.js @@ -75,7 +75,18 @@ class NetworkEventContentWatcher { this.networkEvents.clear(); } - httpFailedOpeningRequest = subject => { + httpFailedOpeningRequest = (subject, topic) => { + if ( + topic != "http-on-failed-opening-request" || + !(subject instanceof Ci.nsIHttpChannel) + ) { + const channel = subject.QueryInterface(Ci.nsIChannel); + console.warn( + `httpFailedOpeningRequest triggered on non-nsIHttpChannel for uri: ${channel.URI.spec}` + ); + return; + } + const channel = subject.QueryInterface(Ci.nsIHttpChannel); // Ignore preload requests to avoid duplicity request entries in