Verified Commit beec825e authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! Bug 40209: Implement Basic Crypto Safety

Use the new domain isolator interface
parent 1ba65aa4
Loading
Loading
Loading
Loading
+11 −1
Changes for browser/actors/CryptoSafetyParent.jsm: 11 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -12,6 +12,12 @@ const { XPCOMUtils } = ChromeUtils.import(
  "resource://gre/modules/XPCOMUtils.jsm"
);

ChromeUtils.defineModuleGetter(
  this,
  "TorDomainIsolator",
  "resource://gre/modules/TorDomainIsolator.jsm"
);

XPCOMUtils.defineLazyGetter(this, "cryptoSafetyBundle", () => {
  return Services.strings.createBundle(
    "chrome://browser/locale/cryptoSafetyPrompt.properties"
@@ -75,7 +81,11 @@ class CryptoSafetyParent extends JSWindowActorParent {
    );

    if (buttonPressed === 0) {
      this.browsingContext.topChromeWindow.torbutton_new_circuit();
      const { browsingContext } = this.manager;
      const browser = browsingContext.embedderElement;
      if (browser) {
        TorDomainIsolator.newCircuitForBrowser(browser.ownerGlobal.gBrowser);
      }
    }
  }
}