Skip to content
Snippets Groups Projects
Verified Commit 9d211e10 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

fixup! Bug 41600: Add a tor circuit display panel.

Use the new domain isolator interface.
parent 39f0140f
Branches
Tags
1 merge request!694Bug 41796: Rebased on top of FIREFOX_ESR_115_BASE
......@@ -192,7 +192,7 @@ var gTorCircuitPanel = {
document
.getElementById("tor-circuit-new-circuit")
.addEventListener("command", () => {
torbutton_new_circuit();
TorDomainIsolator.newCircuitForBrowser(gBrowser);
// And hide.
// NOTE: focus should return to the toolbar button, which we expect to
// remain visible during reload.
......@@ -414,20 +414,14 @@ var gTorCircuitPanel = {
*/
_updateCurrentBrowser(matchingCredentials = null) {
const browser = gBrowser.selectedBrowser;
const { getDomainForBrowser } = ChromeUtils.import(
"resource://torbutton/modules/utils.js"
);
const domain = getDomainForBrowser(browser);
const domain = TorDomainIsolator.getDomainForBrowser(browser);
// We choose the currentURI, which matches what is shown in the URL bar and
// will match up with the domain.
// In contrast, documentURI corresponds to the shown page. E.g. it could
// point to "about:certerror".
const scheme = browser.currentURI?.scheme;
const domainIsolator = Cc["@torproject.org/domain-isolator;1"].getService(
Ci.nsISupports
).wrappedJSObject;
let credentials = domainIsolator.getSocksProxyCredentials(
let credentials = TorDomainIsolator.getSocksProxyCredentials(
domain,
browser.contentPrincipal.originAttributes.userContextId
);
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment