Skip to content
Snippets Groups Projects
Verified Commit 39b5273c 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 16cf26ff
No related branches found
No related tags found
1 merge request!632Bug 41741: Refactor the domain isolator and new circuit
......@@ -193,7 +193,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.
......@@ -415,20 +415,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