Commit 07b46f48 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃 Committed by morgan
Browse files

fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.

Bug 43074: Pass the browser to TorDomainIsolator.newCircuitForBrowser.
parent a04c7525
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@
                     class="subviewbutton"
                     key="new-circuit-key"
                     data-l10n-id="appmenuitem-new-tor-circuit"
                     oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser);"/>
                     oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser.selectedBrowser);"/>
      <toolbarseparator/>
      <toolbarbutton id="appMenu-bookmarks-button"
                     class="subviewbutton subviewbutton-nav"
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
                          key="new-identity-key" data-l10n-id="menu-new-identity"/>
                <menuitem id="menu_newCircuit"
                          key="new-circuit-key" data-l10n-id="menu-new-tor-circuit"
                          oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser);"/>
                          oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser.selectedBrowser);"/>
                <menuseparator/>
                <menuitem id="menu_openLocation"
                          hidden="true"
+1 −1
Original line number Diff line number Diff line
@@ -392,5 +392,5 @@
         internal="true"/>
#endif
    <key id="new-identity-key" modifiers="accel shift" key="U" oncommand="NewIdentityButton.onCommand(event)"/>
    <key id="new-circuit-key" modifiers="accel shift" key="L" oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser)"/>
    <key id="new-circuit-key" modifiers="accel shift" key="L" oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser.selectedBrowser)"/>
  </keyset>
+1 −1
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@

    <toolbarbutton id="new-circuit-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                   data-l10n-id="toolbar-new-tor-circuit"
                   oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser);"/>
                   oncommand="TorDomainIsolator.newCircuitForBrowser(gBrowser.selectedBrowser);"/>

    <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                   observes="View:FullScreen"
+2 −4
Original line number Diff line number Diff line
@@ -225,11 +225,9 @@ class TorDomainIsolatorImpl {
   * Create a new nonce for the FP domain of the selected browser and reload the
   * tab with a new circuit.
   *
   * @param {object} globalBrowser Should be the gBrowser from the context of
   * the caller
   * @param {object} browser The browser we want to change the circuit for.
   */
  newCircuitForBrowser(globalBrowser) {
    const browser = globalBrowser.selectedBrowser;
  newCircuitForBrowser(browser) {
    const firstPartyDomain = getDomainForBrowser(browser);
    this.newCircuitForDomain(firstPartyDomain);
    const { username, password } = this.#getSocksProxyCredentials(